Skip to content

Conversation

@BigRoy
Copy link
Contributor

@BigRoy BigRoy commented Aug 19, 2025

Changelog Description

Build template load placeholder fix load when loading objects without reference groups

Additional review information

Fix error:

# # *** WRN: >>> { <ayon_maya.api.workfile_template_builder.MayaTemplateBuilder object at 0x00000192304E3D90> }: [ Failed to process placeholder |RenderSetup|Context_rendersetup_folder with plugin MayaPlaceholderLoadPlugin ] 
# =======================
# unhashable type: 'list'
# =======================
# Traceback (most recent call last):
#   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.5.3\ayon_core\pipeline\workfile\workfile_template_builder.py", line 761, in populate_scene_placeholders
#     placeholder_plugin.populate_placeholder(placeholder)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 69, in populate_placeholder
#     self.populate_load_placeholder(placeholder)
#   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.5.3\ayon_core\pipeline\workfile\workfile_template_builder.py", line 1802, in populate_load_placeholder
#     self.load_succeed(placeholder, container)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 79, in load_succeed
#     self._parent_in_hierarchy(placeholder, container)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 119, in _parent_in_hierarchy
#     for node in set(roots):
#                 ^^^^^^^^^^
TypeError: unhashable type: 'list'

Reported here: #335 (comment)

Testing notes:

  1. Build template should work, even for load placeholders that are not references or those that have "Group Reference" disabled.

…with expected results of `get_container_transforms`
@BigRoy BigRoy requested review from LiborBatek and antirotor August 19, 2025 10:01
@BigRoy BigRoy self-assigned this Aug 19, 2025
@BigRoy BigRoy added the type: bug Something isn't working label Aug 19, 2025
@LiborBatek
Copy link
Member

still getting some errors:

# >>> [ Found template at: 'C:\Projects\Ayon_Tests\Templates\Lighting\template_lighting.ma' ] 
# >>> [ Building the workfile template: C:\Projects\Ayon_Tests\Templates\Lighting\template_lighting.ma ] 
updateRenderOverride;
# File read in  0.22 seconds.
>>> We have preset for ArnoldStandinLoader
  - setting `enabled`: `True`
>>> We have preset for AssemblyLoader
  - setting `enabled`: `True`
>>> We have preset for AudioLoader
  - setting `enabled`: `True`
>>> We have preset for GpuCacheLoader
  - setting `enabled`: `True`
>>> We have preset for FileNodeLoader
  - setting `enabled`: `True`
>>> We have preset for ImagePlaneLoader
  - setting `enabled`: `True`
>>> We have preset for LookLoader
  - setting `enabled`: `True`
>>> We have preset for MatchmoveLoader
  - setting `enabled`: `True`
>>> We have preset for MayaUsdLoader
  - setting `enabled`: `True`
  - setting `use_ayon_entity_uri`: `False`
>>> We have preset for MultiverseUsdLoader
  - setting `enabled`: `True`
>>> We have preset for MultiverseUsdOverLoader
  - setting `enabled`: `True`
>>> We have preset for OxRigLoader
  - setting `create_cache_instance_on_load`: `True`
  - setting `enabled`: `True`
>>> We have preset for RedshiftProxyLoader
  - setting `enabled`: `True`
>>> We have preset for RenderSetupLoader
  - setting `enabled`: `True`
>>> We have preset for LoadVDBtoArnold
  - setting `enabled`: `True`
>>> We have preset for LoadVDBtoRedShift
  - setting `enabled`: `True`
>>> We have preset for LoadVDBtoVRay
  - setting `enabled`: `True`
>>> We have preset for VRayProxyLoader
  - setting `enabled`: `True`
>>> We have preset for VRaySceneLoader
  - setting `enabled`: `True`
>>> We have preset for XgenLoader
  - setting `enabled`: `True`
>>> We have preset for YetiCacheLoader
  - setting `enabled`: `True`
>>> We have preset for YetiRigLoader
  - setting `create_cache_instance_on_load`: `True`
  - setting `enabled`: `True`
# # >>> [ Loading animationray_rigMain_01_ from /maya/shots/sh_010 with loader ReferenceLoader
Loader arguments used :  ] 
# ayon_core.pipeline.load.utils : Running 'ReferenceLoader' on '/maya/shots/sh_010'
# ProductLoader : {'attach_to_root': True, 'group_name': 'sh_010_animationray_rigMain_01__01_:_GRP'}
# File read in  0.034 seconds.
# # *** WRN: >>> { <ayon_maya.api.workfile_template_builder.MayaTemplateBuilder object at 0x00000240B0BBF350> }: [ Failed to process placeholder |Anim|Context_animation_folder with plugin MayaPlaceholderLoadPlugin ] 
# ===================
# Object | is invalid
# ===================
# Traceback (most recent call last):
#   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.5.3\ayon_core\pipeline\workfile\workfile_template_builder.py", line 761, in populate_scene_placeholders
#     placeholder_plugin.populate_placeholder(placeholder)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 70, in populate_placeholder
#     self.populate_load_placeholder(placeholder)
#   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.5.3\ayon_core\pipeline\workfile\workfile_template_builder.py", line 1802, in populate_load_placeholder
#     self.load_succeed(placeholder, container)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 80, in load_succeed
#     self._parent_in_hierarchy(placeholder, container)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 103, in _parent_in_hierarchy
#     parent = get_node_parent(container_root)
#              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\api\lib.py", line 2332, in get_node_parent
#     parents = cmds.listRelatives(node, parent=True, fullPath=True)
#               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Object | is invalid
Populating < PlaceholderItem maya_runscript >
# >>> [ There's no representation for this placeholder: |Setdress|Context_setdress_folder ] 
# # >>> [ Loading mayaSceneLights from /maya/shots/sh_010 with loader ReferenceLoader
Loader arguments used :  ] 
# ayon_core.pipeline.load.utils : Running 'ReferenceLoader' on '/maya/shots/sh_010'
# ProductLoader : {'attach_to_root': True, 'group_name': 'sh_010_mayaSceneLights_01_:_GRP'}
# File read in  0.015 seconds.
# # *** WRN: >>> { <ayon_maya.api.workfile_template_builder.MayaTemplateBuilder object at 0x00000240B0BBF350> }: [ Failed to process placeholder |Lights|Context_mayascene_folder with plugin MayaPlaceholderLoadPlugin ] 
# ===================
# Object | is invalid
# ===================
# Traceback (most recent call last):
#   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.5.3\ayon_core\pipeline\workfile\workfile_template_builder.py", line 761, in populate_scene_placeholders
#     placeholder_plugin.populate_placeholder(placeholder)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 70, in populate_placeholder
#     self.populate_load_placeholder(placeholder)
#   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.5.3\ayon_core\pipeline\workfile\workfile_template_builder.py", line 1802, in populate_load_placeholder
#     self.load_succeed(placeholder, container)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 80, in load_succeed
#     self._parent_in_hierarchy(placeholder, container)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 103, in _parent_in_hierarchy
#     parent = get_node_parent(container_root)
#              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\api\lib.py", line 2332, in get_node_parent
#     parents = cmds.listRelatives(node, parent=True, fullPath=True)
#               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Object | is invalid
# # >>> [ Loading cameraMain from /maya/shots/sh_010 with loader ReferenceLoader
Loader arguments used :  ] 
# ayon_core.pipeline.load.utils : Running 'ReferenceLoader' on '/maya/shots/sh_010'
# ProductLoader : {'attach_to_root': True, 'group_name': 'sh_010_cameraMain_01_:_GRP'}
# File read in  0.0057 seconds.
# # *** WRN: >>> { <ayon_maya.api.workfile_template_builder.MayaTemplateBuilder object at 0x00000240B0BBF350> }: [ Failed to process placeholder |Camera|Context_camera_folder with plugin MayaPlaceholderLoadPlugin ] 
# ===================
# Object | is invalid
# ===================
# Traceback (most recent call last):
#   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.5.3\ayon_core\pipeline\workfile\workfile_template_builder.py", line 761, in populate_scene_placeholders
#     placeholder_plugin.populate_placeholder(placeholder)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 70, in populate_placeholder
#     self.populate_load_placeholder(placeholder)
#   File "C:\Users\lbate\AppData\Local\Ynput\AYON\addons\core_1.5.3\ayon_core\pipeline\workfile\workfile_template_builder.py", line 1802, in populate_load_placeholder
#     self.load_succeed(placeholder, container)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 80, in load_succeed
#     self._parent_in_hierarchy(placeholder, container)
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\plugins\workfile_build\load_placeholder.py", line 103, in _parent_in_hierarchy
#     parent = get_node_parent(container_root)
#              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "C:\Work\REPO\ayon-maya\client\ayon_maya\api\lib.py", line 2332, in get_node_parent
#     parents = cmds.listRelatives(node, parent=True, fullPath=True)
#               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Object | is invalid
# # >>> [ Loading rendersetupMain from /maya/shots/sh_010 with loader RenderSetupLoader
Loader arguments used :  ] 
# ayon_core.pipeline.load.utils : Running 'RenderSetupLoader' on '/maya/shots/sh_010'
# ProductLoader : >>> loading json [ C:\projects\Ayon_Tests\maya\shots\sh_010\publish\rendersetup\rendersetupMain\v001\ATS_sh_010_rendersetupMain_v001.json ]
[mtoa] upgrading to new AOV driver/filter setup
# Warning: The default node 'defaultRenderGlobals' does not have attribute 'defaultSurfaceShader'
# Warning: The default node 'defaultArnoldRenderOptions' does not have attribute 'ARV_options'
# Warning: The default node 'defaultArnoldRenderOptions' does not have attribute 'sssUseAutobump'
# Error: Wrong render setup file
# ProductLoader : >>> containerising [ rendersetupMain ]
# >>> [ Assigning look lookMain for placeholder: < PlaceholderItem AssignLook_lookMain > ] 
# pyblish.ValidateOutRelatedNodeIds : Plugin ValidateOutRelatedNodeIds - Attr: active -> True
# pyblish.ValidateOutRelatedNodeIds : Plugin ValidateOutRelatedNodeIds - Attr: enabled -> True
# pyblish.ValidateOutRelatedNodeIds : Plugin ValidateOutRelatedNodeIds - Attr: optional -> False
# pyblish.ValidateRigOutSetNodeIds : Plugin ValidateRigOutSetNodeIds - Attr: allow_history_only -> False
# pyblish.ValidateRigOutSetNodeIds : Plugin ValidateRigOutSetNodeIds - Attr: enabled -> True
# pyblish.ValidateRigOutSetNodeIds : Plugin ValidateRigOutSetNodeIds - Attr: optional -> False
# pyblish.ValidateSkeletonRigOutSetNodeIds : Plugin ValidateSkeletonRigOutSetNodeIds - Attr: allow_history_only -> False
# pyblish.ValidateSkeletonRigOutSetNodeIds : Plugin ValidateSkeletonRigOutSetNodeIds - Attr: enabled -> False
# pyblish.ValidateSkeletonRigOutSetNodeIds : Plugin ValidateSkeletonRigOutSetNodeIds - Attr: optional -> False

also my loaded products been off the groups for some reason:

image

@BigRoy
Copy link
Contributor Author

BigRoy commented Nov 23, 2025

@LiborBatek can you try again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants