improve stamps
This commit is contained in:
@@ -155,6 +155,7 @@ class VSETB_OT_set_stamps(Operator):
|
||||
def execute(self, context):
|
||||
scn = context.scene
|
||||
settings = get_scene_settings()
|
||||
project = settings.active_project
|
||||
#strip_settings = get_strip_settings()
|
||||
channel_index = get_channel_index('Stamps')
|
||||
|
||||
@@ -179,15 +180,19 @@ class VSETB_OT_set_stamps(Operator):
|
||||
font_size=font_size, y=margin, box_margin=box_margin, select=True, box_color=(0, 0, 0, 0.5))
|
||||
|
||||
# Project Name
|
||||
project_text = '{project_name}'
|
||||
if project.type == 'TVSHOW':
|
||||
project_text = '{project_name} / {episode_name}'
|
||||
project_strip_stamp = new_text_strip('project_name_stamp', channel=1, **stamp_params,
|
||||
text=settings.active_project.name, x=0.01, align_x='LEFT', align_y='BOTTOM')
|
||||
text=project_text, x=0.01, align_x='LEFT', align_y='BOTTOM')
|
||||
|
||||
project_strip_stamp.crop.max_x = crop_x * 2
|
||||
project_strip_stamp.crop.max_y = crop_max_y
|
||||
|
||||
# Shot Name
|
||||
|
||||
shot_strip_stamp = new_text_strip('shot_name_stamp', channel=2, **stamp_params,
|
||||
text='{active_shot_name}', align_y='BOTTOM')
|
||||
text='{sequence_name} / {shot_name}', align_y='BOTTOM')
|
||||
|
||||
shot_strip_stamp.crop.min_x = crop_x
|
||||
shot_strip_stamp.crop.max_x = crop_x
|
||||
@@ -195,7 +200,7 @@ class VSETB_OT_set_stamps(Operator):
|
||||
|
||||
# Frame Range
|
||||
frame_strip_stamp = new_text_strip('frame_range_stamp', channel=3, **stamp_params,
|
||||
text='{active_shot_frame} / {active_shot_duration}', x=0.99, align_x='RIGHT', align_y='BOTTOM')
|
||||
text='{shot_frame} / {shot_duration}', x=0.99, align_x='RIGHT', align_y='BOTTOM')
|
||||
|
||||
frame_strip_stamp.crop.min_x = crop_x *2
|
||||
frame_strip_stamp.crop.max_y = crop_max_y
|
||||
|
||||
Reference in New Issue
Block a user