fix otio and refacto

This commit is contained in:
“christopheseux”
2023-05-04 11:32:36 +02:00
parent f9384c3d89
commit 706fcb2ee1
4 changed files with 25 additions and 17 deletions
+12 -7
View File
@@ -80,6 +80,7 @@ class VSETB_OT_rename(Operator):
return {"FINISHED"}
class VSETB_OT_show_waveform(Operator):
bl_idname = "vse_toolbox.show_waveform"
bl_label = "Show Waveform"
@@ -156,12 +157,19 @@ class VSETB_OT_set_stamps(Operator):
bpy.ops.sequencer.select_all(action='DESELECT')
crop_x = int(scn.render.resolution_x * 0.4)
crop_max_y = int(scn.render.resolution_y * 0.96)
crop_min_y = int(scn.render.resolution_y * 0.01)
height = scn.render.resolution_y
width = scn.render.resolution_x
ratio = (height / 1080)
margin = 0.01
box_margin = 0.005
font_size = int(24*ratio)
crop_x = int(width * 0.4)
crop_max_y = int(height - font_size*2)
#crop_min_y = int(scn.render.resolution_y * 0.01)
stamp_params = dict(start=scn.frame_start, end=scn.frame_end,
font_size=22, y=0.015, box_margin=0.005, select=True, box_color=(0, 0, 0, 0.5))
font_size=font_size, y=margin, box_margin=box_margin, select=True, box_color=(0, 0, 0, 0.5))
# Project Name
project_strip_stamp = new_text_strip('project_name_stamp', channel=1, **stamp_params,
@@ -169,7 +177,6 @@ class VSETB_OT_set_stamps(Operator):
project_strip_stamp.crop.max_x = crop_x * 2
project_strip_stamp.crop.max_y = crop_max_y
project_strip_stamp.crop.min_y = crop_min_y
# Shot Name
shot_strip_stamp = new_text_strip('shot_name_stamp', channel=2, **stamp_params,
@@ -178,7 +185,6 @@ class VSETB_OT_set_stamps(Operator):
shot_strip_stamp.crop.min_x = crop_x
shot_strip_stamp.crop.max_x = crop_x
shot_strip_stamp.crop.max_y = crop_max_y
shot_strip_stamp.crop.min_y = crop_min_y
# Frame Range
frame_strip_stamp = new_text_strip('frame_range_stamp', channel=3, **stamp_params,
@@ -186,7 +192,6 @@ class VSETB_OT_set_stamps(Operator):
frame_strip_stamp.crop.min_x = crop_x *2
frame_strip_stamp.crop.max_y = crop_max_y
frame_strip_stamp.crop.min_y = crop_min_y
bpy.ops.sequencer.meta_make()
stamps_strip = context.active_sequence_strip