Markemp/Cryengine-Importer

KeyError: 'bpy_prop_collection[key]: key "COCKPIT" not found'

aceofcircles opened this issue · 6 comments

Everything for the most part works fine, but a few mechs give me trouble.

When I import the Catapult, I get this error. Any ideas?

bpy.context.space_data.recent_folders_active = 0
bpy.ops.object.editmode_toggle()
Traceback (most recent call last):
File "C:\Users\Cameron\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Cryengine_Importer.py", line 1283, in execute
return import_mech(context, **keywords)
File "C:\Users\Cameron\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Cryengine_Importer.py", line 1093, in import_mech
geometry = import_mech_geometry(cdffile, basedir, bodydir, mech)
File "C:\Users\Cameron\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Cryengine_Importer.py", line 872, in import_mech_geometry
bone_location = bpy.context.object.pose.bones[bonename].head
KeyError: 'bpy_prop_collection[key]: key "COCKPIT" not found'

location: :-1

bpy.context.area.type = 'INFO'

Attached a screenshot of the result

capture

Possibly of note is there are errors when converting
capture2

The catapult not importing properly is a known issue. It's actually a bug in Blender. For some reason it won't read all the bones in the collada file. It's skipping 6. I think the Timberwolf has the same issue as well.

The conflict in chunk definition is just a debug message and can be safely ignored. I need to get that cleaned up. I'm going to leave this issue open until I can update that, and since the catapult issue is real, this is a good place to record the bug. Thank you!

Thank you for monitoring this area and continuing to support the tool suite. Your scripts have saved me a tremendous amount of time vs finding/fixing/rigging other MWO models around the web. I'm not a coder, but if there's anything I can do to assist with QA/Testing please let me know.

Having a similar issue with the Atlas.

Traceback (most recent call last):
File "C:\Users\Cameron\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Cryengine_Importer.py", line 1283, in execute
return import_mech(context, **keywords)
File "C:\Users\Cameron\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Cryengine_Importer.py", line 1093, in import_mech
geometry = import_mech_geometry(cdffile, basedir, bodydir, mech)
File "C:\Users\Cameron\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Cryengine_Importer.py", line 896, in import_mech_geometry
bpy.context.object.data.materials.append(bpy.data.materials[materialname]) # If there is no material, add a dummy mat.
KeyError: 'bpy_prop_collection[key]: key "atlas_window" not found'

location: :-1
Capture

The 2.80 branch has a bunch of updates that will fix this issue. Fixing a few final bugs and adding a couple of updated features and it will be ready for release. The 1.1 release will only work on Blender 2.80 or newer, which is currently in Beta.

Since the problem was due to a bug in Blender, the old 2.79 (and previous) versions (1.0 Cryengine Importer) won't be updated. But at least all the mechs will be available once the 1.1 version is released.

Blender 2.80 has been released, and the master branch updated to support it. I've tested it with the Atlas, Catapult and Timberwolf and all are now working properly. Enjoy!