Move Anim_Setup
module into Blender_Kitsu
#5
@ -6,7 +6,7 @@ from blender_kitsu import prefs
|
|||||||
from blender_kitsu import cache
|
from blender_kitsu import cache
|
||||||
|
|
||||||
|
|
||||||
def animation_workspace_vse_area_add(self, context:bpy.types.Context):
|
def animation_workspace_vse_area_add(context:bpy.types.Context):
|
||||||
"""Split smallest 3D View in current workspace"""
|
"""Split smallest 3D View in current workspace"""
|
||||||
for workspace in [workspace for workspace in bpy.data.workspaces if workspace.name == "Animation"]:
|
for workspace in [workspace for workspace in bpy.data.workspaces if workspace.name == "Animation"]:
|
||||||
context.window.workspace = workspace
|
context.window.workspace = workspace
|
||||||
@ -19,11 +19,11 @@ def animation_workspace_vse_area_add(self, context:bpy.types.Context):
|
|||||||
small_view_3d.ui_type = "SEQUENCE_EDITOR"
|
small_view_3d.ui_type = "SEQUENCE_EDITOR"
|
||||||
small_view_3d.spaces[0].view_type = "PREVIEW"
|
small_view_3d.spaces[0].view_type = "PREVIEW"
|
||||||
|
|
||||||
def animation_workspace_delete_others(self, context:bpy.types.Context):
|
def animation_workspace_delete_others():
|
||||||
"""Delete any workspace that is not an animation workspace"""
|
"""Delete any workspace that is not an animation workspace"""
|
||||||
for ws in bpy.data.workspaces:
|
for ws in bpy.data.workspaces:
|
||||||
if ws.name != "Animation":
|
if ws.name != "Animation":
|
||||||
bpy.ops.workspace.delete({"workspace": ws})
|
bpy.ops.workspace.delete({"workspace": ws})
|
||||||
self.report({"INFO"}, "Deleted non Animation workspaces")
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from typing import Set
|
from typing import Set
|
||||||
from blender_kitsu.shot_builder.anim_setup.core import animation_workspace_delete_others, animation_workspace_vse_area_add
|
from blender_kitsu.shot_builder.anim_setup.core import animation_workspace_delete_others, animation_workspace_vse_area_add
|
||||||
from blender_kitsu.shot_builder.editorial.core import editorial_export_get_latest
|
|
||||||
class ANIM_SETUP_OT_setup_workspaces(bpy.types.Operator):
|
class ANIM_SETUP_OT_setup_workspaces(bpy.types.Operator):
|
||||||
bl_idname = "anim_setup.setup_workspaces"
|
bl_idname = "anim_setup.setup_workspaces"
|
||||||
bl_label = "Setup Workspace"
|
bl_label = "Setup Workspace"
|
||||||
@ -9,6 +8,7 @@ class ANIM_SETUP_OT_setup_workspaces(bpy.types.Operator):
|
|||||||
|
|
||||||
def execute(self, context: bpy.types.Context) -> Set[str]:
|
def execute(self, context: bpy.types.Context) -> Set[str]:
|
||||||
animation_workspace_delete_others(self, context)
|
animation_workspace_delete_others(self, context)
|
||||||
|
self.report({"INFO"}, "Deleted non Animation workspaces")
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
class ANIM_SETUP_OT_animation_workspace_vse_area_add(bpy.types.Operator):
|
class ANIM_SETUP_OT_animation_workspace_vse_area_add(bpy.types.Operator):
|
||||||
|
Loading…
Reference in New Issue
Block a user