Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handler creates write under root #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
19 changes: 7 additions & 12 deletions python/tk_nuke_writenode/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,10 @@ def convert_sg_to_nuke_write_nodes(self):
node_name = sg_wn.name()
node_pos = (sg_wn.xpos(), sg_wn.ypos())

# create new regular Write node:
new_wn = nuke.createNode("Write")
new_wn.setSelected(False)
# create new regular Write node in main node graph (see self.get_nodes()):
with nuke.root():
new_wn = nuke.createNode("Write")
new_wn.setSelected(False)

# copy across file & proxy knobs (if we've defined a proxy template):
new_wn["file"].setValue(sg_wn["cached_path"].evaluate())
Expand Down Expand Up @@ -1534,21 +1535,15 @@ def __update_render_path(self, node, force_reset=False, is_proxy=False):

# render path could not be computed for some reason - display warning
# to the user in the property editor:
path_warning += (
path_warning += "{0}<br><br>&nbsp;&nbsp;&nbsp;{1}<br>".format(
"<br>".join(
self.__wrap_text(
"The render path is currently frozen because Toolkit could not "
"determine a valid path! This was due to the following problem:",
60,
)
)
+ "<br>"
)
path_warning += "<br>"
path_warning += (
"&nbsp;&nbsp;&nbsp;"
+ " <br>&nbsp;&nbsp;&nbsp;".join(self.__wrap_text(str(e), 57))
+ " <br>"
),
" <br>&nbsp;&nbsp;&nbsp;".join(self.__wrap_text(str(e), 57)),
)

if cached_path:
Expand Down