fix shot_template
parent
948f5b53dd
commit
e50a7aee31
|
@ -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<index>.+)', 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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue