Merge pull request #1741 from pypeclub/bugfix/nuke-create-write-no-selection

This commit is contained in:
Jakub Ježek 2021-06-23 13:33:10 +02:00 committed by GitHub
commit 6764aaae34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -128,5 +128,4 @@ class CreateWritePrerender(plugin.PypeCreator):
w_node["first"].setValue(nuke.root()["first_frame"].value())
w_node["last"].setValue(nuke.root()["last_frame"].value())
return write_node

View file

@ -100,6 +100,13 @@ class CreateWriteRender(plugin.PypeCreator):
"/{subset}.{frame}.{ext}")})
# add crop node to cut off all outside of format bounding box
# get width and height
try:
width, height = (selected_node.width(), selected_node.height())
except AttributeError:
actual_format = nuke.root().knob('format').value()
width, height = (actual_format.width(), actual_format.height())
_prenodes = [
{
"name": "Crop01",
@ -108,8 +115,8 @@ class CreateWriteRender(plugin.PypeCreator):
("box", [
0.0,
0.0,
selected_node.width(),
selected_node.height()
width,
height
])
],
"dependent": None