Skip to content

Commit

Permalink
Failsafe for exposed_knobs settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tokejepsen committed Feb 16, 2024
1 parent df2c72c commit 94c7b7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/ayon_core/hosts/nuke/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,9 @@ def _remove_old_knobs(node):


def exposed_write_knobs(settings, plugin_name, instance_node):
exposed_knobs = settings["nuke"]["create"][plugin_name]["exposed_knobs"]
exposed_knobs = settings["nuke"]["create"][plugin_name].get(
"exposed_knobs", []
)
if exposed_knobs:
instance_node.addKnob(nuke.Text_Knob('', 'Write Knobs'))
write_node = nuke.allNodes(group=instance_node, filter="Write")[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def process(self, instance):
group_node = instance.data["transientData"]["node"]
nuke_settings = instance.context.data["project_settings"]["nuke"]
create_settings = nuke_settings["create"][plugin]
exposed_knobs = create_settings["exposed_knobs"]
exposed_knobs = create_settings.get("exposed_knobs", [])
unexposed_knobs = []
for knob in exposed_knobs:
if knob not in group_node.knobs():
Expand Down

0 comments on commit 94c7b7c

Please sign in to comment.