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

Ignore containers with invalid UUID in representation #1

Merged
merged 5 commits into from
Aug 2, 2024

Conversation

fabiaserra
Copy link
Contributor

Description

When trying to save scenes that contain OpenPype UUIDs in representations Nuke was catching this error and not allowing you to save the scene:

Traceback (most recent call last):
  File "/sw/nuke/15.0v4/plugins/nuke_internal/callbacks.py", line 92, in onScriptSave
    _doCallbacks(onScriptSaves)
  File "/sw/nuke/15.0v4/plugins/nuke_internal/callbacks.py", line 46, in _doCallbacks
    f[0](*f[1],**f[2])
  File "/home/lmenga/.local/share/AYON/addons/nuke_0.2.4-ax.2/ayon_nuke/api/lib.py", line 844, in check_inventory_versions
    for repre_entity in repre_entities:
  File "/pipe/ayon/release/current/dependencies/ayon_api/server_api.py", line 5967, in get_representations
    for parsed_data in query.continuous_query(self):
  File "/pipe/ayon/release/current/dependencies/ayon_api/graphql.py", line 380, in continuous_query
    raise GraphQlQueryFailed(
ayon_api.exceptions.GraphQlQueryFailed: GraphQl query Failed: Invalid entity ID 6500f58ef1d7617e88ffc758 on item 'project/representations' (Line 3 Column 5)
Traceback (most recent call last):

This PR fixes it by reusing existing functions that already address this issue.

How to test

  1. Create a scene and copy some nodes that contain OpenPype UUIDs
  2. Save the scene

… and avoid issue when finding OpenPype invalid containers
@BigRoy BigRoy requested review from jakubjezek001 July 10, 2024 21:02
@BigRoy BigRoy added the type: bug Something isn't working label Jul 10, 2024
client/ayon_nuke/api/lib.py Outdated Show resolved Hide resolved
client/ayon_nuke/api/lib.py Show resolved Hide resolved
Copy link
Contributor

@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.

Code looks good to me.

Initially I wasn't sure about the "private" ._asdict() call to the namedtuple that filter_containers returns but I think there just isn't really a nicer way than that. So, fine with me.

Will leave the color choices and testing to someone else. :)

@BigRoy BigRoy requested a review from LiborBatek July 10, 2024 21:46
- Added loader category colors to constants file.
- Updated lib file to use the new loader category colors constant.
Copy link
Member

@jakubjezek001 jakubjezek001 left a comment

Choose a reason for hiding this comment

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

@fabiaserra I've committed the suggested changes to your fork - thanks for allowing open commits. It's been tested with older OpenPype containers and everything works well.

Regarding what you're seeing in Manager, it shouldn't be an issue as long as it lets you work with the screen.
image

@jakubjezek001 jakubjezek001 requested a review from BigRoy August 1, 2024 15:26
Copy link
Contributor

@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.

Don't have nuke on my end but code looks good!

@fabiaserra
Copy link
Contributor Author

@fabiaserra I've committed the suggested changes to your fork - thanks for allowing open commits. It's been tested with older OpenPype containers and everything works well.

Awesome, thank you!!

@jakubjezek001 jakubjezek001 merged commit d4c3ace into ynput:develop Aug 2, 2024
1 check passed
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.

3 participants