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

USD Contribution Workflow: Show/hide attributes per instance based on status of other toggles #960

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Oct 21, 2024

Changelog Description

Show/hide attributes per instance for the USD contribution workflow based on status of other toggles in the Publisher UI.

Additional info

Replaces PR #943 which I couldn't seem to retarget to develop anymore

Testing notes:

  1. Create USD instance in Maya, Houdini or Blender
  2. The attributes should update on toggling on/off the toggles for Contribution Worfklow.
  3. Extra test: USD Look publishing in Houdini should still work.

See screenshots:

image
image
image

@BigRoy BigRoy added the type: enhancement Improvement of existing functionality or minor addition label Oct 21, 2024
@BigRoy BigRoy self-assigned this Oct 21, 2024
@ynbot ynbot added the size/XS label Oct 21, 2024
@BigRoy BigRoy requested a review from iLLiCiTiT October 23, 2024 21:47
@MustafaJafar
Copy link
Contributor

MustafaJafar commented Oct 24, 2024

It works in Houdini but, there's a weird error print in the console.
This error was printed 25 times when I refresh the publisher .

ERROR:CreateContext:Failed to get attribute definitions from plugin 'CollectUSDLayerContributionsHoudiniLook'.
Traceback (most recent call last):
  File "E:\Ynput\ayon-core\client\ayon_core\pipeline\create\context.py", line 1254, in bulk_add_instances
    attr_defs = plugin.get_attr_defs_for_instance(
  File "E:\Ynput\ayon-core\client\ayon_core\plugins\publish\extract_usd_layer_contributions.py", line 606, in get_attr_defs_for_instance
    layer_def = next(d for d in defs if d.key == "contribution_layer")
StopIteration

also, the attributes UI of the look product looks weird
image

Here's a reference about how it should look like
image

Copy link
Contributor

@MustafaJafar MustafaJafar left a comment

Choose a reason for hiding this comment

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

Tested in Houdini, Maya and Blender. It works.
The issue mentioned in my previous comments shows only in Houdini.

@MustafaJafar
Copy link
Contributor

MustafaJafar commented Oct 24, 2024

It works in Houdini but, there's a weird error print in the console. This error was printed 25 times when I refresh the publisher .

ERROR:CreateContext:Failed to get attribute definitions from plugin 'CollectUSDLayerContributionsHoudiniLook'.
Traceback (most recent call last):
  File "E:\Ynput\ayon-core\client\ayon_core\pipeline\create\context.py", line 1254, in bulk_add_instances
    attr_defs = plugin.get_attr_defs_for_instance(
  File "E:\Ynput\ayon-core\client\ayon_core\plugins\publish\extract_usd_layer_contributions.py", line 606, in get_attr_defs_for_instance
    layer_def = next(d for d in defs if d.key == "contribution_layer")
StopIteration

I furtherly checked this, firstly I added a print statement inside the CollectUSDLayerContributionsHoudiniLook.get_attr_defs_for_instance
and the print didn't show up for those 25 times I was talking about.
therefore, the "contribution_layer" doesn't exist all the times resulting the next to fail to find any values which is a lot similar to

next(i for i in range(4) if i > 5)

Edit 1: the error is gone when adding the following condition before this line

if not defs:
    return

@BigRoy
Copy link
Collaborator Author

BigRoy commented Oct 24, 2024

Thanks so much for catching that @MustafaJafar. Fixed with 11bb657

@MustafaJafar
Copy link
Contributor

Thanks so much for catching that @MustafaJafar. Fixed with 11bb657

Cool The error has disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants