restore
This commit is contained in:
parent
483c35d1bf
commit
c873214fcc
17
__init__.py
17
__init__.py
@ -4,7 +4,6 @@ import bpy
|
|||||||
|
|
||||||
from . import operators, properties, ui, functions
|
from . import operators, properties, ui, functions
|
||||||
from .functions import read_shelves
|
from .functions import read_shelves
|
||||||
from .properties import CustomShelfProps, CustomShelfSettings
|
|
||||||
|
|
||||||
if "bpy" in locals():
|
if "bpy" in locals():
|
||||||
import importlib
|
import importlib
|
||||||
@ -40,7 +39,6 @@ bl_classes = [
|
|||||||
operators.CSHELF_OT_open_shelf_folder,
|
operators.CSHELF_OT_open_shelf_folder,
|
||||||
operators.CSHELF_OT_add_script,
|
operators.CSHELF_OT_add_script,
|
||||||
operators.CSHELF_OT_set_tag_filter,
|
operators.CSHELF_OT_set_tag_filter,
|
||||||
operators.CustomShelfAddonPreferences,
|
|
||||||
ui.CSHELF_MT_text_editor,
|
ui.CSHELF_MT_text_editor,
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -51,12 +49,13 @@ def draw_menu(self, context: bpy.types.Context):
|
|||||||
|
|
||||||
def register():
|
def register():
|
||||||
for bl_class in bl_classes:
|
for bl_class in bl_classes:
|
||||||
|
print(f"register {bl_class}")
|
||||||
bpy.utils.register_class(bl_class)
|
bpy.utils.register_class(bl_class)
|
||||||
|
|
||||||
# bpy.types.Scene.CustomShelf = bpy.props.PointerProperty(type=CustomShelfSettings)
|
bpy.types.Scene.CustomShelf = bpy.props.PointerProperty(type=properties.CustomShelfSettings)
|
||||||
# bpy.types.WindowManager.CustomShelf = bpy.props.PointerProperty(
|
bpy.types.WindowManager.CustomShelf = bpy.props.PointerProperty(
|
||||||
# type=CustomShelfProps
|
type=properties.CustomShelfProps
|
||||||
# )
|
)
|
||||||
|
|
||||||
bpy.types.TEXT_MT_editor_menus.append(draw_menu)
|
bpy.types.TEXT_MT_editor_menus.append(draw_menu)
|
||||||
|
|
||||||
@ -78,15 +77,15 @@ def register():
|
|||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
# unregister panel :
|
# unregister panel :
|
||||||
for panel in CustomShelfSettings.panel_list:
|
for panel in properties.CustomShelfSettings.panel_list:
|
||||||
try:
|
try:
|
||||||
bpy.utils.unregister_class(panel)
|
bpy.utils.unregister_class(panel)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
bpy.types.TEXT_MT_editor_menus.remove(draw_menu)
|
bpy.types.TEXT_MT_editor_menus.remove(draw_menu)
|
||||||
# del bpy.types.Scene.CustomShelf
|
del bpy.types.Scene.CustomShelf
|
||||||
# del bpy.types.WindowManager.CustomShelf
|
del bpy.types.WindowManager.CustomShelf
|
||||||
|
|
||||||
for bl_class in bl_classes:
|
for bl_class in bl_classes:
|
||||||
bpy.utils.unregister_class(bl_class)
|
bpy.utils.unregister_class(bl_class)
|
||||||
|
|||||||
10
operators.py
10
operators.py
@ -392,13 +392,3 @@ class CSHELF_OT_add_script(Operator):
|
|||||||
bl_props.tab_enum = tab
|
bl_props.tab_enum = tab
|
||||||
|
|
||||||
return context.window_manager.invoke_props_dialog(self, width=500)
|
return context.window_manager.invoke_props_dialog(self, width=500)
|
||||||
|
|
||||||
|
|
||||||
#class TagFilterItem(PropertyGroup):
|
|
||||||
# value: StringProperty(name="Tag")
|
|
||||||
|
|
||||||
|
|
||||||
class CustomShelfAddonPreferences(AddonPreferences):
|
|
||||||
bl_idname = __name__
|
|
||||||
|
|
||||||
#tag_filter_items: CollectionProperty(type=TagFilterItem)
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user