Skip to content

Commit 9012743

Browse files
committed
Fix import when using OgreNext's MeshTool
MeshTool needs us to indicate how the xml file should be named. Also pass "-U" argument to ask MeshTool to "unoptimize" the mesh. This allows us to read most v2 meshes.
1 parent 5596909 commit 9012743

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

io_ogre/util.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,12 @@ def mesh_convert(infile):
301301
# Convert to v2 format if required
302302
cmd.append('-%s' % config.get('MESH_TOOL_VERSION'))
303303

304+
# Ask MeshTool to "unoptimize" if necessary. Otherwise we can't read half and qtangents
305+
cmd.append("-U")
304306
# Finally, specify input file
305307
cmd.append(infile)
308+
# MeshTool needs us to specify output file
309+
cmd.append(infile + ".xml")
306310

307311
# OgreMeshTool must be run from its own directory (so setting cwd accordingly)
308312
# otherwise it will complain about missing render system (missing plugins_tools.cfg)

0 commit comments

Comments
 (0)