improve stamps

This commit is contained in:
“christopheseux”
2023-06-21 13:46:28 +02:00
parent 83d34c2e67
commit 3e5bed2f2a
2 changed files with 31 additions and 13 deletions
+23 -10
View File
@@ -403,6 +403,9 @@ def set_active_strip(scene):
def update_text_strips(scene):
#print("update_text_strips")
settings = get_scene_settings()
project = settings.active_project
episode = settings.active_episode
scn = bpy.context.scene
if not scn.sequence_editor:
@@ -410,21 +413,31 @@ def update_text_strips(scene):
format_data = {
'scene': scene,
'active_shot_name': 'None',
'active_shot_frame': 0,
'active_shot_duration': 0,
'active_shot_start': 0,
'active_shot_end': 0
'project_name': 'None',
'episode_name': 'None',
'sequence_name': 'None',
'strip_name': 'None',
'shot_name': 'None',
'shot_frame': 0,
'shot_duration': 0,
'shot_start': 0,
'shot_end': 0,
}
shot_strip = get_strip_at('Shots', frame=scene.frame_current)
if shot_strip:
format_data.update({
'active_shot_name': shot_strip.name,
'active_shot_duration': shot_strip.frame_final_duration,
'active_shot_frame': scene.frame_current - shot_strip.frame_final_start + 1,
'active_shot_start': shot_strip.frame_final_start,
'active_shot_end': shot_strip.frame_final_end,
'project_name': project.name,
'episode_name': episode.name,
'sequence_name': get_strip_sequence_name(shot_strip),
'strip_name': shot_strip.name,
'shot_name': 'sh{index:04d}'.format(**shot_strip.vsetb_strip_settings.format_data),
'shot_duration': shot_strip.frame_final_duration,
'shot_frame': scene.frame_current - shot_strip.frame_final_start + 1,
'shot_start': shot_strip.frame_final_start,
'shot_end': shot_strip.frame_final_end,
})
for strip in scene.sequence_editor.sequences_all: