Skip to content

add get publish families function - #163

Open
moonyuet wants to merge 24 commits into
enhancement/YN-0726--Custom-Frame-Range-Support-for-Local-Renderingfrom
enhancement/implement_get_published_families_for_3dsmax
Open

add get publish families function#163
moonyuet wants to merge 24 commits into
enhancement/YN-0726--Custom-Frame-Range-Support-for-Local-Renderingfrom
enhancement/implement_get_published_families_for_3dsmax

Conversation

@moonyuet

@moonyuet moonyuet commented Sep 4, 2026

Copy link
Copy Markdown
Member

Changelog Description

This PR is to implement the get_published_families in Max Creator and add custom.frame.range as 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:

  1. Tested with the custom frame range
  2. It would work.

@moonyuet moonyuet self-assigned this Sep 4, 2026
@moonyuet moonyuet added type: enhancement Improvement of existing functionality or minor addition sponsored This is directly sponsored by a client or community member labels Sep 4, 2026
Comment thread client/ayon_max/api/plugin.py Outdated
Comment thread client/ayon_max/api/plugin.py Outdated
Comment thread client/ayon_max/api/plugin.py Outdated
moonyuet and others added 3 commits September 4, 2026 20:04
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Comment thread client/ayon_max/api/plugin.py Outdated
Comment on lines +482 to +483
created_instance = CreatedInstance.from_existing(
read(rt.GetNodeByName(instance)), self
)
read(rt.GetNodeByName(instance)), self)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion did not remove the original creation of instance

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some issue hit when resolving the syntax error on the code. Should be fixed in 41e0b0e

Comment thread client/ayon_max/api/plugin.py Outdated
Comment thread client/ayon_max/api/plugin.py Outdated
Comment thread client/ayon_max/api/plugin.py Outdated
moonyuet and others added 3 commits September 5, 2026 10:21
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
@moonyuet
moonyuet requested a review from BigRoy September 5, 2026 02:26

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good - still think there's no reason to store families data into the scene file.

Comment thread client/ayon_max/api/plugin.py Outdated
@moonyuet
moonyuet requested a review from BigRoy September 7, 2026 07:43
Comment thread client/ayon_max/api/lib.py Outdated
Comment thread client/ayon_max/api/plugin.py Outdated
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
@moonyuet
moonyuet requested a review from BigRoy September 7, 2026 09:28

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread client/ayon_max/api/plugin.py Outdated
@moonyuet
moonyuet requested a review from BigRoy September 7, 2026 09:58
@BigRoy

BigRoy commented Sep 7, 2026

Copy link
Copy Markdown
Member

Above comment is still valid - still lacking on collect as pointed out here

Comment thread client/ayon_max/api/plugin.py Outdated
Comment thread client/ayon_max/api/plugin.py Outdated
moonyuet and others added 4 commits September 7, 2026 19:43
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
@moonyuet
moonyuet requested a review from BigRoy September 7, 2026 11:48

@BigRoy BigRoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - needs testing by @LiborBatek

Should also probably test publishing in general.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 reuse MaxCreator behavior.
  • Updated Render creator to publish custom.frame.range alongside maxrender.
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.

Comment on lines 386 to +387
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())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does indeed seem to be lacking. The publish families is lacking to be applied around line 358?

Comment thread client/ayon_max/api/plugin.py
Comment thread client/ayon_max/api/plugin.py
Comment thread client/ayon_max/api/plugin.py Outdated
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
@moonyuet
moonyuet requested a review from LiborBatek September 7, 2026 12:20

@LiborBatek LiborBatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Image

While when farm rendered (I gues orthographic Top camera)

Image

Im also enclosing full json publish report (which was succesful)

max-Vray-publish-report-260908-12-43.json.txt

@moonyuet
moonyuet requested a review from LiborBatek September 8, 2026 14:48

@LiborBatek LiborBatek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants