ynput / ayon-usd

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

Create pinning file during publishing #41

Closed antirotor closed 2 months ago

antirotor commented 2 months ago

Changelog Description

Introducing new extractor and integrator to create usd pinning file during publishing. To simplify things, this uses two plugins - extractor just runs to create almost empty json file so it can be integrated in regular way. Then there is integrator that will push the generated version pins to the json file that is run after everything else was already integrated.

Additional info

This is using some code borrowed from https://github.com/ynput/ayon-usd/pull/29 and some from https://github.com/ynput/ayon-core/blob/develop/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py

This needs definitely some cleanup and code moving before the merge, therefor this PR will be just Draft until then.

[!note] For full farm support, you'll need also https://github.com/ynput/ayon-deadline/pull/31

Testing notes:

  1. publish usd product from any DCC
  2. if extract pinning file is enabled, it will produce it

Resolves #28

antirotor commented 2 months ago

I've removed all duplicated and unused functions and also fixed some issue in the standalone libs regarding handling of pinning data dict on windows.

antirotor commented 2 months ago

Since we're in experimental I'll approve this - but there are issues we need to solve down the line.

  1. One may want to use ayon-usd without this, however it cannot be disabled currently. Although it is optional on the plugin itself? Maybe even weirder that both the extractor and integrator are separately optional?
  2. The ClassVar type hint across 'inherited attributes' from other libraries seems odd?

I've removed ClassVar, took the opportunity to remove also some forgotten debug prints and I've made only the Extractor optional. WIthout the Extractor, Integrator wouldn't trigger too so with that, you can enable/disable pinning on publish.

@Lypsolon there is still changers required pending. Should I dismiss your review or will you approve too?

Lypsolon commented 2 months ago

Since we're in experimental I'll approve this - but there are issues we need to solve down the line.

  1. One may want to use ayon-usd without this, however it cannot be disabled currently. Although it is optional on the plugin itself? Maybe even weirder that both the extractor and integrator are separately optional?
  2. The ClassVar type hint across 'inherited attributes' from other libraries seems odd?

I've removed ClassVar, took the opportunity to remove also some forgotten debug prints and I've made only the Extractor optional. WIthout the Extractor, Integrator wouldn't trigger too so with that, you can enable/disable pinning on publish.

@Lypsolon there is still changers required pending. Should I dismiss your review or will you approve too?

you can just dismiss me no problem.