Files
Avatar-Toolkit/ui/credits_support.py
T
Yusarina fe8f5f69d5 Plugin Registration Changes
- 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.
2024-12-02 01:52:11 +00:00

54 lines
2.1 KiB
Python

import bpy
from .main_panel import AvatarToolKit_PT_AvatarToolkitPanel, CATEGORY_NAME
from ..core.translations import t
from ..core.common import open_web_after_delay_multi_threaded
class AvatarToolkit_PT_CreditsSupport(bpy.types.Panel):
bl_label = t("CreditsSupport.label")
bl_idname = "OBJECT_PT_avatar_toolkit_credits_support"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = CATEGORY_NAME
bl_parent_id = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
bl_order = 10
def draw(self, context):
layout = self.layout
layout.label(text=t("CreditsSupport.credits_title"))
box = layout.box()
column = box.column(align=True)
column.scale_y = 0.7
column.label(text=t("CreditsSupport.credits_text1"))
column.label(text=t("CreditsSupport.credits_text2"))
column.label(text=t("CreditsSupport.credits_text3"))
column.label(text=t("CreditsSupport.credits_text4"))
layout.separator()
layout.label(text=t("CreditsSupport.support_title"))
box = layout.box()
column = box.column(align=True)
column.scale_y = 0.7
column.label(text=t("CreditsSupport.support_text1"))
column.label(text=t("CreditsSupport.support_text2"))
row = column.row()
row.scale_y = 1.5
row.operator("wm.url_open", text=t("CreditsSupport.support_button")).url = "https://neoneko.xyz/supportus.html"
layout.separator()
layout.label(text=t("CreditsSupport.help_title"))
box = layout.box()
column = box.column(align=True)
column.scale_y = 0.7
column.label(text=t("CreditsSupport.help_text1"))
column.label(text=t("CreditsSupport.help_text2"))
row = column.row()
row.scale_y = 1.5
row.operator("wm.url_open", text=t("CreditsSupport.wiki_button")).url = "https://github.com/teamneoneko/Avatar-Toolkit"
row = column.row()
row.scale_y = 1.5
row.operator("wm.url_open", text=t("CreditsSupport.discord_button")).url = "https://discord.catsblenderplugin.xyz"