Move Anim_Setup
module into Blender_Kitsu
#5
@ -111,13 +111,19 @@ class SHOTBUILDER_OT_NewShotFile(bpy.types.Operator):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def modal(self, context, event):
|
def modal(self, context, event):
|
||||||
|
|
||||||
if event.type == 'TIMER' and not self._add_vse_area:
|
if event.type == 'TIMER' and not self._add_vse_area:
|
||||||
# Show Storyboard/Animatic from VSE
|
# Show Storyboard/Animatic from VSE
|
||||||
"""Running as Modal Event because functions within execute() function like
|
"""Running as Modal Event because functions within execute() function like
|
||||||
animation_workspace_delete_others() changed UI context that needs to be refreshed.
|
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"""
|
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
|
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'}
|
return {'PASS_THROUGH'}
|
||||||
|
|
||||||
def invoke(self, context: bpy.types.Context, event: bpy.types.Event) -> Set[str]:
|
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()
|
shot_builder.build()
|
||||||
#Load EDIT
|
#Load EDIT
|
||||||
bpy.ops.kitsu.con_detect_context() #TODO CONFIRM AND CHECK IF OVERRIDE IS NEEDED
|
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
|
# Load Anim Workspace
|
||||||
animation_workspace_delete_others(self, context)
|
animation_workspace_delete_others()
|
||||||
shot = cache.shot_active_get()
|
shot = cache.shot_active_get()
|
||||||
|
|
||||||
# Initilize armatures
|
# 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
|
context.scene.frame_end = shot.nb_frames + addon_prefs.shot_builder_frame_offset
|
||||||
self._built_shot = True
|
self._built_shot = True
|
||||||
return {'RUNNING_MODAL'}
|
return {'RUNNING_MODAL'}
|
||||||
if self._built_shot and self._add_vse_area:
|
|
||||||
return {'FINISHED'}
|
|
||||||
|
|
||||||
def draw(self, context: bpy.types.Context) -> None:
|
def draw(self, context: bpy.types.Context) -> None:
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
Loading…
Reference in New Issue
Block a user