base addon
This commit is contained in:
commit
732a647572
4 files changed
+112
No files matched your search
@@ -0,0 +1,43 @@
|
||||
"""Sidebar UI."""
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
# Panel like kabaret ipc
|
||||
# class WTDToolsPanel(bpy.types.Panel):
|
||||
#
|
||||
# bl_idname = "wtd_tools.ui.panel"
|
||||
# bl_label = "WTD TOOLS"
|
||||
# bl_space_type = "VIEW_3D"
|
||||
# bl_region_type = "UI"
|
||||
# bl_category = "WTD"
|
||||
#
|
||||
# def draw(self, context) -> None:
|
||||
# #wm = context.window_manager
|
||||
# layout = self.layout
|
||||
#
|
||||
# build_op_row = layout.row()
|
||||
# build_op_row.operator("wtdtools.build", text = "Build scene")
|
||||
|
||||
|
||||
class WTDToolsMenu(bpy.types.Menu):
|
||||
bl_label = "WTDTools"
|
||||
bl_idname = "wtd_tools.ui.menu"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.operator("wtd_tools.build", text="Build")
|
||||
|
||||
def draw_item(self, context):
|
||||
self.layout.menu(WTDToolsMenu.bl_idname)
|
||||
|
||||
|
||||
def register() -> None:
|
||||
#bpy.utils.register_class(WTDToolsPanel)
|
||||
bpy.utils.register_class(WTDToolsMenu)
|
||||
bpy.types.TOPBAR_MT_editor_menus.append(draw_item)
|
||||
|
||||
def unregister() -> None:
|
||||
# bpy.utils.unregister_class(WTDToolsPanel)
|
||||
bpy.utils.unregister_class(WTDToolsMenu)
|
||||
bpy.types.TOPBAR_MT_editor_menus.remove(draw_item)
|
||||
Reference in new issue
Block a user