ynput / ayon-usd

USD Addon for AYON.
Apache License 2.0
4 stars 1 forks source link

Integrate pinning file fails with Houdini Explicit Layer Save products #75

Open BigRoy opened 2 weeks ago

BigRoy commented 2 weeks ago

Is there an existing issue for this?

Current Behavior:

The instances that are created at publish time for Houdini explicit layer save paths do not have any instance.data["stagingDir"] or instance.data["ifdPath"] set. Hence the pinning file generation errors on it because it requires either of those attributes to be set.

Expected Behavior:

It should pass fine - or better even, pinning file generation should not occur for those instances.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Create a USD publish with a layer that has Explicit Layer Save Path set in Houdini

Are there any labels you wish to add?

Relevant log output:

DEBUG: No staging directory on instance found.
ERROR: No staging directory found.
Traceback (most recent call last):
  File "/home/ynput/Documents/GitHub/Lyonh/AyonDev/repos/ayon-usd/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py", line 58, in process
    staging_dir = Path(instance.data["stagingDir"])
KeyError: 'stagingDir'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ynput/Documents/GitHub/Lyonh/AyonDev/repos/ayon-usd/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py", line 62, in process
    staging_dir = Path(instance.data["ifdFile"]).parent
KeyError: 'ifdFile'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ynput/.local/share/AYON/dependency_packages/ayon_2406251627_linux-rocky9.zip/dependencies/pyblish/plugin.py", line 528, in __explicit_process
    runner(*args)
  File "/home/ynput/Documents/GitHub/Lyonh/AyonDev/repos/ayon-usd/client/ayon_usd/plugins/publish/extract_skeleton_pinning_json.py", line 65, in process
    raise KnownPublishError("Cannot determine staging directory.") from e
ayon_core.pipeline.publish.publish_plugins.KnownPublishError: Cannot determine staging directory.

Additional context:

For context on explicit layer save paths also see: https://github.com/ynput/ayon-houdini/pull/146

Lypsolon commented 2 weeks ago

First thing i ran into is the following error when using Deadline.

2024-10-31 14:06:49:  0: STDOUT:   File "/home/ynput/.local/share/AYON/addons/applications_0.2.4/ayon_applications/manager.py", line 581, in run_prelaunch_hooks
2024-10-31 14:06:49:  0: STDOUT:     prelaunch_hook.execute()
2024-10-31 14:06:49:  0: STDOUT:   File "/home/ynput/Documents/GitHub/Lyonh/AyonDev/repos/ayon-usd/client/ayon_usd/hooks/usd_pinning_root.py", line 24, in execute
2024-10-31 14:06:49:  0: STDOUT:     roots = anatomy.roots()
2024-10-31 14:06:49:  0: STDOUT: TypeError: 'dict' object is not callable