ross-g/io_pdx_mesh

Error when loading a model into Maya

Closed this issue · 5 comments

[io_pdx_mesh] INFO: Set game engine to: 'hearts_of_iron_4'
// Performing AutoSave at 2022/01/27 21:09:47: //
// master file: __AUTO-SAVE__untitled.mb //
// AutoSave file: C:/Users/xluzu/Documents/maya/projects/default/autosave/__AUTO-SAVE__untitled.0003.mb //
[io_pdx_mesh] INFO: importing C:/Users/xluzu/Downloads/legion.mesh
[io_pdx_mesh] INFO: creating node 1/1 - Zebra_Pony.001
[io_pdx_mesh] INFO: creating skeleton - 29 bones
[io_pdx_mesh] INFO: creating mesh - 0
[io_pdx_mesh] WARNING: FAILED to import C:/Users/xluzu/Downloads/legion.mesh
[io_pdx_mesh] ERROR: 'float' object cannot be interpreted as an integer
Traceback (most recent call last):
File "C:/Users/xluzu/Documents/maya/scripts\io_pdx_mesh\pdx_maya\maya_ui.py", line 506, in import_mesh
import_meshfile(mesh_filepath, **options)
File "C:/Users/xluzu/Documents/maya/scripts\io_pdx_mesh\pdx_maya\maya_import_export.py", line 1328, in import_meshfile
mesh, obj = create_mesh(pdx_mesh, name=meshmaterial_name)
File "C:/Users/xluzu/Documents/maya/scripts\io_pdx_mesh\pdx_maya\maya_import_export.py", line 1046, in create_mesh
for i in xrange(0, numPolygons):
TypeError: 'float' object cannot be interpreted as an integer

What version of Maya are you trying this with?

And can you share the file that you're trying to import? It doesn't look like a vanilla game asset so it might infact just be a broken file.

I am sorry for not getting back, I had medical issue that forced me to not be able to reply in time.

I am using the latest version of Maya, 2022. I used an example from the mod I am working on, however I had tested it with several other Hearts of Iron 4 models. It is not exclusive to any model, and the program appears to work on the Blender Version...

Again, sorry for the delayed response.

More Information: I do get the animation rig, the mesh appears to be where the crash is, IDK if that is helpful or not.

So I think this is already fixed by 05c5e5b and is just not in the released version yet.

Can you please try out the bugfixes branch to see if that solves your problem?

I'll try it out