add get publish families function - #163
Conversation
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
| created_instance = CreatedInstance.from_existing( | ||
| read(rt.GetNodeByName(instance)), self | ||
| ) | ||
| read(rt.GetNodeByName(instance)), self) |
There was a problem hiding this comment.
The suggestion did not remove the original creation of instance
There was a problem hiding this comment.
There is some issue hit when resolving the syntax error on the code. Should be fixed in 41e0b0e
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
…tead doing it in collecting instances
BigRoy
left a comment
There was a problem hiding this comment.
Looking pretty good - still think there's no reason to store families data into the scene file.
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
There was a problem hiding this comment.
Just need to update what we pass to imprint.
Also, the same should be applied here: https://github.com/ynput/ayon-3dsmax/pull/163/changes#diff-0631ddaff52c19c6bda2ab647fd5953ddec3cb53f5a999cce3ed6ee5f38d66cfR475
What I did in other integrations was have just a def imprint_instance_node(self, node, data): or alike on the plug-in that both would call, to then strip out the instance specific data.
Both collect and update instances would then imprint the data using that one.
This gives you the benefit that if a subclass has additional metadata that you don't want to store, you just override it's imprint_instance_node method to add some data changing before hand, regardless of where you're imprinting.
|
Above comment is still valid - still lacking on |
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
There was a problem hiding this comment.
LGTM - needs testing by @LiborBatek
Should also probably test publishing in general.
There was a problem hiding this comment.
🟡 Changes recommended
There are confirmed robustness/behavior issues in creator collection/imprinting (missing node guard; in-place data mutation; inconsistent application of published families during create) that can break instance discovery or make get_published_families() unreliable.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces a get_published_families() hook on 3ds Max creators and uses it to attach an additional family (custom.frame.range) to Render instances, enabling downstream publish plugins (e.g., custom frame-range collection) to match against that family.
Changes:
- Added
get_published_families()to the Max creator base and applied it during instance collection. - Updated imprinting to go through a dedicated helper (
imprint_instance_node) and refactored cache creator inheritance to reuseMaxCreatorbehavior. - Updated Render creator to publish
custom.frame.rangealongsidemaxrender.
File summaries
| File | Description |
|---|---|
client/ayon_max/plugins/create/create_render.py |
Adds a get_published_families() override so Render instances include custom.frame.range. |
client/ayon_max/api/plugin.py |
Adds/uses get_published_families() in creator collection and centralizes imprinting behavior via a helper method. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| self._add_instance_to_context(instance) | ||
| imprint(instance_node.name, instance.data_to_store()) | ||
| self.imprint_instance_node(instance_node.name, instance.data_to_store()) |
There was a problem hiding this comment.
This does indeed seem to be lacking. The publish families is lacking to be applied around line 358?
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
There was a problem hiding this comment.
I have tested both local render and farm render and also using both RShift and Vray...
The publishes were succesful and properly integrated on AYON.
There was an issue with render camera while rendering on farm tho (and obviously not accidental as it appeared in both RShift and Vray) as my camera was switched to top view for some reason...
Correct one PhysCamera001
While when farm rendered (I gues orthographic Top camera)
Im also enclosing full json publish report (which was succesful)
LiborBatek
left a comment
There was a problem hiding this comment.
It works...we have found it was the corrupted scene causing the issues with camera.
Its working for both local render and farm render
LGTM!
Changelog Description
This PR is to implement the
get_published_familiesin Max Creator and addcustom.frame.rangeas part of the published families in Render Creator.Additional review information
Tested with core: ynput/ayon-core#2040 and deadline: ynput/ayon-deadline#252
Testing notes: