Bone merge fail on Blender 4 with 1.7.2 using G2

Issue #1866 resolved
Mikael created an issue

When importing a Genesis 2 character there will be an exception when it tries to merge the bones, this only happens on Blender 4, on 3.6 it works ok. File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
RuntimeError: Error: Python: KeyError: 'bpy_prop_collection.get(key, ...): key must be a string or tuple, not int'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\error.py", line 223, in execute
    self.run(context)
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\main.py", line 287, in run
    self.loadDazFile(filepath, context)
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\main.py", line 180, in loadDazFile
    asset.postbuild(context, inst)
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\modifier.py", line 697, in postbuild
    twist = deriveBone("%s.twist" % bname, eb, rig, 31, eb.parent)
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\mhx.py", line 68, in deriveBone
    return makeBone(bname, rig, eb0.head, eb0.tail, eb0.roll, layer, parent)
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\mhx.py", line 79, in makeBone
    enableBoneNumLayer(eb, rig, layer)
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\import_daz\utils.py", line 95, in enableBoneNumLayer
    coll0 = rig.data.collections.get(layer)
SystemError: <built-in method get of bpy_prop_collection object at 0x0000026BF2261B00> returned a result with an exception set
Location: C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py:109

Comments (7)

  1. Alessandro Padovani

    Commit fdea7ea works fine, thank you for the fix.

    I'm confused there’s no 1.7.2 in the branches and master loads as 1.7.3. Let us know or we can close as resolved if this is intended.

  2. Thomas Larsson repo owner

    I created a 1.7.2 branch on my home computer, but apparently I didn’t push it to the remote repo. But I think it is better to release 1.7.3 quickly, because there are other fixes that may be critical. E.g. #1865 which may be show-stopper in Blender 4.0.1.

  3. Mikael reporter

    It look like it is working fine now, minor issue though, it look like the version number displayed in Blender preferences is still 1.7.2 even if it is 1.7.3

  4. Log in to comment