Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
29e2c73
add get publish families function
moonyuet Sep 4, 2026
38c340f
add custom.frame.range as families
moonyuet Sep 4, 2026
263af34
Update client/ayon_max/api/plugin.py
moonyuet Sep 4, 2026
ced533e
Update client/ayon_max/api/plugin.py
moonyuet Sep 4, 2026
a268268
fix syntax error
moonyuet Sep 4, 2026
41e0b0e
remove the duplicated code
moonyuet Sep 4, 2026
b826969
Update client/ayon_max/api/plugin.py
moonyuet Sep 5, 2026
dc60d89
Update client/ayon_max/api/plugin.py
moonyuet Sep 5, 2026
0a79936
not to storing the publish_families during updating instances but ins…
moonyuet Sep 5, 2026
7e7402f
pop the families data during the imprint data
moonyuet Sep 7, 2026
cc9af7c
pop the families data before the imprint data
moonyuet Sep 7, 2026
ef92bf8
Update client/ayon_max/api/plugin.py
moonyuet Sep 7, 2026
91f641e
clean up
moonyuet Sep 7, 2026
57eb83f
implement the imprint instance node
moonyuet Sep 7, 2026
8c89f14
remove unused import
moonyuet Sep 7, 2026
699f17a
return empty list for get_pre_create_attr_defs()
moonyuet Sep 7, 2026
d4a13eb
Update client/ayon_max/api/plugin.py
moonyuet Sep 7, 2026
199abdb
Update client/ayon_max/api/plugin.py
moonyuet Sep 7, 2026
34b6642
clean up the line
moonyuet Sep 7, 2026
3ee228c
clean up the line
moonyuet Sep 7, 2026
c9d2b0f
add instance_data['families'] for general MaxCreator
moonyuet Sep 7, 2026
4b98064
Update client/ayon_max/api/plugin.py
moonyuet Sep 7, 2026
3430a3b
do not pop instance_node
moonyuet Sep 8, 2026
12d4206
wrong camera argument for local rendering
moonyuet Sep 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions client/ayon_max/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ def create(self, product_name, instance_data, pre_create_data):
" found in tyCache Editor.")
instance_node = self.create_instance_node(product_name)
instance_data["instance_node"] = instance_node.name
instance_data["families"] = self.get_published_families()
product_type = instance_data.get("productType")
if not product_type:
product_type = self.product_base_type
Expand All @@ -479,8 +480,11 @@ def collect_instances(self):
self.cache_instance_data(self.collection_shared_data)
for instance in self.collection_shared_data["max_cached_instances"].get(self.identifier, []): # noqa
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

data = read(rt.GetNodeByName(instance))
if "families" not in data:
data["families"] = self.get_publish_families()
Comment thread
moonyuet marked this conversation as resolved.
Outdated
created_instance = CreatedInstance.from_existing(data, self)
self._add_instance_to_context(created_instance)

def update_instances(self, update_list):
Expand All @@ -500,6 +504,8 @@ def update_instances(self, update_list):
new_product_name))
instance_node = new_product_name
created_inst["instance_node"] = instance_node
if self.get_published_families():
created_inst.data["families"] = self.get_published_families()
Comment thread
moonyuet marked this conversation as resolved.
Outdated
node.name = instance_node

imprint(
Expand All @@ -524,3 +530,6 @@ def remove_instances(self, instances):
rt.Delete(instance_node)

self._remove_instance_from_context(instance)

def get_published_families(self):
Comment thread
moonyuet marked this conversation as resolved.
Outdated
return []
4 changes: 4 additions & 0 deletions client/ayon_max/plugins/create/create_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def create(self, product_name, instance_data, pre_create_data):
filename, _ = os.path.splitext(file)
instance_data["original_workfile_pattern"] = filename.strip(".")
instance_data["multiCamera"] = pre_create_data.get("multi_cam")
instance_data["families"] = self.get_published_families()
num_of_renderlayer = rt.batchRenderMgr.numViews
if num_of_renderlayer > 0:
rt.batchRenderMgr.DeleteView(num_of_renderlayer)
Expand Down Expand Up @@ -81,3 +82,6 @@ def get_pre_create_attr_defs(self):
label="Multiple Cameras Submission",
default=False),
]

def get_published_families(self):
return ["maxrender", "custom.frame.range"]