mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Update name of pattern
This commit is contained in:
parent
9d293b38a9
commit
bafd3dcf8f
1 changed files with 3 additions and 3 deletions
|
|
@ -486,17 +486,17 @@ def get_real_frames_to_render(frames):
|
|||
1003-1005
|
||||
1001-1100x5
|
||||
"""
|
||||
pattern = r"(?:step|by|every|x|:)(\d+)$"
|
||||
step_pattern = re.compile(r"(?:step|by|every|x|:)(\d+)$")
|
||||
|
||||
frames_to_render = []
|
||||
step = 1
|
||||
for frame in frames.split(","):
|
||||
if "-" in frame:
|
||||
frame_start, frame_end = frame.split("-")
|
||||
match = re.findall(pattern, frame_end)
|
||||
match = step_pattern.findall(frame_end)
|
||||
if match:
|
||||
step = int(match[0])
|
||||
frame_end = re.sub(pattern, "", frame_end)
|
||||
frame_end = re.sub(step_pattern, "", frame_end)
|
||||
|
||||
frames_to_render.extend(
|
||||
range(int(frame_start), int(frame_end) + 1, step)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue