Blender Kitsu: Refactor Shot Builder #183
@ -1,15 +1,13 @@
|
|||||||
import bpy
|
import bpy
|
||||||
from . import ops, ui
|
from . import ops
|
||||||
from .ui import topbar_file_new_draw_handler
|
from .ui import topbar_file_new_draw_handler
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
bpy.types.TOPBAR_MT_file_new.append(topbar_file_new_draw_handler)
|
bpy.types.TOPBAR_MT_file_new.append(topbar_file_new_draw_handler)
|
||||||
ops.register()
|
ops.register()
|
||||||
ui.register()
|
|
||||||
|
|
||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
bpy.types.TOPBAR_MT_file_new.remove(topbar_file_new_draw_handler)
|
bpy.types.TOPBAR_MT_file_new.remove(topbar_file_new_draw_handler)
|
||||||
ops.unregister()
|
ops.unregister()
|
||||||
ui.unregister()
|
|
||||||
|
@ -5,27 +5,3 @@ from typing import Any
|
|||||||
def topbar_file_new_draw_handler(self: Any, context: bpy.types.Context) -> None:
|
def topbar_file_new_draw_handler(self: Any, context: bpy.types.Context) -> None:
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
op = layout.operator("kitsu.build_new_shot", text="Shot File")
|
op = layout.operator("kitsu.build_new_shot", text="Shot File")
|
||||||
|
|
||||||
|
|
||||||
class KITSU_PT_new_shot_panel(bpy.types.Panel): # TODO Remove (for testing only)
|
|
||||||
bl_space_type = "VIEW_3D"
|
|
||||||
bl_region_type = "UI"
|
|
||||||
bl_label = "New Shot"
|
|
||||||
bl_category = "New Shot"
|
|
||||||
|
|
||||||
def draw(self, context):
|
|
||||||
self.layout.operator("kitsu.build_new_shot")
|
|
||||||
self.layout.operator("kitsu.save_shot_builder_hooks")
|
|
||||||
|
|
||||||
|
|
||||||
classes = (KITSU_PT_new_shot_panel,)
|
|
||||||
|
|
||||||
|
|
||||||
def register():
|
|
||||||
for cls in classes:
|
|
||||||
bpy.utils.register_class(cls)
|
|
||||||
|
|
||||||
|
|
||||||
def unregister():
|
|
||||||
for cls in reversed(classes):
|
|
||||||
bpy.utils.unregister_class(cls)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user