Skip to content

Importing animations does not work if a metahuman is linked or collections have been renamed #307

Description

@chiefmasterR

Blender version 4.5.9
Polyhammer version 0.8.1

Steps to reproduce:

  • Import only the metahuman head dna file
  • Rename the two created collections (NAME, NAME_lod_0) to any other names
  • Place the two created rigs (NAME_face_gui, NAME_head_rig) into any other separate collection
  • Create a collection in Scene Collection and place the root metahuman collection inside it
  • Mark this newly created collection as an asset, then link it to another .blend file and try importing the animation

You can also leave everything as is without renaming or moving anything and simply link the metahuman collection in another .blend file. This won't cause any errors, but the animation simply won’t work

Error output from the console
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\__init__.py", line 224, in execute
    return import_fbx.load(self, context, filepath=self.filepath, **keywords)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 3542, in load
    _()
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 3536, in _
    root_helper.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 2956, in build_hierarchy
    child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 2947, in build_hierarchy
    child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 2950, in build_hierarchy
    view_layer.active_layer_collection.collection.objects.link(obj)
RuntimeError: Error: Could not (un)link the object 'CTRL_C_eyesAim' because the collection 'MH' is overridden

Error: Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\__init__.py", line 224, in execute
    return import_fbx.load(self, context, filepath=self.filepath, **keywords)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 3542, in load
    _()
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 3536, in _
    root_helper.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 2956, in build_hierarchy
    child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 2947, in build_hTraceback (most recent call last):
  File "C:\Users\me\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\meta_human_dna\operators.py", line 344, in execute
    head.import_action(
  File "C:\Users\me\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\meta_human_dna\utilities\misc.py", line 53, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\me\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\meta_human_dna\components\head.py", line 48, in import_action
    utilities.import_face_board_action_from_fbx(
  File "C:\Users\me\AppData\Roaming\Blender Foundation\Blender\4.5\extensions\user_default\meta_human_dna\utilities\action.py", line 379, in import_face_board_action_from_fbx
    bpy.ops.import_scene.fbx(filepath=str(file_path))
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\__init__.py", line 224, in execute
    return import_fbx.load(self, context, filepath=self.filepath, **keywords)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 3542, in load
    _()
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 3536, in _
    root_helper.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 2956, in build_hierarchy
    child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 2947, in build_hierarchy
    child.build_hierarchy(fbx_tmpl, settings, scene, view_layer)
  File "C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\addons_core\io_scene_fbx\import_fbx.py", line 2950, in build_hierarchy
    view_layer.active_layer_collection.collection.objects.link(obj)
RuntimeError: Error: Could not (un)link the object 'CTRL_C_eyesAim' because the collection 'MH' is overridden
Location: C:\Program Files\Blender Foundation\Blender 4.5\4.5\scripts\modules\bpy\ops.py:109

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions