ynput / ayon-maya

Maya addon for AYON
Apache License 2.0
6 stars 9 forks source link

Look Assigner fails to list assets if entries have invalid folder id #84

Closed BigRoy closed 2 months ago

BigRoy commented 2 months ago

Is there an existing issue for this?

Current Behavior:

The Maya Look Assigner tool silently fails to load any asset entries as soon as it, in selection or in scene (depending on UI button you press) it goes over nodes that have an invalid folder id in the cbId attribute. Like for example a cbId still origination from OpenPype.

Expected Behavior:

It should log a warning on invalid ids, but list the others.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Load some assets
  2. Go to the cbId attribute. Remove some characters from before the : in the value.
  3. Try the look assigner on that node - it doesn't list anything. (should log a warning instead!)
  4. Now try that node together with nodes that do have valid ids - it still lists nothing. (should list instead, plus log warning)

Are there any labels you wish to add?

Relevant log output:

# Traceback (most recent call last):
#   File "E:\dev\ayon-maya\client\ayon_maya\tools\mayalookassigner\widgets.py", line 108, in get_selected_assets
#     items = commands.create_items_from_nodes(nodes)
#   File "E:\dev\ayon-maya\client\ayon_maya\tools\mayalookassigner\commands.py", line 136, in create_items_from_nodes
#     folder_entities_by_id = {
#   File "E:\dev\ayon-maya\client\ayon_maya\tools\mayalookassigner\commands.py", line 136, in <dictcomp>
#     folder_entities_by_id = {
#   File "C:\Program Files\Ynput\AYON 1.0.3\dependencies\ayon_api\server_api.py", line 4161, in get_folders
#     for parsed_data in query.continuous_query(self):
#   File "C:\Program Files\Ynput\AYON 1.0.3\dependencies\ayon_api\graphql.py", line 378, in continuous_query
#     raise GraphQlQueryFailed(
# ayon_api.exceptions.GraphQlQueryFailed: GraphQl query Failed: Invalid entity ID ac991b60b4cb11eeb7fc773031a70 on item 'project/folders' (Line 3 Column 5)

Additional context:

No response