|
@@ -197,12 +197,15 @@ M3D_INDEX addMaterial(const Assimp::M3DWrapper &m3d, const aiMaterial *mat) {
|
|
break;
|
|
break;
|
|
case m3dpf_float:
|
|
case m3dpf_float:
|
|
if (mat->Get(aiProps[k].pKey, aiProps[k].type,
|
|
if (mat->Get(aiProps[k].pKey, aiProps[k].type,
|
|
- aiProps[k].index, f) == AI_SUCCESS)
|
|
|
|
|
|
+ aiProps[k].index, f) == AI_SUCCESS) {
|
|
|
|
+ uint32_t f_uint32;
|
|
|
|
+ memcpy(&f_uint32, &f, sizeof(uint32_t));
|
|
addProp(&m3d->material[mi],
|
|
addProp(&m3d->material[mi],
|
|
m3d_propertytypes[k].id,
|
|
m3d_propertytypes[k].id,
|
|
/* not (uint32_t)f, because we don't want to convert
|
|
/* not (uint32_t)f, because we don't want to convert
|
|
* it, we want to see it as 32 bits of memory */
|
|
* it, we want to see it as 32 bits of memory */
|
|
- *((uint32_t *)&f));
|
|
|
|
|
|
+ f_uint32);
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
case m3dpf_uint8:
|
|
case m3dpf_uint8:
|
|
if (mat->Get(aiProps[k].pKey, aiProps[k].type,
|
|
if (mat->Get(aiProps[k].pKey, aiProps[k].type,
|