Merge armatures button
This commit is contained in:
@@ -66,7 +66,7 @@ class AvatarToolKit_PT_TextureAtlasPanel(Panel):
|
||||
bl_region_type = 'UI'
|
||||
bl_category = CATEGORY_NAME
|
||||
bl_parent_id = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order = 4
|
||||
bl_order = 5
|
||||
|
||||
def draw(self, context: Context):
|
||||
layout = self.layout
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
import bpy
|
||||
from ..core.register import register_wrap
|
||||
from .panel import AvatarToolKit_PT_AvatarToolkitPanel, CATEGORY_NAME
|
||||
from bpy.types import Panel, Context
|
||||
from ..core.common import get_selected_armature
|
||||
from ..functions.translations import t
|
||||
from ..functions.armature_modifying import AvatarToolkit_OT_MergeArmatures
|
||||
|
||||
@register_wrap
|
||||
class AvatarToolkit_PT_MergeArmaturesPanel(Panel):
|
||||
bl_label = t("MergeArmatures.label")
|
||||
bl_idname = "OBJECT_PT_avatar_toolkit_merge_armatures"
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'UI'
|
||||
bl_category = CATEGORY_NAME
|
||||
bl_parent_id = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order = 4
|
||||
|
||||
def draw(self, context: Context):
|
||||
layout = self.layout
|
||||
armature = get_selected_armature(context)
|
||||
|
||||
if armature:
|
||||
layout.label(text=t("MergeArmatures.title.label"), icon='ARMATURE_DATA')
|
||||
layout.separator(factor=0.5)
|
||||
layout.prop(context.scene,property="merge_armature_source",icon="ARMATURE_DATA")
|
||||
layout.operator(operator=AvatarToolkit_OT_MergeArmatures.bl_idname,icon="ARMATURE_DATA")
|
||||
else:
|
||||
layout.label(text=t("MergeArmatures.select_armature"), icon='ERROR')
|
||||
+1
-1
@@ -11,7 +11,7 @@ class AvatarToolkitSettingsPanel(bpy.types.Panel):
|
||||
bl_region_type = 'UI'
|
||||
bl_category = CATEGORY_NAME
|
||||
bl_parent_id = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order = 6
|
||||
bl_order = 7
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ class AvatarToolkitVisemePanel(bpy.types.Panel):
|
||||
bl_region_type = 'UI'
|
||||
bl_category = CATEGORY_NAME
|
||||
bl_parent_id = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order = 5
|
||||
bl_order = 6
|
||||
|
||||
def draw(self, context: bpy.types.Context) -> None:
|
||||
layout = self.layout
|
||||
|
||||
Reference in New Issue
Block a user