Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3576 from pypeclub/bugfix/OP-3642_Nuke-Local-vs-F…
Browse files Browse the repository at this point in the history
…arm-Publish-family-inconsistency

Nuke: render family integration consistency
  • Loading branch information
jakubjezek001 authored Jul 27, 2022
2 parents bc24787 + 951cc99 commit 0492f01
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
5 changes: 4 additions & 1 deletion openpype/hosts/nuke/plugins/publish/extract_render_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,16 @@ def process(self, instance):
instance.data['family'] = 'render'
families.remove('render.local')
families.insert(0, "render2d")
instance.data["anatomyData"]["family"] = "render"
elif "prerender.local" in families:
instance.data['family'] = 'prerender'
families.remove('prerender.local')
families.insert(0, "prerender")
instance.data["anatomyData"]["family"] = "prerender"
elif "still.local" in families:
instance.data['family'] = 'image'
families.remove('still.local')
instance.data["anatomyData"]["family"] = "image"
instance.data["families"] = families

collections, remainder = clique.assemble(filenames)
Expand All @@ -118,4 +121,4 @@ def process(self, instance):

self.log.info('Finished render')

self.log.debug("instance extracted: {}".format(instance.data))
self.log.debug("_ instance.data: {}".format(instance.data))
17 changes: 10 additions & 7 deletions openpype/hosts/nuke/plugins/publish/precollect_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def process(self, context):
# establish families
family = avalon_knob_data["family"]
families_ak = avalon_knob_data.get("families", [])
families = list()
families = []

# except disabled nodes but exclude backdrops in test
if ("nukenodes" not in family) and (node["disable"].value()):
Expand Down Expand Up @@ -111,10 +111,10 @@ def process(self, context):
self.log.debug("__ families: `{}`".format(families))

# Get format
format = root['format'].value()
resolution_width = format.width()
resolution_height = format.height()
pixel_aspect = format.pixelAspect()
format_ = root['format'].value()
resolution_width = format_.width()
resolution_height = format_.height()
pixel_aspect = format_.pixelAspect()

# get publish knob value
if "publish" not in node.knobs():
Expand All @@ -125,8 +125,11 @@ def process(self, context):
self.log.debug("__ _families_test: `{}`".format(_families_test))
for family_test in _families_test:
if family_test in self.sync_workfile_version_on_families:
self.log.debug("Syncing version with workfile for '{}'"
.format(family_test))
self.log.debug(
"Syncing version with workfile for '{}'".format(
family_test
)
)
# get version to instance for integration
instance.data['version'] = instance.context.data['version']

Expand Down
6 changes: 4 additions & 2 deletions openpype/hosts/nuke/plugins/publish/precollect_writes.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ def process(self, instance):
self.log.debug("colorspace: `{}`".format(colorspace))

version_data = {
"families": [f.replace(".local", "").replace(".farm", "")
for f in _families_test if "write" not in f],
"families": [
_f.replace(".local", "").replace(".farm", "")
for _f in _families_test if "write" != _f
],
"colorspace": colorspace
}

Expand Down

0 comments on commit 0492f01

Please sign in to comment.