mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
improve docstring on lib.py and add comment on the condition of setting filename with extension and improved the deprecrated settings
This commit is contained in:
parent
abef01cd05
commit
e493886f4d
4 changed files with 16 additions and 15 deletions
|
|
@ -3463,7 +3463,7 @@ def get_filenames_without_hash(filename, frame_start, frame_end):
|
|||
frame_end (str): end of the frame
|
||||
|
||||
Returns:
|
||||
filenames(list): list of filename
|
||||
list: filename per frame of the sequence
|
||||
"""
|
||||
filenames = []
|
||||
for frame in range(int(frame_start), (int(frame_end) + 1)):
|
||||
|
|
|
|||
|
|
@ -818,9 +818,13 @@ class ExporterReviewMov(ExporterReview):
|
|||
|
||||
self.file = self.fhead + self.name + ".{}".format(self.ext)
|
||||
if ".{}".format(self.ext) not in VIDEO_EXTENSIONS:
|
||||
# filename would be with frame hashes if
|
||||
# the file extension is not in video format
|
||||
filename = get_head_filename_without_hashes(
|
||||
self.path_in, self.name)
|
||||
self.file = filename
|
||||
# make sure the filename are in
|
||||
# correct image output format
|
||||
if ".{}".format(self.ext) not in self.file:
|
||||
original_ext = os.path.splitext(filename)[-1].strip(".") # noqa
|
||||
self.file = filename.replace(original_ext, ext)
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ class ExtractReviewDataBakingStreams(publish.Extractor):
|
|||
nuke_publish = project_settings["nuke"]["publish"]
|
||||
deprecated_setting = nuke_publish["ExtractReviewDataMov"]
|
||||
current_setting = nuke_publish["ExtractReviewDataBakingStreams"]
|
||||
if not deprecated_setting["enabled"]:
|
||||
if current_setting["enabled"]:
|
||||
cls.viewer_lut_raw = current_setting["viewer_lut_raw"]
|
||||
cls.outputs = current_setting["outputs"]
|
||||
else:
|
||||
if deprecated_setting["enabled"]:
|
||||
# Use deprecated settings if they are still enabled
|
||||
cls.viewer_lut_raw = deprecated_setting["viewer_lut_raw"]
|
||||
cls.outputs = deprecated_setting["outputs"]
|
||||
elif current_setting["enabled"]:
|
||||
cls.viewer_lut_raw = current_setting["viewer_lut_raw"]
|
||||
cls.outputs = current_setting["outputs"]
|
||||
|
||||
def process(self, instance):
|
||||
families = set(instance.data["families"])
|
||||
|
|
|
|||
|
|
@ -754,11 +754,10 @@ def _convert_nuke_project_settings(ayon_settings, output):
|
|||
current_review_settings = (
|
||||
ayon_publish["ExtractReviewDataBakingStreams"]
|
||||
)
|
||||
if not deprecrated_review_settings["enabled"]:
|
||||
if current_review_settings["enabled"]:
|
||||
outputs_settings = current_review_settings["outputs"]
|
||||
else:
|
||||
if deprecrated_review_settings["enabled"]:
|
||||
outputs_settings = deprecrated_review_settings["outputs"]
|
||||
elif current_review_settings["enabled"]:
|
||||
outputs_settings = current_review_settings["outputs"]
|
||||
|
||||
for item in outputs_settings:
|
||||
item_filter = item["filter"]
|
||||
|
|
@ -780,12 +779,10 @@ def _convert_nuke_project_settings(ayon_settings, output):
|
|||
name = item.pop("name")
|
||||
new_review_data_outputs[name] = item
|
||||
|
||||
if deprecrated_review_settings["outputs"] == (
|
||||
current_review_settings["outputs"]
|
||||
):
|
||||
current_review_settings["outputs"] = new_review_data_outputs
|
||||
else:
|
||||
if deprecrated_review_settings["enabled"]:
|
||||
deprecrated_review_settings["outputs"] = new_review_data_outputs
|
||||
elif current_review_settings["enabled"]:
|
||||
current_review_settings["outputs"] = new_review_data_outputs
|
||||
|
||||
collect_instance_data = ayon_publish["CollectInstanceData"]
|
||||
if "sync_workfile_version_on_product_types" in collect_instance_data:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue