fix otio and refacto
This commit is contained in:
@@ -170,12 +170,16 @@ class VSETB_OT_import_files(Operator):
|
||||
import_movie(movie_filepath)
|
||||
|
||||
if self.import_sound or (not self.import_sound and self.import_movie):
|
||||
print(f'[>.] Loading Audio from: {str(sound_filepath)}')
|
||||
|
||||
for strip in get_strips(channel='Audio'):
|
||||
sequencer.remove(strip)
|
||||
|
||||
import_sound(sound_filepath)
|
||||
if self.import_sound:
|
||||
print(f'[>.] Loading Audio from: {str(sound_filepath)}')
|
||||
import_sound(sound_filepath)
|
||||
else:
|
||||
print(f'[>.] Loading Audio from: {str(movie_filepath)}')
|
||||
import_sound(movie_filepath)
|
||||
|
||||
context.scene.sequence_editor.sequences.update()
|
||||
|
||||
|
||||
+12
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user