Merge branch 'Alpha-2' into Armature_Validation_Version2
This commit is contained in:
+69
-2
@@ -421,7 +421,6 @@ standard_bones = {
|
||||
'right_eye': 'Eye.R'
|
||||
}
|
||||
|
||||
# Define standard bone hierarchies
|
||||
bone_hierarchy = [
|
||||
('Hips', 'Spine'),
|
||||
('Spine', 'Chest'),
|
||||
@@ -454,7 +453,6 @@ bone_hierarchy = [
|
||||
('Foot.R', 'Toes.R')
|
||||
]
|
||||
|
||||
# Define finger hierarchies
|
||||
finger_hierarchy = {
|
||||
'left': [
|
||||
('Hand.L', 'Thumb1.L', 'Thumb2.L', 'Thumb3.L'),
|
||||
@@ -472,3 +470,72 @@ finger_hierarchy = {
|
||||
]
|
||||
}
|
||||
|
||||
rigify_unity_names = {
|
||||
"DEF-spine": "Hips",
|
||||
"DEF-spine.001": "Spine",
|
||||
"DEF-spine.002": "Chest",
|
||||
"DEF-spine.003": "UpperChest",
|
||||
"DEF-neck": "Neck",
|
||||
"DEF-head": "Head",
|
||||
"DEF-shoulder.L": "LeftShoulder",
|
||||
"DEF-upper_arm.L": "LeftUpperArm",
|
||||
"DEF-forearm.L": "LeftLowerArm",
|
||||
"DEF-hand.L": "LeftHand",
|
||||
"DEF-shoulder.R": "RightShoulder",
|
||||
"DEF-upper_arm.R": "RightUpperArm",
|
||||
"DEF-forearm.R": "RightLowerArm",
|
||||
"DEF-hand.R": "RightHand",
|
||||
"DEF-thigh.L": "LeftUpperLeg",
|
||||
"DEF-shin.L": "LeftLowerLeg",
|
||||
"DEF-foot.L": "LeftFoot",
|
||||
"DEF-toe.L": "LeftToes",
|
||||
"DEF-thigh.R": "RightUpperLeg",
|
||||
"DEF-shin.R": "RightLowerLeg",
|
||||
"DEF-foot.R": "RightFoot",
|
||||
"DEF-toe.R": "RightToes"
|
||||
}
|
||||
|
||||
rigify_basic_unity_names = {
|
||||
"spine": "Hips",
|
||||
"spine.001": "Spine",
|
||||
"spine.002": "Chest",
|
||||
"spine.003": "UpperChest",
|
||||
"neck": "Neck",
|
||||
"head": "Head",
|
||||
"shoulder.L": "LeftShoulder",
|
||||
"upper_arm.L": "LeftUpperArm",
|
||||
"forearm.L": "LeftLowerArm",
|
||||
"hand.L": "LeftHand",
|
||||
"shoulder.R": "RightShoulder",
|
||||
"upper_arm.R": "RightUpperArm",
|
||||
"forearm.R": "RightLowerArm",
|
||||
"hand.R": "RightHand",
|
||||
"thigh.L": "LeftUpperLeg",
|
||||
"shin.L": "LeftLowerLeg",
|
||||
"foot.L": "LeftFoot",
|
||||
"toe.L": "LeftToes",
|
||||
"thigh.R": "RightUpperLeg",
|
||||
"shin.R": "RightLowerLeg",
|
||||
"foot.R": "RightFoot",
|
||||
"toe.R": "RightToes"
|
||||
}
|
||||
|
||||
rigify_unnecessary_bones = [
|
||||
'face',
|
||||
'ear.l', 'ear.r',
|
||||
'forehead',
|
||||
'cheek.t.l', 'cheek.t.r',
|
||||
'cheek.b.l', 'cheek.b.r',
|
||||
'brow.t.l', 'brow.t.r',
|
||||
'brow.b.l', 'brow.b.r',
|
||||
'jaw',
|
||||
'chin',
|
||||
'nose',
|
||||
'temple.l', 'temple.r',
|
||||
'teeth',
|
||||
'lip',
|
||||
'lid',
|
||||
'heel',
|
||||
'pelvis.'
|
||||
]
|
||||
|
||||
|
||||
+47
-2
@@ -18,6 +18,13 @@ from .common import get_armature_list, get_active_armature, get_all_meshes, Scen
|
||||
from ..functions.visemes import VisemePreview
|
||||
from ..functions.eye_tracking import set_rotation
|
||||
|
||||
class ZeroWeightBoneItem(PropertyGroup):
|
||||
"""Property group for zero weight bone list items"""
|
||||
name: StringProperty(name="Bone Name")
|
||||
selected: BoolProperty(name="Selected", default=True)
|
||||
has_children: BoolProperty(name="Has Children", default=False)
|
||||
is_deform: BoolProperty(name="Is Deform Bone", default=False)
|
||||
|
||||
def update_validation_mode(self: PropertyGroup, context: Context) -> None:
|
||||
"""Updates validation mode and saves preference"""
|
||||
logger.info(f"Updating validation mode to: {self.validation_mode}")
|
||||
@@ -361,6 +368,40 @@ class AvatarToolkitSceneProperties(PropertyGroup):
|
||||
default=True
|
||||
)
|
||||
|
||||
preserve_parent_bones: BoolProperty(
|
||||
name=t("Tools.preserve_parent_bones"),
|
||||
description=t("Tools.preserve_parent_bones_desc"),
|
||||
default=True
|
||||
)
|
||||
|
||||
target_bone_type: EnumProperty(
|
||||
name=t("Tools.target_bone_type"),
|
||||
description=t("Tools.target_bone_type_desc"),
|
||||
items=[
|
||||
('ALL', t("Tools.target_all_bones"), ""),
|
||||
('DEFORM', t("Tools.target_deform_bones"), ""),
|
||||
('NON_DEFORM', t("Tools.target_non_deform_bones"), "")
|
||||
],
|
||||
default='ALL'
|
||||
)
|
||||
|
||||
zero_weight_bones: CollectionProperty(
|
||||
type=ZeroWeightBoneItem,
|
||||
name="Zero Weight Bones",
|
||||
description="List of bones with zero weights"
|
||||
)
|
||||
|
||||
zero_weight_bones_index: IntProperty(
|
||||
name="Zero Weight Bone Index",
|
||||
default=0
|
||||
)
|
||||
|
||||
list_only_mode: BoolProperty(
|
||||
name=t("Tools.list_only_mode"),
|
||||
description=t("Tools.list_only_mode_desc"),
|
||||
default=False
|
||||
)
|
||||
|
||||
cleanup_shape_keys: BoolProperty(
|
||||
name=t('MergeArmature.cleanup_shape_keys'),
|
||||
description=t('MergeArmature.cleanup_shape_keys_desc'),
|
||||
@@ -462,6 +503,12 @@ class AvatarToolkitSceneProperties(PropertyGroup):
|
||||
materials: CollectionProperty(
|
||||
type=SceneMatClass
|
||||
)
|
||||
|
||||
merge_twist_bones: BoolProperty(
|
||||
name=t("Tools.merge_twist_bones"),
|
||||
description=t("Tools.merge_twist_bones_desc"),
|
||||
default=True
|
||||
)
|
||||
|
||||
show_found_bones: BoolProperty(
|
||||
name="Show Found Bones",
|
||||
@@ -476,8 +523,6 @@ class AvatarToolkitSceneProperties(PropertyGroup):
|
||||
default=False
|
||||
)
|
||||
|
||||
|
||||
|
||||
def register() -> None:
|
||||
"""Register the Avatar Toolkit property group"""
|
||||
logger.info("Registering Avatar Toolkit properties")
|
||||
|
||||
Reference in New Issue
Block a user