mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #5051 from Zipodod/bugfix/napi_use_inpanel
This commit is contained in:
commit
57bc75f2bd
8 changed files with 51 additions and 46 deletions
|
|
@ -553,7 +553,9 @@ def add_write_node_legacy(name, **kwarg):
|
|||
|
||||
w = nuke.createNode(
|
||||
"Write",
|
||||
"name {}".format(name))
|
||||
"name {}".format(name),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
w["file"].setValue(kwarg["file"])
|
||||
|
||||
|
|
@ -589,7 +591,9 @@ def add_write_node(name, file_path, knobs, **kwarg):
|
|||
|
||||
w = nuke.createNode(
|
||||
"Write",
|
||||
"name {}".format(name))
|
||||
"name {}".format(name),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
w["file"].setValue(file_path)
|
||||
|
||||
|
|
@ -1192,8 +1196,10 @@ def create_prenodes(
|
|||
|
||||
# create node
|
||||
now_node = nuke.createNode(
|
||||
nodeclass, "name {}".format(name))
|
||||
now_node.hideControlPanel()
|
||||
nodeclass,
|
||||
"name {}".format(name),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
# add for dependency linking
|
||||
for_dependency[name] = {
|
||||
|
|
@ -1317,12 +1323,17 @@ def create_write_node(
|
|||
input_name = str(input.name()).replace(" ", "")
|
||||
# if connected input node was defined
|
||||
prev_node = nuke.createNode(
|
||||
"Input", "name {}".format(input_name))
|
||||
"Input",
|
||||
"name {}".format(input_name),
|
||||
inpanel=False
|
||||
)
|
||||
else:
|
||||
# generic input node connected to nothing
|
||||
prev_node = nuke.createNode(
|
||||
"Input", "name {}".format("rgba"))
|
||||
prev_node.hideControlPanel()
|
||||
"Input",
|
||||
"name {}".format("rgba"),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
# creating pre-write nodes `prenodes`
|
||||
last_prenode = create_prenodes(
|
||||
|
|
@ -1342,15 +1353,13 @@ def create_write_node(
|
|||
imageio_writes["knobs"],
|
||||
**data
|
||||
)
|
||||
write_node.hideControlPanel()
|
||||
# connect to previous node
|
||||
now_node.setInput(0, prev_node)
|
||||
|
||||
# switch actual node to previous
|
||||
prev_node = now_node
|
||||
|
||||
now_node = nuke.createNode("Output", "name Output1")
|
||||
now_node.hideControlPanel()
|
||||
now_node = nuke.createNode("Output", "name Output1", inpanel=False)
|
||||
|
||||
# connect to previous node
|
||||
now_node.setInput(0, prev_node)
|
||||
|
|
@ -1517,8 +1526,10 @@ def create_write_node_legacy(
|
|||
else:
|
||||
# generic input node connected to nothing
|
||||
prev_node = nuke.createNode(
|
||||
"Input", "name {}".format("rgba"))
|
||||
prev_node.hideControlPanel()
|
||||
"Input",
|
||||
"name {}".format("rgba"),
|
||||
inpanel=False
|
||||
)
|
||||
# creating pre-write nodes `prenodes`
|
||||
if prenodes:
|
||||
for node in prenodes:
|
||||
|
|
@ -1530,8 +1541,10 @@ def create_write_node_legacy(
|
|||
|
||||
# create node
|
||||
now_node = nuke.createNode(
|
||||
klass, "name {}".format(pre_node_name))
|
||||
now_node.hideControlPanel()
|
||||
klass,
|
||||
"name {}".format(pre_node_name),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
# add data to knob
|
||||
for _knob in knobs:
|
||||
|
|
@ -1561,14 +1574,18 @@ def create_write_node_legacy(
|
|||
if isinstance(dependent, (tuple or list)):
|
||||
for i, node_name in enumerate(dependent):
|
||||
input_node = nuke.createNode(
|
||||
"Input", "name {}".format(node_name))
|
||||
input_node.hideControlPanel()
|
||||
"Input",
|
||||
"name {}".format(node_name),
|
||||
inpanel=False
|
||||
)
|
||||
now_node.setInput(1, input_node)
|
||||
|
||||
elif isinstance(dependent, str):
|
||||
input_node = nuke.createNode(
|
||||
"Input", "name {}".format(node_name))
|
||||
input_node.hideControlPanel()
|
||||
"Input",
|
||||
"name {}".format(node_name),
|
||||
inpanel=False
|
||||
)
|
||||
now_node.setInput(0, input_node)
|
||||
|
||||
else:
|
||||
|
|
@ -1583,15 +1600,13 @@ def create_write_node_legacy(
|
|||
"inside_{}".format(name),
|
||||
**_data
|
||||
)
|
||||
write_node.hideControlPanel()
|
||||
# connect to previous node
|
||||
now_node.setInput(0, prev_node)
|
||||
|
||||
# switch actual node to previous
|
||||
prev_node = now_node
|
||||
|
||||
now_node = nuke.createNode("Output", "name Output1")
|
||||
now_node.hideControlPanel()
|
||||
now_node = nuke.createNode("Output", "name Output1", inpanel=False)
|
||||
|
||||
# connect to previous node
|
||||
now_node.setInput(0, prev_node)
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ class AlembicCameraLoader(load.LoaderPlugin):
|
|||
object_name, file),
|
||||
inpanel=False
|
||||
)
|
||||
# hide property panel
|
||||
camera_node.hideControlPanel()
|
||||
|
||||
camera_node.forceValidate()
|
||||
camera_node["frame_rate"].setValue(float(fps))
|
||||
|
|
|
|||
|
|
@ -144,10 +144,9 @@ class LoadClip(plugin.NukeLoader):
|
|||
# Create the Loader with the filename path set
|
||||
read_node = nuke.createNode(
|
||||
"Read",
|
||||
"name {}".format(read_name))
|
||||
|
||||
# hide property panel
|
||||
read_node.hideControlPanel()
|
||||
"name {}".format(read_name),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
# to avoid multiple undo steps for rest of process
|
||||
# we will switch off undo-ing
|
||||
|
|
|
|||
|
|
@ -88,10 +88,9 @@ class LoadEffects(load.LoaderPlugin):
|
|||
|
||||
GN = nuke.createNode(
|
||||
"Group",
|
||||
"name {}_1".format(object_name))
|
||||
|
||||
# hide property panel
|
||||
GN.hideControlPanel()
|
||||
"name {}_1".format(object_name),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
# adding content to the group node
|
||||
with GN:
|
||||
|
|
|
|||
|
|
@ -89,10 +89,9 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
|
|||
|
||||
GN = nuke.createNode(
|
||||
"Group",
|
||||
"name {}_1".format(object_name))
|
||||
|
||||
# hide property panel
|
||||
GN.hideControlPanel()
|
||||
"name {}_1".format(object_name),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
# adding content to the group node
|
||||
with GN:
|
||||
|
|
|
|||
|
|
@ -119,10 +119,9 @@ class LoadImage(load.LoaderPlugin):
|
|||
with viewer_update_and_undo_stop():
|
||||
r = nuke.createNode(
|
||||
"Read",
|
||||
"name {}".format(read_name))
|
||||
|
||||
# hide property panel
|
||||
r.hideControlPanel()
|
||||
"name {}".format(read_name),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
r["file"].setValue(file)
|
||||
|
||||
|
|
|
|||
|
|
@ -65,9 +65,6 @@ class AlembicModelLoader(load.LoaderPlugin):
|
|||
inpanel=False
|
||||
)
|
||||
|
||||
# hide property panel
|
||||
model_node.hideControlPanel()
|
||||
|
||||
model_node.forceValidate()
|
||||
|
||||
# Ensure all items are imported and selected.
|
||||
|
|
|
|||
|
|
@ -70,10 +70,9 @@ class LinkAsGroup(load.LoaderPlugin):
|
|||
# P = nuke.nodes.LiveGroup("file {}".format(file))
|
||||
P = nuke.createNode(
|
||||
"Precomp",
|
||||
"file {}".format(file))
|
||||
|
||||
# hide property panel
|
||||
P.hideControlPanel()
|
||||
"file {}".format(file),
|
||||
inpanel=False
|
||||
)
|
||||
|
||||
# Set colorspace defined in version data
|
||||
colorspace = context["version"]["data"].get("colorspace", None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue