mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-04 12:35:52 +00:00
Undefined behavior fix
This commit is contained in:
parent
2fef79ceaa
commit
c55a3e0ac1
@ -459,10 +459,11 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os,
|
|||||||
size_t normCount = secSizes[s] / 6;
|
size_t normCount = secSizes[s] / 6;
|
||||||
for (size_t i=0 ; i<normCount ; ++i)
|
for (size_t i=0 ; i<normCount ; ++i)
|
||||||
{
|
{
|
||||||
|
float x = reader.readInt16Big() / 16834.0f;
|
||||||
|
float y = reader.readInt16Big() / 16834.0f;
|
||||||
|
float z = reader.readInt16Big() / 16834.0f;
|
||||||
os.format("norm_list.append((%f,%f,%f))\n",
|
os.format("norm_list.append((%f,%f,%f))\n",
|
||||||
reader.readInt16Big() / 16834.0f,
|
x, y, z);
|
||||||
reader.readInt16Big() / 16834.0f,
|
|
||||||
reader.readInt16Big() / 16834.0f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -504,9 +505,10 @@ atUint32 ReadGeomSectionsToBlender(HECL::BlenderConnection::PyOutStream& os,
|
|||||||
size_t uvCount = secSizes[s] / 4;
|
size_t uvCount = secSizes[s] / 4;
|
||||||
for (size_t i=0 ; i<uvCount ; ++i)
|
for (size_t i=0 ; i<uvCount ; ++i)
|
||||||
{
|
{
|
||||||
|
float x = reader.readInt16Big() / 32768.0f;
|
||||||
|
float y = reader.readInt16Big() / 32768.0f;
|
||||||
os.format("suv_list.append((%f,%f))\n",
|
os.format("suv_list.append((%f,%f))\n",
|
||||||
reader.readInt16Big() / 32768.0f,
|
x, y);
|
||||||
reader.readInt16Big() / 32768.0f);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -145,6 +145,11 @@ struct MREA
|
|||||||
mHeader.visorFlags.thermalLevelStr());
|
mHeader.visorFlags.thermalLevelStr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Origins to center of mass */
|
||||||
|
os << "bpy.ops.object.select_by_type(type='MESH')\n"
|
||||||
|
"bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS')\n"
|
||||||
|
"bpy.ops.object.select_all(action='DESELECT')\n";
|
||||||
|
|
||||||
/* Center view */
|
/* Center view */
|
||||||
os << "bpy.context.user_preferences.view.smooth_view = 0\n"
|
os << "bpy.context.user_preferences.view.smooth_view = 0\n"
|
||||||
"for window in bpy.context.window_manager.windows:\n"
|
"for window in bpy.context.window_manager.windows:\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user