-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support Houdini workfile templates #36
Support Houdini workfile templates #36
Conversation
I truly have my doubts about this Workfile Template Build system for Houdini. With its extremely customizable nature of Houdini I really wonder whether it's worth it to start maintaining this 'building nodes' logic from create placeholders and load placeholders, which also has the burden of making these abstract workfile templates inside a studio where otherwise the studio could literally be working with HDAs and repathing them (already!) dynamically with parms like I understand the merit in having feature parity or similarity between host - but it does feel like we're maybe again abusing our control over Houdini by building a layer over it that feels off? @antirotor @dee-ynput thoughts? |
It is one of the client requests. I understand and agree with your arguments, but on the other hand this is pretty common client request - workfile templates are cool in Maya and Nuke, can we have it in DCC X/Y? With Houdini, I can see many ways around it, mostly connected to the API building blocks/HDAs we can provide to help with customization instead of hindering it. Once we have that, perhaps this will die of but currently there is nothing there of the shelf and implementing what we already have in other DCC seems like a good quick first step. |
Hard to tell why it didn't work for you - works fine for me here, not FBX and that particular loader but some test runs with other data seem fine here.
I think the product types list is defined here and hence takes the currently registered available loaders to define what product types it may load. So it may be correct?
We could update that - it's cosmetics. It's in
It doesn't have to be - it's done in the Creator Placeholders useless?I must admit the Create Placeholder is pretty much useless. Yes, it can prepare an /out node via the Creator, but it can't prepare any of the SOP/LOP paths it will end up exporting or ANY other settings on the ROP node. The user creating the template is much better of actually making the instance. It can predefine output paths, etc. I think we're much better somehow making it that yes can make a template but it'd update the resulting target folder paths on the instances to the template you're building for, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just test out the template settings, it works well accordingly.
But I am not sure if anything additional needs to be added here. If no, I will approve
tbh, I'm not fully aware of how workfile template system works. and I'm not able to tell if there's anything needs to be added. |
@iLLiCiTiT Should I update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code seems fine to me and the earlier test run I did worked.
As said in the comments I have my doubts whether this functionality really makes sense for Houdini in the long term but it may at least serve some workflows for now in the Houdini workflow for clients.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When building the template it opens the template file, and triggers the build process. When finished the "current file" is still that template's filepath. Meaning that pressing CTRL+S overwrites the template file with the already built one.
That's dangerous!
- The user's current filepath should not be imported template file.
Thanks, I was able to reproduce it. ayon-houdini/client/ayon_houdini/api/workfile_template_builder.py Lines 148 to 165 in 5a08621
|
It's due to your implementation - you "opening" the file means basically that is now your file. I believe other hosts may be "importing" it instead OR may be opening but directly 'clearing the current filepath' so that it's not that path anymore. Not sure what the best way to go about it is in Houdini. Potentially you can get by with Another approach could be to do: hou.hipFile.clear()
hou.hipFile.merge(path) Which wouldn't open the file, but just merge the contents. |
@BigRoy @moonyuet
|
I believe Maya does B looking at the source code.
I mean - sure. I think Maya checks if there's a certain "placeholder" root node or whatever and if so assumes it's a 'built scene'. Don't think that's good design but hey that's what it does. You could e.g. set some sort of global attribute or create a global "build" node to detect whether it's a build template or not to do something similar.
Yup - agree that sounds wrong. I thought workfile templates would clear the current scene, but maya doesn't seem to do so... so just importing/merging whatever sounds about right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work as intended.
.
I am okay with merging but we need to be beware that the merging of scene can have some duplicates on the objects when merging one scene to another. |
Houdini's
Anyway, I'd also keep that for a separate PR if it actually becomes a production issue. For now it's trivial to say artists needs to clear their scene first - similar to how it works in other DCCs. |
For information, as mentioned by @iLLiCiTiT on discord. |
Changelog Description
This PR adds support for Houdini workfile templates, Fixes #35.
Templated Workfile Build
settingsworkfile_template_builder.py
create_placeholder.py
inworkfile_build
plugin folderregister_workfile_build_plugin_path
inpipeline.py
AYON
menuload_placeholder.py
Tip
Workfile templates feature doesn't support template keys directly.
However it can support them using Houdini variables e.g.
$JOB
😉Important
This PR won't work properly without ynput/ayon-core#768
Note
User Notes
Dev Notes
More info about Template Builder Actions
HoudiniTemplateBuilder().build_template()
whichimport_template
,populate_placeholder
, create first workfile if specified, keep placeholders if specified.HoudiniTemplateBuilder().rebuild_template()
which repopulate_placeholderHoudiniTemplateBuilder().open_template()
which eventually callshost.open_workfile
, Warning it will open the template file, be aware you may override it by accident.HoudiniTemplateBuilder().create_placeholder()
which leverages workfile template plugins to create different types of placeholders.HoudiniTemplateBuilder().update_placeholder()
which leverages workfile template plugins to update different types of placeholders.Testing notes:
AYON > Template Builder > Create Placeholder...
Templated Workfile Build
settingsTemplate Builder