-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add profiles to 'CollectFramesFixDef' settings #839
Add profiles to 'CollectFramesFixDef' settings #839
Conversation
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.
would it be better to create a new class to inherit from CollectFramesDef
class for Houdini? Something like:
class CollectFramesFixDefHou(CollectFramesDef):
"""Provides text field to insert frame(s) to be rerendered for Houdini host.
Published files of last version of an instance product are collected into
instance.data["last_version_published_files"]. All these but frames
mentioned in text field will be reused for new version.
"""
label = "Collect Frames to Fix (Houdini)"
hosts = ["houdini"]
families = ["*"]
rewrite_version_enable = False
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.
Cool idea but I still need to expose families to settings which will seem like we are duplicating the settings.
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.
I can imagine implementing your idea as the following snippet:
and then I can add the dedicated settings in Houdini's addon.
from ayon_core.plugins.publish.collect_frames_fix import CollectFramesDef
class CollectFramesFixDefHou(CollectFramesDef):
"""Provides text field to insert frame(s) to be rerendered for Houdini host.
Published files of last version of an instance product are collected into
instance.data["last_version_published_files"]. All these but frames
mentioned in text field will be reused for new version.
"""
label = "Collect Frames to Fix (Houdini)"
hosts = ["houdini"] # Note how I still need to define `hosts` as I'm not using `plugin.HoudiniInstancePlugin`
families = ["*"]
rewrite_version_enable = False
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.
Guess this is the better temp solution if you want it to be specific as Houdini validator. But like @iLLiCiTiT said, it requires some discussion.
But I just want to add that the profile setting broke something in unreal publisher when I was using this branch to build the addon setting and put it into server.
The profile settings may not be the best options for this case as it affects all hosts.
To be honest I don't know how to handle these plugins. From my point of view the plugin should have only The issue is, that if you enable this plugin for nuke, only nuke addon knows what instances (families) should be handled with this plugin, it is not something that a TD who is changing the settings should know. The same for houdini, how do TD know which families he should (can) set? |
I think it might fail
Totally agreed! I've provided more info in my reply on discord. |
…-last-publish_core-twin
Any update on this PR or? |
Discussion is still alive. Is this feature that should be already done (for client)? If yes then please create houdini equivalent of the plugin in houdini addon please. |
Closing this PR in favor of #839 (comment) .. I've copied the plugin to my ayon-houdini PR ynput/ayon-houdini#45. |
Can we make this part of the "Extended Publisher" target @dee-ynput @iLLiCiTiT ? Or find another spot to track this well enough. I understand the reason to moe this to |
@MustafaJafar can we for now, maybe, in core
instance.data["frames_to_fix"] = blabla
instance.data["rewrite_to_last_version"] = True Do note that I believe there are other ways of specifying that you want to write into the existing version, e.g. wouldn't just setting
By doing so, we can still "move" Houdini-specific logic for the time being, but ALL we'd be putting there is a I believe we can even do this: import ayon_core.plugins.publish.collect_frames_fix as frames_fix
class CollectFramesToFixHoudini(frames_fix.CollectFramesToFix):
hosts = ["houdini"]
families = ["*"] Or create a dedicated 'base class' for now in some other place in core if we don't even want to duplicate the instance attribute definitions and WHAT attributes it sets on And then we should also move this logic out of nuke... and into something "dedicated" for that |
@BigRoy Your idea makes sense. let me give it a try. |
or maybe I'll do it in another PR. but could we have an issue for it? |
Could we rather make it family based on ayon-core with backwards compatibility? class CollectFramesToFix(CollectFramesToFix):
families = ["ayon.fix.frames"]
...Implementation...
# Backwards compatibility
class CollectFramesToFixOld(CollectFramesToFix):
hosts = ["nuke"]
families = ["render", "prerender"] So only thing houdini has to do, is to add |
Almost - because the publisher UI won't show attributes for 'dynamic' families like that, only for the product type. Also, that'd mean that the Becuase preferably you'd even share the input field itself among them, yes? So that tooltip etc. is all maintained in one place? |
Ok, I see this is more important than I thought #860 |
Just realized this might not solve the issue. Another issue is importing plugin from NOTE: |
Here it is: #879 |
Changelog Description
Add profiles to 'CollectFramesFixDef' settings
Additional info
This PR is the twin of Houdini's PR ynput/ayon-houdini#45
Testing notes:
frames to fix
in the publisher UI. (but, it won't fix anything without the mentioned PR above )