CollectLocalRenderInstances: use create_instances_for_aov - #358
CollectLocalRenderInstances: use create_instances_for_aov#358MustafaJafar wants to merge 16 commits into
CollectLocalRenderInstances: use create_instances_for_aov#358Conversation
…aov instances second
MustafaJafar
left a comment
There was a problem hiding this comment.
Here's it. this should work with create_skeleton_instance.
BigRoy
left a comment
There was a problem hiding this comment.
Please use as much as possible from core - so that it uses the exact same logic. We are looking to generalize and unify so that we don't need to duplicate data.
Does it generate too much data on the instance? Possibly. But that may just mean that either in core - we're just redundantly adding too much data. But I'd rather have a key too much here - than have every DCC differ in the data they contain. The end goal is that as much as possible remains the same, even to such an extent that perhaps we'd need almost no changes per integration.
As explained in the issue #356 my preference is that we just take e.g. the Collector from 3dsmax PR, 1:1 and make a comment of the differences that are actually needed.
Then when we have it working between Maya, Max, Houdini and Blender I'd compare all of them - and see where they differ and why... and start generalizing as much as possible. This may mean that down the line we'd just have core CollectLocalRender plug-in one could e.g. inherit from or alike where each integration would only add minimal changes.
The issue we're currently facing is that all integrations are essentially doing their own thing. But preferably, it'd take <15 minutes to reliably add support for local rendering to an integration. Once we have this generalization I'd start rolling out to more integrations where it's currently not supported yet - etc.
In short, if you can use the core create_skeleton_data and it works, please do so. I'm fine with putting some slight logic directly after where we comment # houdini-specific or alike, etc.
…f building the data manually
…ances-avoid-usage-of
|
I think this is the closer I can get to collect local render plugin from other Addons. Standard Local Render CollectorWe didn't agree on a standard yet. but, let's consider these (ynput/ayon-maya#383, ynput/ayon-3dsmax#99 and ynput/ayon-blender#217) as standard.
Houdini local reneder collector
I can remove purple point if you want but the code might set a false thought that families must be added per aov instance at the end although it can be done once at the beginning. @BigRoy Let me know your thoughts. |
I'm not seeing any purple or orange btw ;) Thanks @MustafaJafar - to be entirely clear. The standard I want is:
So that e.g. a DCC would solely need to e.g. (overly simplified) expected_files = instance.data.setdefault('expectedFiles", {})
expected_files["beauty"] = ["/path/to/1", "/path/to/2"]Or potentially keep the metadata close as well, instead of storing instance-wide? expected_files = instance.data.setdefault('expectedFiles", [])
expected_files.append(
RenderProduct(
files=[],
aov_name="beauty",
colorspace="linear"
)
)Or whatever data structure is the minimal amount of inputs we'd need to go through publishing. It'd be along the lines of perhaps a core plug-in that essentially does a 'split-into-other-instances' type of thing based on a list of outputs files on the original instance. (I do think we can actually make that work with e.g. caches as well instead of just image render outputs.) But for now it's focused on exactly trying to not need to have the class CollectLocalRenderInstances(core.SplitInstanceCollector):
# These will be safely deep copied
transfer_keys = {"instance_node"}
# These will transfer, but won't be a unique copy
# and are passed by reference.
transfer_transient_data_keys = {"transientData.x", "
def post_process_instance(
self,
source_instance: pyblish.api.Instance,
child_instance: pyblish.api.Instance
):
# Houdini-integration collects these later
child_instance.data.pop("frameStart")
child_instance.data.pop("frameEnd")
child_instance.data.pop("handleStart")
child_instance.data.pop("handleEnd")
def get_render_products(self, instance) -> list[RenderProduct]:
# Default implementation here could be the conversion
# from `instance.data["expectedFiles"]` and other `instance.data`
# for backwards compatibility
# But preferably this may not need overriding per dcc
...Where transfer keys would end up allowing both complex python objects Re: set representation colorspace, etc. - these currently rely on all being the same across all of the instances and are taken from |
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
|
Let me update this: #358 (comment) Houdini local reneder collector
|
This is the current solution in Houdini. I believe |
…ances-avoid-usage-of
…ances-avoid-usage-of
moonyuet
left a comment
There was a problem hiding this comment.
See comment above as the latest commit errored out the collector:
Traceback (most recent call last):
File "C:\Users\Kayla\AppData\Local\Ynput\AYON\dependency_packages\ayon_2603121036_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
runner(*args)
File "D:\ayon-addon_template\ayon-houdini\client\ayon_houdini\plugins\publish\collect_local_render_instances.py", line 100, in process
self.post_process_skeleton_data(instance, instance_skeleton_data)
TypeError: CollectLocalRenderInstances.post_process_skeleton_data() takes 2 positional arguments but 3 were given
Co-authored-by: Kayla Man <64118225+moonyuet@users.noreply.github.com>
…ances-avoid-usage-of
|
I gave this PR some test runs. And, the result are the usual before the PR. |
…ances-avoid-usage-of
|
@BigRoy Any further comments before merging this? |
…ances-avoid-usage-of
…ances-avoid-usage-of
…ances-avoid-usage-of


Changelog Description
Additional review information
Stop relying on private methods like
_get_legacy_product_name_and_groupThis PR also follow reusing same functions used with deadline and adopted with local render in max and maya.
Personally, I'm not keen on using
ayon_core.pipeline.farm.pyblish_functions.create_skeleton_instancefor local render in Houdini as it can pollute the instance data adding irrelevant and data items that are not used in Houdini addon. which can make it hard to debug in the future.I'm not against using it. and, I'm going to give it a try.
Testing notes: