mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #5389 from ynput/enhancement/OP-6499_nuke-split-instance-attributes-to-range-channels-order
This commit is contained in:
commit
8aff65143d
5 changed files with 23 additions and 16 deletions
|
|
@ -262,6 +262,17 @@ class NukeWriteCreator(NukeCreator):
|
|||
family = "write"
|
||||
icon = "sign-out"
|
||||
|
||||
def get_linked_knobs(self):
|
||||
linked_knobs = []
|
||||
if "channels" in self.instance_attributes:
|
||||
linked_knobs.append("channels")
|
||||
if "ordered" in self.instance_attributes:
|
||||
linked_knobs.append("render_order")
|
||||
if "use_range_limit" in self.instance_attributes:
|
||||
linked_knobs.extend(["___", "first", "last", "use_limit"])
|
||||
|
||||
return linked_knobs
|
||||
|
||||
def integrate_links(self, node, outputs=True):
|
||||
# skip if no selection
|
||||
if not self.selected_node:
|
||||
|
|
|
|||
|
|
@ -64,9 +64,6 @@ class CreateWriteImage(napi.NukeWriteCreator):
|
|||
)
|
||||
|
||||
def create_instance_node(self, subset_name, instance_data):
|
||||
linked_knobs_ = []
|
||||
if "use_range_limit" in self.instance_attributes:
|
||||
linked_knobs_ = ["channels", "___", "first", "last", "use_limit"]
|
||||
|
||||
# add fpath_template
|
||||
write_data = {
|
||||
|
|
@ -81,7 +78,7 @@ class CreateWriteImage(napi.NukeWriteCreator):
|
|||
write_data,
|
||||
input=self.selected_node,
|
||||
prenodes=self.prenodes,
|
||||
linked_knobs=linked_knobs_,
|
||||
linked_knobs=self.get_linked_knobs(),
|
||||
**{
|
||||
"frame": nuke.frame()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,12 +45,6 @@ class CreateWritePrerender(napi.NukeWriteCreator):
|
|||
return attr_defs
|
||||
|
||||
def create_instance_node(self, subset_name, instance_data):
|
||||
linked_knobs_ = []
|
||||
if "use_range_limit" in self.instance_attributes:
|
||||
linked_knobs_ = ["channels", "___", "first", "last", "use_limit"]
|
||||
|
||||
linked_knobs_.append("render_order")
|
||||
|
||||
# add fpath_template
|
||||
write_data = {
|
||||
"creator": self.__class__.__name__,
|
||||
|
|
@ -73,7 +67,7 @@ class CreateWritePrerender(napi.NukeWriteCreator):
|
|||
write_data,
|
||||
input=self.selected_node,
|
||||
prenodes=self.prenodes,
|
||||
linked_knobs=linked_knobs_,
|
||||
linked_knobs=self.get_linked_knobs(),
|
||||
**{
|
||||
"width": width,
|
||||
"height": height
|
||||
|
|
|
|||
|
|
@ -39,10 +39,6 @@ class CreateWriteRender(napi.NukeWriteCreator):
|
|||
return attr_defs
|
||||
|
||||
def create_instance_node(self, subset_name, instance_data):
|
||||
linked_knobs_ = [
|
||||
"channels", "___", "first", "last", "use_limit", "render_order"
|
||||
]
|
||||
|
||||
# add fpath_template
|
||||
write_data = {
|
||||
"creator": self.__class__.__name__,
|
||||
|
|
@ -60,12 +56,15 @@ class CreateWriteRender(napi.NukeWriteCreator):
|
|||
actual_format = nuke.root().knob('format').value()
|
||||
width, height = (actual_format.width(), actual_format.height())
|
||||
|
||||
self.log.debug(">>>>>>> : {}".format(self.instance_attributes))
|
||||
self.log.debug(">>>>>>> : {}".format(self.get_linked_knobs()))
|
||||
|
||||
created_node = napi.create_write_node(
|
||||
subset_name,
|
||||
write_data,
|
||||
input=self.selected_node,
|
||||
prenodes=self.prenodes,
|
||||
linked_knobs=linked_knobs_,
|
||||
linked_knobs=self.get_linked_knobs(),
|
||||
**{
|
||||
"width": width,
|
||||
"height": height
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@
|
|||
},
|
||||
{
|
||||
"use_range_limit": "Use range limit"
|
||||
},
|
||||
{
|
||||
"ordered": "Defined order"
|
||||
},
|
||||
{
|
||||
"channels": "Channels override"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue