mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge branch 'develop' into bugfix/fix_clip_media_review
This commit is contained in:
commit
101e30c982
7 changed files with 36 additions and 41 deletions
|
|
@ -117,10 +117,7 @@ class HostDirmap(ABC):
|
|||
It checks if Site Sync is enabled and user chose to use local
|
||||
site, in that case configuration in Local Settings takes precedence
|
||||
"""
|
||||
|
||||
dirmap_label = "{}-dirmap".format(self.host_name)
|
||||
mapping_sett = self.project_settings[self.host_name].get(dirmap_label,
|
||||
{})
|
||||
mapping_sett = self.project_settings[self.host_name].get("dirmap", {})
|
||||
local_mapping = self._get_local_sync_dirmap()
|
||||
mapping_enabled = mapping_sett.get("enabled") or bool(local_mapping)
|
||||
if not mapping_enabled:
|
||||
|
|
|
|||
|
|
@ -561,9 +561,6 @@ class FormattingPart:
|
|||
|
||||
"""
|
||||
key = self._template_base
|
||||
if key in result.really_used_values:
|
||||
result.add_output(result.really_used_values[key])
|
||||
return result
|
||||
|
||||
# ensure key is properly formed [({})] properly closed.
|
||||
if not self.validate_key_is_matched(key):
|
||||
|
|
|
|||
|
|
@ -585,9 +585,6 @@ def version_up_current_workfile():
|
|||
"""Function to increment and save workfile
|
||||
"""
|
||||
host = registered_host()
|
||||
if not host.has_unsaved_changes():
|
||||
print("No unsaved changes, skipping file save..")
|
||||
return
|
||||
|
||||
project_name = get_current_project_name()
|
||||
folder_path = get_current_folder_path()
|
||||
|
|
|
|||
|
|
@ -717,6 +717,7 @@ def get_instance_staging_dir(instance):
|
|||
instance.data.update({
|
||||
"stagingDir": staging_dir_path,
|
||||
"stagingDir_persistent": staging_dir_info.persistent,
|
||||
"stagingDir_custom": staging_dir_info.custom
|
||||
})
|
||||
|
||||
return staging_dir_path
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ from .tempdir import get_temp_dir
|
|||
class StagingDir:
|
||||
directory: str
|
||||
persistent: bool
|
||||
custom: bool # Whether the staging dir is a custom staging dir
|
||||
|
||||
|
||||
def get_staging_dir_config(
|
||||
|
|
@ -204,7 +205,8 @@ def get_staging_dir_info(
|
|||
dir_template = staging_dir_config["template"]["directory"]
|
||||
return StagingDir(
|
||||
dir_template.format_strict(ctx_data),
|
||||
staging_dir_config["persistence"],
|
||||
persistent=staging_dir_config["persistence"],
|
||||
custom=True
|
||||
)
|
||||
|
||||
# no config found but force an output
|
||||
|
|
@ -216,7 +218,8 @@ def get_staging_dir_info(
|
|||
prefix=prefix,
|
||||
suffix=suffix,
|
||||
),
|
||||
False,
|
||||
persistent=False,
|
||||
custom=False
|
||||
)
|
||||
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ class ActionDelegate(QtWidgets.QStyledItemDelegate):
|
|||
|
||||
if index.data(FORCE_NOT_OPEN_WORKFILE_ROLE):
|
||||
rect = QtCore.QRectF(
|
||||
option.rect.x(), option.rect.height(), 5, 5)
|
||||
option.rect.x(), option.rect.y() + option.rect.height(), 5, 5)
|
||||
painter.setPen(QtCore.Qt.NoPen)
|
||||
painter.setBrush(QtGui.QColor(200, 0, 0))
|
||||
painter.drawEllipse(rect)
|
||||
|
|
|
|||
|
|
@ -103,17 +103,17 @@ def test_image_sequence_with_embedded_tc_and_handles_out_of_range():
|
|||
# 10 head black handles generated from gap (991-1000)
|
||||
"/path/to/ffmpeg -t 0.4166666666666667 -r 24.0 -f lavfi -i "
|
||||
"color=c=black:s=1280x720 -tune stillimage -start_number 991 "
|
||||
"C:/result/output.%03d.jpg",
|
||||
"C:/result/output.%04d.jpg",
|
||||
|
||||
# 10 tail black handles generated from gap (1102-1111)
|
||||
"/path/to/ffmpeg -t 0.4166666666666667 -r 24.0 -f lavfi -i "
|
||||
"color=c=black:s=1280x720 -tune stillimage -start_number 1102 "
|
||||
"C:/result/output.%03d.jpg",
|
||||
"C:/result/output.%04d.jpg",
|
||||
|
||||
# Report from source exr (1001-1101) with enforce framerate
|
||||
"/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i "
|
||||
f"C:\\exr_embedded_tc{os.sep}output.%04d.exr -start_number 1001 "
|
||||
"C:/result/output.%03d.jpg"
|
||||
"C:/result/output.%04d.jpg"
|
||||
]
|
||||
|
||||
assert calls == expected
|
||||
|
|
@ -131,11 +131,11 @@ def test_image_sequence_and_handles_out_of_range():
|
|||
expected = [
|
||||
# 5 head black frames generated from gap (991-995)
|
||||
"/path/to/ffmpeg -t 0.2 -r 25.0 -f lavfi -i color=c=black:s=1280x720"
|
||||
" -tune stillimage -start_number 991 C:/result/output.%03d.jpg",
|
||||
" -tune stillimage -start_number 991 C:/result/output.%04d.jpg",
|
||||
|
||||
# 9 tail back frames generated from gap (1097-1105)
|
||||
"/path/to/ffmpeg -t 0.36 -r 25.0 -f lavfi -i color=c=black:s=1280x720"
|
||||
" -tune stillimage -start_number 1097 C:/result/output.%03d.jpg",
|
||||
" -tune stillimage -start_number 1097 C:/result/output.%04d.jpg",
|
||||
|
||||
# Report from source tiff (996-1096)
|
||||
# 996-1000 = additional 5 head frames
|
||||
|
|
@ -143,7 +143,7 @@ def test_image_sequence_and_handles_out_of_range():
|
|||
# 1096-1096 = additional 1 tail frames
|
||||
"/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i "
|
||||
f"C:\\tif_seq{os.sep}output.%04d.tif -start_number 996"
|
||||
f" C:/result/output.%03d.jpg"
|
||||
f" C:/result/output.%04d.jpg"
|
||||
]
|
||||
|
||||
assert calls == expected
|
||||
|
|
@ -164,7 +164,7 @@ def test_movie_with_embedded_tc_no_gap_handles():
|
|||
# - duration = 68fr (source) + 20fr (handles) = 88frames = 3.666s
|
||||
"/path/to/ffmpeg -ss 0.16666666666666666 -t 3.6666666666666665 "
|
||||
"-i C:\\data\\qt_embedded_tc.mov -start_number 991 "
|
||||
"C:/result/output.%03d.jpg"
|
||||
"C:/result/output.%04d.jpg"
|
||||
]
|
||||
|
||||
assert calls == expected
|
||||
|
|
@ -181,12 +181,12 @@ def test_short_movie_head_gap_handles():
|
|||
expected = [
|
||||
# 10 head black frames generated from gap (991-1000)
|
||||
"/path/to/ffmpeg -t 0.4 -r 25.0 -f lavfi -i color=c=black:s=1280x720"
|
||||
" -tune stillimage -start_number 991 C:/result/output.%03d.jpg",
|
||||
" -tune stillimage -start_number 991 C:/result/output.%04d.jpg",
|
||||
|
||||
# source range + 10 tail frames
|
||||
# duration = 50fr (source) + 10fr (tail handle) = 60 fr = 2.4s
|
||||
"/path/to/ffmpeg -ss 0.0 -t 2.4 -i C:\\data\\movie.mp4"
|
||||
" -start_number 1001 C:/result/output.%03d.jpg"
|
||||
" -start_number 1001 C:/result/output.%04d.jpg"
|
||||
]
|
||||
|
||||
assert calls == expected
|
||||
|
|
@ -204,13 +204,13 @@ def test_short_movie_tail_gap_handles():
|
|||
# 10 tail black frames generated from gap (1067-1076)
|
||||
"/path/to/ffmpeg -t 0.4166666666666667 -r 24.0 -f lavfi -i "
|
||||
"color=c=black:s=1280x720 -tune stillimage -start_number 1067 "
|
||||
"C:/result/output.%03d.jpg",
|
||||
"C:/result/output.%04d.jpg",
|
||||
|
||||
# 10 head frames + source range
|
||||
# duration = 10fr (head handle) + 66fr (source) = 76fr = 3.16s
|
||||
"/path/to/ffmpeg -ss 1.0416666666666667 -t 3.1666666666666665 -i "
|
||||
"C:\\data\\qt_no_tc_24fps.mov -start_number 991"
|
||||
" C:/result/output.%03d.jpg"
|
||||
" C:/result/output.%04d.jpg"
|
||||
]
|
||||
|
||||
assert calls == expected
|
||||
|
|
@ -238,62 +238,62 @@ def test_multiple_review_clips_no_gap():
|
|||
# 10 head black frames generated from gap (991-1000)
|
||||
'/path/to/ffmpeg -t 0.4 -r 25.0 -f lavfi'
|
||||
' -i color=c=black:s=1280x720 -tune '
|
||||
'stillimage -start_number 991 C:/result/output.%03d.jpg',
|
||||
'stillimage -start_number 991 C:/result/output.%04d.jpg',
|
||||
|
||||
# Alternance 25fps tiff sequence and 24fps exr sequence
|
||||
# for 100 frames each
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 1001 C:/result/output.%03d.jpg',
|
||||
'-start_number 1001 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i '
|
||||
f'C:\\with_tc{os.sep}output.%04d.exr '
|
||||
'-start_number 1102 C:/result/output.%03d.jpg',
|
||||
'-start_number 1102 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 1199 C:/result/output.%03d.jpg',
|
||||
'-start_number 1199 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i '
|
||||
f'C:\\with_tc{os.sep}output.%04d.exr '
|
||||
'-start_number 1300 C:/result/output.%03d.jpg',
|
||||
'-start_number 1300 C:/result/output.%04d.jpg',
|
||||
|
||||
# Repeated 25fps tiff sequence multiple times till the end
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 1397 C:/result/output.%03d.jpg',
|
||||
'-start_number 1397 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 1498 C:/result/output.%03d.jpg',
|
||||
'-start_number 1498 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 1599 C:/result/output.%03d.jpg',
|
||||
'-start_number 1599 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 1700 C:/result/output.%03d.jpg',
|
||||
'-start_number 1700 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 1801 C:/result/output.%03d.jpg',
|
||||
'-start_number 1801 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 1902 C:/result/output.%03d.jpg',
|
||||
'-start_number 1902 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 2003 C:/result/output.%03d.jpg',
|
||||
'-start_number 2003 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 2104 C:/result/output.%03d.jpg',
|
||||
'-start_number 2104 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 25.0 -i '
|
||||
f'C:\\no_tc{os.sep}output.%04d.tif '
|
||||
'-start_number 2205 C:/result/output.%03d.jpg'
|
||||
'-start_number 2205 C:/result/output.%04d.jpg'
|
||||
]
|
||||
|
||||
assert calls == expected
|
||||
|
|
@ -321,15 +321,15 @@ def test_multiple_review_clips_with_gap():
|
|||
# Gap on review track (12 frames)
|
||||
'/path/to/ffmpeg -t 0.5 -r 24.0 -f lavfi'
|
||||
' -i color=c=black:s=1280x720 -tune '
|
||||
'stillimage -start_number 991 C:/result/output.%03d.jpg',
|
||||
'stillimage -start_number 991 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i '
|
||||
f'C:\\with_tc{os.sep}output.%04d.exr '
|
||||
'-start_number 1003 C:/result/output.%03d.jpg',
|
||||
'-start_number 1003 C:/result/output.%04d.jpg',
|
||||
|
||||
'/path/to/ffmpeg -start_number 1000 -framerate 24.0 -i '
|
||||
f'C:\\with_tc{os.sep}output.%04d.exr '
|
||||
'-start_number 1091 C:/result/output.%03d.jpg'
|
||||
'-start_number 1091 C:/result/output.%04d.jpg'
|
||||
]
|
||||
|
||||
assert calls == expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue