fix episode restore
parent
706fcb2ee1
commit
2d24e3da7f
|
@ -116,9 +116,10 @@ class VSETB_OT_set_sequencer(Operator):
|
||||||
scn = context.scene
|
scn = context.scene
|
||||||
|
|
||||||
set_channels()
|
set_channels()
|
||||||
movie = get_strips(channel='Movie')
|
movies = get_strips(channel='Movie')
|
||||||
if movie:
|
movie = None
|
||||||
movie = movie[0]
|
if movies:
|
||||||
|
movie = movies[0]
|
||||||
movie.transform.scale_x = movie.transform.scale_y = 1
|
movie.transform.scale_x = movie.transform.scale_y = 1
|
||||||
elem = movie.strip_elem_from_frame(scn.frame_current)
|
elem = movie.strip_elem_from_frame(scn.frame_current)
|
||||||
scn.render.resolution_x = elem.orig_width
|
scn.render.resolution_x = elem.orig_width
|
||||||
|
@ -136,6 +137,12 @@ class VSETB_OT_set_sequencer(Operator):
|
||||||
scn.render.ffmpeg.audio_mixrate = 44100
|
scn.render.ffmpeg.audio_mixrate = 44100
|
||||||
scn.render.ffmpeg.audio_bitrate = 128
|
scn.render.ffmpeg.audio_bitrate = 128
|
||||||
|
|
||||||
|
shots = get_strips(channel='Shots')
|
||||||
|
if shots:
|
||||||
|
scn.frame_end = shots[-1].frame_final_end -1
|
||||||
|
elif movie:
|
||||||
|
scn.frame_end = movie.frame_final_end -1
|
||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,10 @@ class VSETB_OT_load_projects(Operator):
|
||||||
|
|
||||||
old_project_name = settings.project_name.replace(' ', '_').upper()
|
old_project_name = settings.project_name.replace(' ', '_').upper()
|
||||||
|
|
||||||
|
old_episode_name = None
|
||||||
|
if settings.active_project:
|
||||||
|
old_episode_name = settings.active_project.episode_name.replace(' ', '_').upper()
|
||||||
|
|
||||||
settings.projects.clear()
|
settings.projects.clear()
|
||||||
tracker.connect()
|
tracker.connect()
|
||||||
|
|
||||||
|
@ -157,6 +161,10 @@ class VSETB_OT_load_projects(Operator):
|
||||||
if project.name.replace(' ', '_').upper() == old_project_name:
|
if project.name.replace(' ', '_').upper() == old_project_name:
|
||||||
settings.project_name = project.name
|
settings.project_name = project.name
|
||||||
|
|
||||||
|
for episode in project.episodes:
|
||||||
|
if episode.name.replace(' ', '_').upper() == old_episode_name:
|
||||||
|
project.episode_name = episode.name
|
||||||
|
|
||||||
bpy.ops.vse_toolbox.load_settings()
|
bpy.ops.vse_toolbox.load_settings()
|
||||||
#else:
|
#else:
|
||||||
# print('Could Not restore Project Name')
|
# print('Could Not restore Project Name')
|
||||||
|
|
Loading…
Reference in New Issue