diff --git a/file_utils.py b/file_utils.py index 34b1cc8..089b533 100644 --- a/file_utils.py +++ b/file_utils.py @@ -147,21 +147,21 @@ def open_file(filepath, env=None, select=False): subprocess.Popen(cmd, env=env) -def parse(template, string): +"""def parse(template, string): template = re.sub(r'{index:(.+?)}', r'(?P.+)', template) reg = re.sub(r'{(.+?)}', r'(?P<_\1>.+)', template) values = list(re.search(reg, string).groups()) keys = re.findall(r'{(.+?)}', template) + ['index'] - return dict(zip(keys, values)) + return dict(zip(keys, values))""" -"""def parse(template, string): +def parse(template, string): reg = re.sub(r'{[^}]*}|\.', lambda m: m.group() if m.group().startswith('{') else r'\.', template) reg = re.sub(r'{(.+?)}', r'(?P<\1>.*)', reg) if result := re.match(reg, string): - return result.groupdict()""" + return result.groupdict() def expand(template, **kargs): template = Path(template).as_posix() diff --git a/operators/sequencer.py b/operators/sequencer.py index 9011bea..c272161 100644 --- a/operators/sequencer.py +++ b/operators/sequencer.py @@ -218,7 +218,7 @@ class VSETB_OT_set_stamps(Operator): # Shot Name shot_strip_stamp = new_text_strip('shot_stamp', channel=2, **stamp_params, - text='{sequence} / sh{index}', align_y='BOTTOM') + text='{sequence} / sh{shot}', align_y='BOTTOM') shot_strip_stamp.crop.min_x = crop_x shot_strip_stamp.crop.max_x = crop_x