fe8f5f69d5
- Re-wrote how the plugin registers itself. - No longer need @register_wrapper classes get auto detected and added. - The new Auto loader is much better then the old way, no longer need "if "bpy" not in locals():" this was an old way of doing things and wasn't really efficient. using auto_load.py provides several advantages: - It automatically discovers and loads all modules in the addon. - It handles dependencies between classes correctly through topological sorting. - It manages registration order automatically. - It properly handles unregistration in the correct order. This approach is much less error prone and I not had any issues so far. However it still needs testing fully. I have also start to re-organise files into folders as well, this is going to be needed so we don't have a long list of files as Avatar Toolkit is getting larger then i originally planned.
15 lines
428 B
Python
15 lines
428 B
Python
import bpy
|
|
from ..core.translations import t
|
|
from .main_panel import draw_title
|
|
|
|
class UVTools_PT_MainPanel(bpy.types.Panel):
|
|
bl_label = t("AvatarToolkit.label")
|
|
bl_idname = "OBJECT_PT_avatar_toolkit_uv"
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
bl_region_type = 'UI'
|
|
bl_category = "Avatar Toolkit"
|
|
|
|
def draw(self: bpy.types.Panel, context: bpy.types.Context):
|
|
layout = self.layout
|
|
draw_title(self)
|