Move Anim_Setup module into Blender_Kitsu #5

Merged
Nick Alberelli merged 27 commits from :feature/merge_anim_setup_into_blender_kitsu into master 2023-04-05 17:38:41 +02:00
Showing only changes of commit 1175584c49 - Show all commits

View File

@ -111,13 +111,19 @@ class SHOTBUILDER_OT_NewShotFile(bpy.types.Operator):
)
def modal(self, context, event):
if event.type == 'TIMER' and not self._add_vse_area:
# Show Storyboard/Animatic from VSE
"""Running as Modal Event because functions within execute() function like
animation_workspace_delete_others() changed UI context that needs to be refreshed.
https://docs.blender.org/api/current/info_gotcha.html#no-updates-after-changing-ui-context"""
animation_workspace_vse_area_add(self, context)
animation_workspace_vse_area_add(context)
self._add_vse_area = True
if self._built_shot and self._add_vse_area:
self.report({"INFO"}, f"Created Shot {self.shot_id}")
return {'FINISHED'}
return {'PASS_THROUGH'}
def invoke(self, context: bpy.types.Context, event: bpy.types.Event) -> Set[str]:
@ -185,9 +191,9 @@ class SHOTBUILDER_OT_NewShotFile(bpy.types.Operator):
shot_builder.build()
#Load EDIT
bpy.ops.kitsu.con_detect_context() #TODO CONFIRM AND CHECK IF OVERRIDE IS NEEDED
editorial_export_get_latest(self, context)
editorial_export_get_latest(context)
# Load Anim Workspace
animation_workspace_delete_others(self, context)
animation_workspace_delete_others()
shot = cache.shot_active_get()
# Initilize armatures
@ -202,8 +208,7 @@ class SHOTBUILDER_OT_NewShotFile(bpy.types.Operator):
context.scene.frame_end = shot.nb_frames + addon_prefs.shot_builder_frame_offset
self._built_shot = True
return {'RUNNING_MODAL'}
if self._built_shot and self._add_vse_area:
return {'FINISHED'}
def draw(self, context: bpy.types.Context) -> None:
layout = self.layout