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

Maya: Workfile Templates implement Assign Look placeholder #437

Conversation

BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented Apr 19, 2024

Changelog Description

Implement a workfile template placeholder plug-in for maya that will create an object set that on populating workfile template will assign the look to all nodes inside the set, including any generated loads from other load placeholders.

This way you can dynamically automatically assign looks on loaded content in workfile templates.

Additional info

This PR relies on:

I'll keep this PR as a draft until all of those are merged.

Testing notes:

  1. Create a workfile template with the assign look placeholder.
  2. The placeholder should be clear to use and do what is described above.
  3. The created template should work.

@ynbot ynbot added size/XXL host: After Effects host: Maya host: Nuke type: enhancement Improvement of existing functionality or minor addition labels Apr 19, 2024
BigRoy added 6 commits April 19, 2024 22:36
…ncement/maya_template_add_assign_look_placeholder

# Conflicts:
#	client/ayon_core/hosts/maya/plugins/workfile_build/assign_look_placeholder.py
…ement/maya_template_add_assign_look_placeholder
…ncement/maya_template_add_assign_look_placeholder
…ncement/maya_template_add_assign_look_placeholder
@BigRoy BigRoy marked this pull request as ready for review May 3, 2024 18:21
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.

Looks good, but the recursive toggle does not seem to work:

Capture

Even with the toggle off, the look is still assigned to placeholder loaded content. Not whether we should even have this toggle? What is the use case for it?

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.

Works for me! Nice little feature...

Screenshot 2024-05-06 164824

Small note on Recursive...didnt find a way to take it into account, as to me it always behaves recursively (its just enough to include parent groups for loaded assets to get look assign to them, which is nice in the end :)

@BigRoy
Copy link
Collaborator Author

BigRoy commented May 6, 2024

Even with the toggle off, the look is still assigned to placeholder loaded content. Not whether we should even have this toggle? What is the use case for it?

Small note on Recursive...didnt find a way to take it into account, as to me it always behaves recursively (its just enough to include parent groups for loaded assets to get look assign to them, which is nice in the end :)

@LiborBatek @tokejepsen I think you both thought that "recursive" means "apply to all children hierarchy" and thus expected children meshes to also get assigned or not? It does not mean that. It instead means that say your workfile template, loads a file, e.g. a maya scene that in itself also has placeholders that those placeholders inside that file will also get the look assigned, recursively.

When disabled, it will only assign the look on placeholders that should've existed after the initial first load of placeholders, and not those that are recursively included from templates that were loaded in the first iteration. So that the child template being loaded it in itself can also use the assign look placeholder to 'encompass' assignments within itself that are not overridden by the parent template (or it would get overridden if the parent template is recursive, etc.

Does that clarify things?

So in short, imagine:

  • Workfile template loads placeholders (iteration 1)
  • Where the loaded content of those placeholders, also contains placeholders (iteration 2 of template builder)
  • Then that loaded content also contains placeholders. (iteration 3 of template builder).

The recursiveness would be going through such nesting.

@tokejepsen
Copy link
Member

Does that clarify things?

It does clarify it and its a neat feature I hadn't thought of. But think we'll need some documentation, tooltip or label description for that toggle. Would be a good way for people to discover the recursive workflow as well.

@LiborBatek
Copy link
Member

@BigRoy really cool...also never thought this might be possible! ...I think it would be cool to discuss the templates and workflows in general...and update the user docs, as I can see there is still a lot to cover aka lots of things not covered ! (as I am finding more and more features of the templates workflow every day!)

BigRoy added 3 commits June 3, 2024 22:59
…ancement/maya_template_add_assign_look_placeholder

# Conflicts:
#	server_addon/maya/client/ayon_maya/plugins/workfile_build/assign_look_placeholder.py
@BigRoy
Copy link
Collaborator Author

BigRoy commented Jun 3, 2024

I've made the PR compatible with the moved client code of ayon_maya
I've also expanded the tooltip slightly for the recursive toggle. It's not much, but may just help enough.

But think we'll need some documentation, tooltip or label description for that toggle. Would be a good way for people to discover the recursive workflow as well.

Having documentation would be nice - but as far as I know that's a separate repo currently? Is that something you may be able to contribute knowledge for @LiborBatek - especially because recently on discord I recall you sharing some workfile template videos that might be nice there too (or even just some written demo of the general workfile templates workflow maybe?)

@BigRoy BigRoy requested review from tokejepsen and LiborBatek June 3, 2024 21:11
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.

All works for me!

image

I re did the tests and all seem functional. Also hints present whats the feature for...LGTM

@LiborBatek LiborBatek dismissed tokejepsen’s stale review June 5, 2024 07:14

not an issue and been resolved by adding tip msg

@LiborBatek LiborBatek removed the request for review from tokejepsen June 5, 2024 07:14
@LiborBatek LiborBatek merged commit 4dc0e6c into ynput:develop Jun 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host: Maya size/XXL type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants