Finale Fixes
This commit is contained in:
@@ -93,6 +93,15 @@ class AvatarToolkitSceneProperties(PropertyGroup):
|
||||
default=False
|
||||
)
|
||||
|
||||
connect_bones_min_distance: FloatProperty(
|
||||
name=t("Tools.connect_bones_min_distance"),
|
||||
description=t("Tools.connect_bones_min_distance_desc"),
|
||||
default=0.001,
|
||||
min=0.0001,
|
||||
max=0.1,
|
||||
precision=4
|
||||
)
|
||||
|
||||
merge_twist_bones: BoolProperty(
|
||||
name=t("MMD.merge_twist_bones"),
|
||||
description=t("MMD.merge_twist_bones_desc"),
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ class AvatarToolkit_PT_UpdaterPanel(bpy.types.Panel):
|
||||
bl_region_type = 'UI'
|
||||
bl_category = CATEGORY_NAME
|
||||
bl_parent_id = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order = 4
|
||||
bl_order = 8
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context: bpy.types.Context) -> None:
|
||||
|
||||
@@ -135,6 +135,12 @@ class AvatarToolKit_OT_DeleteBoneConstraints(Operator):
|
||||
def execute(self, context: Context) -> set[str]:
|
||||
"""Execute the constraint removal operation"""
|
||||
armature = get_active_armature(context)
|
||||
|
||||
# Select armature and make it active before changing mode
|
||||
bpy.ops.object.select_all(action='DESELECT')
|
||||
armature.select_set(True)
|
||||
context.view_layer.objects.active = armature
|
||||
|
||||
bpy.ops.object.mode_set(mode='POSE')
|
||||
|
||||
constraints_removed = 0
|
||||
@@ -147,6 +153,7 @@ class AvatarToolKit_OT_DeleteBoneConstraints(Operator):
|
||||
self.report({'INFO'}, t("Tools.clean_constraints_success", count=constraints_removed))
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class AvatarToolKit_OT_RemoveZeroWeightBones(Operator):
|
||||
"""Operator to remove bones with no vertex weights"""
|
||||
bl_idname = "avatar_toolkit.clean_weights"
|
||||
|
||||
@@ -106,7 +106,7 @@ class AvatarToolKit_PT_CustomPanel(Panel):
|
||||
bl_region_type = 'UI'
|
||||
bl_category = CATEGORY_NAME
|
||||
bl_parent_id = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order = 3
|
||||
bl_order = 4
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context: Context) -> None:
|
||||
|
||||
@@ -26,7 +26,7 @@ class AvatarToolKit_PT_EyeTrackingPanel(Panel):
|
||||
bl_region_type = 'UI'
|
||||
bl_category = CATEGORY_NAME
|
||||
bl_parent_id = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order = 3
|
||||
bl_order = 6
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context: Context) -> None:
|
||||
|
||||
@@ -75,11 +75,6 @@ class AvatarToolKit_PT_QuickAccessPanel(Panel):
|
||||
bl_parent_id: str = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order: int = 0
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context: Context) -> bool:
|
||||
"""Only show panel in Object or Pose mode"""
|
||||
return context.mode in {'OBJECT', 'POSE'}
|
||||
|
||||
def draw(self, context: Context) -> None:
|
||||
"""Draw the panel layout"""
|
||||
layout: UILayout = self.layout
|
||||
|
||||
@@ -36,7 +36,7 @@ class AvatarToolKit_PT_SettingsPanel(Panel):
|
||||
bl_region_type: str = 'UI'
|
||||
bl_category: str = CATEGORY_NAME
|
||||
bl_parent_id: str = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order: int = 5
|
||||
bl_order: int = 7
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context: Context) -> None:
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ class AvatarToolKit_PT_VisemesPanel(Panel):
|
||||
bl_region_type: str = 'UI'
|
||||
bl_category: str = CATEGORY_NAME
|
||||
bl_parent_id: str = AvatarToolKit_PT_AvatarToolkitPanel.bl_idname
|
||||
bl_order: int = 4
|
||||
bl_order: int = 5
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
def draw(self, context: Context) -> None:
|
||||
|
||||
Reference in New Issue
Block a user