mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
jakub's comment on apply_settings and fix the bug of not being extracted the review
This commit is contained in:
parent
e61515d302
commit
174ef45b0b
4 changed files with 109 additions and 5 deletions
|
|
@ -804,8 +804,13 @@ class ExporterReviewMov(ExporterReview):
|
|||
self.log.info("File info was set...")
|
||||
|
||||
self.file = self.fhead + self.name + ".{}".format(self.ext)
|
||||
if self.ext != VIDEO_EXTENSIONS:
|
||||
self.file = os.path.basename(self.path_in)
|
||||
if ".{}".format(self.ext) not in VIDEO_EXTENSIONS:
|
||||
filename = os.path.basename(self.path_in)
|
||||
self.file = filename
|
||||
if ".{}".format(self.ext) not in self.file:
|
||||
wrg_ext = filename.split(".")[-1]
|
||||
self.file = filename.replace(wrg_ext, self.ext)
|
||||
|
||||
self.path = os.path.join(
|
||||
self.staging_dir, self.file).replace("\\", "/")
|
||||
|
||||
|
|
@ -926,7 +931,7 @@ class ExporterReviewMov(ExporterReview):
|
|||
self.log.debug("Path: {}".format(self.path))
|
||||
write_node["file"].setValue(str(self.path))
|
||||
write_node["file_type"].setValue(str(self.ext))
|
||||
|
||||
self.log.debug("{0}".format(self.ext))
|
||||
# Knobs `meta_codec` and `mov64_codec` are not available on centos.
|
||||
# TODO shouldn't this come from settings on outputs?
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class ExtractReviewDataBakingStreams(publish.Extractor):
|
|||
"""
|
||||
|
||||
order = pyblish.api.ExtractorOrder + 0.01
|
||||
label = "Extract Review Data Mov"
|
||||
label = "Extract Review Data Baking Streams"
|
||||
|
||||
families = ["review"]
|
||||
hosts = ["nuke"]
|
||||
|
|
@ -25,6 +25,34 @@ class ExtractReviewDataBakingStreams(publish.Extractor):
|
|||
viewer_lut_raw = None
|
||||
outputs = {}
|
||||
|
||||
@classmethod
|
||||
def apply_settings(cls, project_settings):
|
||||
"""just in case there are some old presets
|
||||
in deprecrated ExtractReviewDataMov Plugins
|
||||
"""
|
||||
nuke_publish = project_settings["nuke"]["publish"]
|
||||
deprecrated_review_settings = nuke_publish["ExtractReviewDataMov"]
|
||||
current_review_settings = (
|
||||
nuke_publish["ExtractReviewDataBakingStreams"]
|
||||
)
|
||||
if deprecrated_review_settings["viewer_lut_raw"] == (
|
||||
current_review_settings["viewer_lut_raw"]
|
||||
):
|
||||
cls.viewer_lut_raw = (
|
||||
current_review_settings["viewer_lut_raw"]
|
||||
)
|
||||
else:
|
||||
cls.viewer_lut_raw = (
|
||||
deprecrated_review_settings["viewer_lut_raw"]
|
||||
)
|
||||
|
||||
if deprecrated_review_settings["outputs"] == (
|
||||
current_review_settings["outputs"]
|
||||
):
|
||||
cls.outputs = current_review_settings["outputs"]
|
||||
else:
|
||||
cls.outputs = deprecrated_review_settings["outputs"]
|
||||
|
||||
def process(self, instance):
|
||||
families = set(instance.data["families"])
|
||||
|
||||
|
|
@ -165,6 +165,18 @@ class BakingStreamModel(BaseSettingsModel):
|
|||
title="Custom tags", default_factory=list)
|
||||
|
||||
|
||||
class ExtractReviewDataMovModel(BaseSettingsModel):
|
||||
"""[deprecated] use Extract Review Data Baking
|
||||
Streams instead.
|
||||
"""
|
||||
enabled: bool = Field(title="Enabled")
|
||||
viewer_lut_raw: bool = Field(title="Viewer lut raw")
|
||||
outputs: list[BakingStreamModel] = Field(
|
||||
default_factory=list,
|
||||
title="Baking streams"
|
||||
)
|
||||
|
||||
|
||||
class ExtractReviewBakingStreamsModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
viewer_lut_raw: bool = Field(title="Viewer lut raw")
|
||||
|
|
@ -266,6 +278,10 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
title="Extract Review Data Lut",
|
||||
default_factory=ExtractReviewDataLutModel
|
||||
)
|
||||
ExtractReviewDataMov: ExtractReviewDataMovModel = Field(
|
||||
title="Extract Review Data Mov",
|
||||
default_factory=ExtractReviewDataMovModel
|
||||
)
|
||||
ExtractReviewDataBakingStreams: ExtractReviewBakingStreamsModel = Field(
|
||||
title="Extract Review Data Baking Streams",
|
||||
default_factory=ExtractReviewBakingStreamsModel
|
||||
|
|
@ -410,6 +426,61 @@ DEFAULT_PUBLISH_PLUGIN_SETTINGS = {
|
|||
"ExtractReviewDataLut": {
|
||||
"enabled": False
|
||||
},
|
||||
"ExtractReviewDataMov": {
|
||||
"enabled": True,
|
||||
"viewer_lut_raw": False,
|
||||
"outputs": [
|
||||
{
|
||||
"name": "baking",
|
||||
"filter": {
|
||||
"task_types": [],
|
||||
"product_types": [],
|
||||
"product_names": []
|
||||
},
|
||||
"read_raw": False,
|
||||
"viewer_process_override": "",
|
||||
"bake_viewer_process": True,
|
||||
"bake_viewer_input_process": True,
|
||||
"reformat_nodes_config": {
|
||||
"enabled": False,
|
||||
"reposition_nodes": [
|
||||
{
|
||||
"node_class": "Reformat",
|
||||
"knobs": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "type",
|
||||
"text": "to format"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "format",
|
||||
"text": "HD_1080"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "filter",
|
||||
"text": "Lanczos6"
|
||||
},
|
||||
{
|
||||
"type": "bool",
|
||||
"name": "black_outside",
|
||||
"boolean": True
|
||||
},
|
||||
{
|
||||
"type": "bool",
|
||||
"name": "pbb",
|
||||
"boolean": False
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"extension": "mov",
|
||||
"add_custom_tags": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"ExtractReviewDataBakingStreams": {
|
||||
"enabled": True,
|
||||
"viewer_lut_raw": False,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.2"
|
||||
__version__ = "0.1.3"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue