Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maya: Account for no nodes in container #370

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

tokejepsen
Copy link
Member

Changelog Description

When builder a template with renderSetup product, this error would occur since renderSetup product now does not return any roots after #310;

# Error: AssertionError: file C:\Users\tokejepsen\ayon-core\client\ayon_core\hosts\maya\api\testing\tests.py line 251: Failed to process placeholder "|Context_rendersetup_folder_template_json" with plugin "MayaPlaceholderLoadPlugin"
# Traceback (most recent call last):
#   File "C:\Users\tokejepsen\ayon-core\client\ayon_core\pipeline\workfile\workfile_template_builder.py", line 717, in populate_scene_placeholders
#     placeholder_plugin.populate_placeholder(placeholder)
#   File "C:\Users\tokejepsen\ayon-core\client\ayon_core\hosts\maya\api\workfile_template_builder.py", line 246, in populate_placeholder
#     self.populate_load_placeholder(placeholder)
#   File "C:\Users\tokejepsen\ayon-core\client\ayon_core\pipeline\workfile\workfile_template_builder.py", line 1639, in populate_load_placeholder
#     self.load_succeed(placeholder, container)
#   File "C:\Users\tokejepsen\ayon-core\client\ayon_core\hosts\maya\api\workfile_template_builder.py", line 280, in load_succeed
#     self._parent_in_hierarchy(placeholder, container)
#   File "C:\Users\tokejepsen\ayon-core\client\ayon_core\hosts\maya\api\workfile_template_builder.py", line 302, in _parent_in_hierarchy
#     for root in roots:
# TypeError: 'NoneType' object is not iterable

Testing notes:

  1. Setup placeholder with renderSetup product in Maya.
  2. Build the templated workfile.

@tokejepsen tokejepsen requested a review from BigRoy April 4, 2024 09:34
@ynbot ynbot added size/XS type: bug Something isn't working host: Maya labels Apr 4, 2024
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test - but code change makes sense. maya.cmds.sets does indeed return None when empty.

Copy link
Member

@moonyuet moonyuet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully in maya.

@iLLiCiTiT iLLiCiTiT merged commit 37f11f9 into develop Apr 5, 2024
10 of 11 checks passed
@iLLiCiTiT iLLiCiTiT deleted the bugfix/maya_fix_templated_workfile_builder branch April 5, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: Maya size/XS type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants