Files
blender-vrm/common/human_bone_mapper/unreal_mapping.py
小煜 091ad6a49a feat: Add VRM Blender addon with complete import/export functionality
- Add core VRM addon infrastructure with manifest and registration
- Add common utilities module with file system, logging, and conversion helpers
- Add human bone mapper with support for multiple rigging standards (Mixamo, MMD, Unreal, Rigify, etc.)
- Add VRM 0.x and 1.x format support with property groups and handlers
- Add editor UI panels for VRM metadata, spring bones, and MToon materials
- Add exporter with glTF2 extension support for VRM format serialization
- Add importer with scene reconstruction and armature generation
- Add MToon shader support with auto-setup and material migration
- Add spring bone physics simulation with constraint handling
- Add node constraint editor for advanced rigging control
- Add comprehensive validation and error handling with user dialogs
- Add scene watcher for real-time property synchronization
- Add workspace management and preference system
- Include Python cache files and Blender manifest configuration
- This is the initial commit establishing the complete VRM addon ecosystem for Blender
2026-01-01 14:21:56 +08:00

63 lines
3.3 KiB
Python

# SPDX-License-Identifier: MIT OR GPL-3.0-or-later
from collections.abc import Mapping
from typing import Final
from ..vrm1.human_bone import HumanBoneSpecification, HumanBoneSpecifications
MAPPING: Final[Mapping[str, HumanBoneSpecification]] = {
"pelvis": HumanBoneSpecifications.HIPS,
"spine_01": HumanBoneSpecifications.SPINE,
"spine_02": HumanBoneSpecifications.CHEST,
"spine_03": HumanBoneSpecifications.UPPER_CHEST,
"neck_01": HumanBoneSpecifications.NECK,
"head": HumanBoneSpecifications.HEAD,
"clavicle_r": HumanBoneSpecifications.RIGHT_SHOULDER,
"upperarm_r": HumanBoneSpecifications.RIGHT_UPPER_ARM,
"lowerarm_r": HumanBoneSpecifications.RIGHT_LOWER_ARM,
"hand_r": HumanBoneSpecifications.RIGHT_HAND,
"clavicle_l": HumanBoneSpecifications.LEFT_SHOULDER,
"upperarm_l": HumanBoneSpecifications.LEFT_UPPER_ARM,
"lowerarm_l": HumanBoneSpecifications.LEFT_LOWER_ARM,
"hand_l": HumanBoneSpecifications.LEFT_HAND,
"thigh_r": HumanBoneSpecifications.RIGHT_UPPER_LEG,
"calf_r": HumanBoneSpecifications.RIGHT_LOWER_LEG,
"foot_r": HumanBoneSpecifications.RIGHT_FOOT,
"ball_r": HumanBoneSpecifications.RIGHT_TOES,
"thigh_l": HumanBoneSpecifications.LEFT_UPPER_LEG,
"calf_l": HumanBoneSpecifications.LEFT_LOWER_LEG,
"foot_l": HumanBoneSpecifications.LEFT_FOOT,
"ball_l": HumanBoneSpecifications.LEFT_TOES,
"thumb_01_r": HumanBoneSpecifications.RIGHT_THUMB_METACARPAL,
"thumb_02_r": HumanBoneSpecifications.RIGHT_THUMB_PROXIMAL,
"thumb_03_r": HumanBoneSpecifications.RIGHT_THUMB_DISTAL,
"thumb_01_l": HumanBoneSpecifications.LEFT_THUMB_METACARPAL,
"thumb_02_l": HumanBoneSpecifications.LEFT_THUMB_PROXIMAL,
"thumb_03_l": HumanBoneSpecifications.LEFT_THUMB_DISTAL,
"index_01_r": HumanBoneSpecifications.RIGHT_INDEX_PROXIMAL,
"index_02_r": HumanBoneSpecifications.RIGHT_INDEX_INTERMEDIATE,
"index_03_r": HumanBoneSpecifications.RIGHT_INDEX_DISTAL,
"index_01_l": HumanBoneSpecifications.LEFT_INDEX_PROXIMAL,
"index_02_l": HumanBoneSpecifications.LEFT_INDEX_INTERMEDIATE,
"index_03_l": HumanBoneSpecifications.LEFT_INDEX_DISTAL,
"middle_01_r": HumanBoneSpecifications.RIGHT_MIDDLE_PROXIMAL,
"middle_02_r": HumanBoneSpecifications.RIGHT_MIDDLE_INTERMEDIATE,
"middle_03_r": HumanBoneSpecifications.RIGHT_MIDDLE_DISTAL,
"middle_01_l": HumanBoneSpecifications.LEFT_MIDDLE_PROXIMAL,
"middle_02_l": HumanBoneSpecifications.LEFT_MIDDLE_INTERMEDIATE,
"middle_03_l": HumanBoneSpecifications.LEFT_MIDDLE_DISTAL,
"ring_01_r": HumanBoneSpecifications.RIGHT_RING_PROXIMAL,
"ring_02_r": HumanBoneSpecifications.RIGHT_RING_INTERMEDIATE,
"ring_03_r": HumanBoneSpecifications.RIGHT_RING_DISTAL,
"ring_01_l": HumanBoneSpecifications.LEFT_RING_PROXIMAL,
"ring_02_l": HumanBoneSpecifications.LEFT_RING_INTERMEDIATE,
"ring_03_l": HumanBoneSpecifications.LEFT_RING_DISTAL,
"pinky_01_r": HumanBoneSpecifications.RIGHT_LITTLE_PROXIMAL,
"pinky_02_r": HumanBoneSpecifications.RIGHT_LITTLE_INTERMEDIATE,
"pinky_03_r": HumanBoneSpecifications.RIGHT_LITTLE_DISTAL,
"pinky_01_l": HumanBoneSpecifications.LEFT_LITTLE_PROXIMAL,
"pinky_02_l": HumanBoneSpecifications.LEFT_LITTLE_INTERMEDIATE,
"pinky_03_l": HumanBoneSpecifications.LEFT_LITTLE_DISTAL,
}
CONFIG: Final = ("Unreal", MAPPING)