mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
nuke: adding need_thumnail to intermediate representations
This commit is contained in:
parent
07d00ee787
commit
d42a67e814
1 changed files with 32 additions and 3 deletions
|
|
@ -21,6 +21,11 @@ from openpype.pipeline import (
|
||||||
CreatedInstance,
|
CreatedInstance,
|
||||||
get_current_task_name
|
get_current_task_name
|
||||||
)
|
)
|
||||||
|
from openpype.pipeline.colorspace import (
|
||||||
|
get_display_view_colorspace_name,
|
||||||
|
get_colorspace_settings_from_publish_context,
|
||||||
|
set_colorspace_data_to_representation
|
||||||
|
)
|
||||||
from openpype.lib.transcoding import (
|
from openpype.lib.transcoding import (
|
||||||
VIDEO_EXTENSIONS
|
VIDEO_EXTENSIONS
|
||||||
)
|
)
|
||||||
|
|
@ -612,7 +617,7 @@ class ExporterReview(object):
|
||||||
|
|
||||||
def get_representation_data(
|
def get_representation_data(
|
||||||
self, tags=None, range=False,
|
self, tags=None, range=False,
|
||||||
custom_tags=None
|
custom_tags=None, colorspace=None
|
||||||
):
|
):
|
||||||
""" Add representation data to self.data
|
""" Add representation data to self.data
|
||||||
|
|
||||||
|
|
@ -652,6 +657,14 @@ class ExporterReview(object):
|
||||||
if self.publish_on_farm:
|
if self.publish_on_farm:
|
||||||
repre["tags"].append("publish_on_farm")
|
repre["tags"].append("publish_on_farm")
|
||||||
|
|
||||||
|
# add colorspace data to representation
|
||||||
|
if colorspace:
|
||||||
|
set_colorspace_data_to_representation(
|
||||||
|
repre,
|
||||||
|
self.instance.context.data,
|
||||||
|
colorspace=colorspace,
|
||||||
|
log=self.log
|
||||||
|
)
|
||||||
self.data["representations"].append(repre)
|
self.data["representations"].append(repre)
|
||||||
|
|
||||||
def get_imageio_baking_profile(self):
|
def get_imageio_baking_profile(self):
|
||||||
|
|
@ -866,6 +879,13 @@ class ExporterReviewMov(ExporterReview):
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def generate_mov(self, farm=False, **kwargs):
|
def generate_mov(self, farm=False, **kwargs):
|
||||||
|
# colorspace data
|
||||||
|
colorspace = None
|
||||||
|
# get colorspace settings
|
||||||
|
# get colorspace data from context
|
||||||
|
config_data, _ = get_colorspace_settings_from_publish_context(
|
||||||
|
self.instance.context.data)
|
||||||
|
|
||||||
add_tags = []
|
add_tags = []
|
||||||
self.publish_on_farm = farm
|
self.publish_on_farm = farm
|
||||||
read_raw = kwargs["read_raw"]
|
read_raw = kwargs["read_raw"]
|
||||||
|
|
@ -951,6 +971,14 @@ class ExporterReviewMov(ExporterReview):
|
||||||
# assign viewer
|
# assign viewer
|
||||||
dag_node["view"].setValue(viewer)
|
dag_node["view"].setValue(viewer)
|
||||||
|
|
||||||
|
if config_data:
|
||||||
|
# convert display and view to colorspace
|
||||||
|
colorspace = get_display_view_colorspace_name(
|
||||||
|
config_path=config_data["path"],
|
||||||
|
display=display,
|
||||||
|
view=viewer
|
||||||
|
)
|
||||||
|
|
||||||
self._connect_to_above_nodes(dag_node, subset, "OCIODisplay... `{}`")
|
self._connect_to_above_nodes(dag_node, subset, "OCIODisplay... `{}`")
|
||||||
# Write node
|
# Write node
|
||||||
write_node = nuke.createNode("Write")
|
write_node = nuke.createNode("Write")
|
||||||
|
|
@ -996,9 +1024,10 @@ class ExporterReviewMov(ExporterReview):
|
||||||
|
|
||||||
# ---------- generate representation data
|
# ---------- generate representation data
|
||||||
self.get_representation_data(
|
self.get_representation_data(
|
||||||
tags=["review", "delete"] + add_tags,
|
tags=["review", "need_thumbnail", "delete"] + add_tags,
|
||||||
custom_tags=add_custom_tags,
|
custom_tags=add_custom_tags,
|
||||||
range=True
|
range=True,
|
||||||
|
colorspace=colorspace
|
||||||
)
|
)
|
||||||
|
|
||||||
self.log.debug("Representation... `{}`".format(self.data))
|
self.log.debug("Representation... `{}`".format(self.data))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue