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

Workfile Templates: Implement registering and discovering of PlaceholderPlugin #425

Merged

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Apr 17, 2024

Changelog Description

Implement registering and discovering of Workfile Template Build Placeholder Plugins dynamically.

from ayon_core.pipeline import register_template_placeholder_plugin_path
register_template_placeholder_plugin_path("/path/to/workfile_template_plugins")

Additional info

Separated from #327

Testing notes:

Make sure workfile templates still behave as intended (basically existing templates should continue to work)

After Effects
  1. Create placeholders
  2. Build workfile templates (from new ones and existing ones)
Nuke
  1. Create placeholders
  2. Build workfile templates (from new ones and existing ones)
Maya
  1. Create placeholders
  2. Build workfile templates (from new ones and existing ones)

@BigRoy BigRoy requested a review from iLLiCiTiT April 17, 2024 21:32
@ynbot ynbot added size/XXL host: After Effects host: Maya host: Nuke type: enhancement Improvement of existing functionality or minor addition labels Apr 17, 2024
@kalisp
Copy link
Member

kalisp commented Apr 19, 2024

What problem does this solve? I understood you yanked out placeholder creators into separate plugins, but what we gain by that?
You need to touch the (potentially) addon source code to add those either way, is there such a difference to add it in single file or have each creator separately?
It looks little bit nicer though, I guess.

@BigRoy
Copy link
Collaborator Author

BigRoy commented Apr 19, 2024

What problem does this solve? I understood you yanked out placeholder creators into separate plugins, but what we gain by that?
You need to touch the (potentially) addon source code to add those either way, is there such a difference to add it in single file or have each creator separately?

Good question.

We gain:

  • The ability for other addons to also register their own custom placeholder plug-in paths instead of only the Host plug-in being able to provide explicit list of plugins. As such, a custom addon can now also register placeholder plug-ins for maya for example.
  • Automatic reloads. By design these modules are now reloaded on 'discover' similar to how Load and Publish plug-ins work. This may make it much easier for development because changing the code in dev mode directly refreshes the placeholder without needing to restart the DCCs or dangling with importlib.reload yourself.
  • Mimics behavior of other plug-ins. It's much closer to the rest of the AYON ecosystem. They are now managed much more like Creator plug-ins, Loader plug-ins, Pyblish publishing plug-ins, etc. Hopefully making it easier to understand if you are familiar with the other areas of AYON instead of the placeholder plug-ins using a completely different mechanism.

It looks little bit nicer though, I guess.

And that helps as well! :) The fact they now live 'on their own' like this also makes it much easier when reading the code what is related to each other or not. So it also cleans up the code a bit.

Copy link
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

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

I tested in Nuke, AE, Maya.

In Maya everything works fine, in AE and Nuke there are some issues when building workfile. But I dont think these are connected to this PR, I tested same workfile templates in develop and issues seems to be the same.

So I think is PR is not breaking anything, but we need to revisit state of resolving of placeholders for Nuke and AE in develop.

BigRoy added 2 commits April 19, 2024 22:30
Refactor plugin folders `template/` to `workfile_build/`
…ch other constants that do not contain `PLUGIN`
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

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

I have tested creating , updating and using Template files and all seems ok.

No issue have been found.

image

BigRoy added 3 commits April 30, 2024 06:46
…ancement/workfile_templates_register_plugin

# Conflicts:
#	client/ayon_core/hosts/maya/api/workfile_template_builder.py
@BigRoy BigRoy requested review from iLLiCiTiT and tokejepsen April 30, 2024 04:49
Copy link
Member

@tokejepsen tokejepsen left a comment

Choose a reason for hiding this comment

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

Tested successfully in Nuke 15.

@iLLiCiTiT iLLiCiTiT merged commit 8902033 into ynput:develop Apr 30, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: Maya host: Nuke size/XXL type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants