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
This commit is contained in:
2026-01-01 14:21:56 +08:00
commit 091ad6a49a
243 changed files with 60636 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
# 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]] = {
"mixamorig:Head": HumanBoneSpecifications.HEAD,
"mixamorig:Neck": HumanBoneSpecifications.NECK,
"mixamorig:Spine2": HumanBoneSpecifications.UPPER_CHEST,
"mixamorig:Spine1": HumanBoneSpecifications.CHEST,
"mixamorig:Spine": HumanBoneSpecifications.SPINE,
"mixamorig:Hips": HumanBoneSpecifications.HIPS,
"mixamorig:RightShoulder": HumanBoneSpecifications.RIGHT_SHOULDER,
"mixamorig:RightArm": HumanBoneSpecifications.RIGHT_UPPER_ARM,
"mixamorig:RightForeArm": HumanBoneSpecifications.RIGHT_LOWER_ARM,
"mixamorig:RightHand": HumanBoneSpecifications.RIGHT_HAND,
"mixamorig:LeftShoulder": HumanBoneSpecifications.LEFT_SHOULDER,
"mixamorig:LeftArm": HumanBoneSpecifications.LEFT_UPPER_ARM,
"mixamorig:LeftForeArm": HumanBoneSpecifications.LEFT_LOWER_ARM,
"mixamorig:LeftHand": HumanBoneSpecifications.LEFT_HAND,
"mixamorig:RightUpLeg": HumanBoneSpecifications.RIGHT_UPPER_LEG,
"mixamorig:RightLeg": HumanBoneSpecifications.RIGHT_LOWER_LEG,
"mixamorig:RightFoot": HumanBoneSpecifications.RIGHT_FOOT,
"mixamorig:RightToeBase": HumanBoneSpecifications.RIGHT_TOES,
"mixamorig:LeftUpLeg": HumanBoneSpecifications.LEFT_UPPER_LEG,
"mixamorig:LeftLeg": HumanBoneSpecifications.LEFT_LOWER_LEG,
"mixamorig:LeftFoot": HumanBoneSpecifications.LEFT_FOOT,
"mixamorig:LeftToeBase": HumanBoneSpecifications.LEFT_TOES,
"mixamorig:RightHandThumb1": HumanBoneSpecifications.RIGHT_THUMB_METACARPAL,
"mixamorig:RightHandThumb2": HumanBoneSpecifications.RIGHT_THUMB_PROXIMAL,
"mixamorig:RightHandThumb3": HumanBoneSpecifications.RIGHT_THUMB_DISTAL,
"mixamorig:RightHandIndex1": HumanBoneSpecifications.RIGHT_INDEX_PROXIMAL,
"mixamorig:RightHandIndex2": HumanBoneSpecifications.RIGHT_INDEX_INTERMEDIATE,
"mixamorig:RightHandIndex3": HumanBoneSpecifications.RIGHT_INDEX_DISTAL,
"mixamorig:RightHandMiddle1": HumanBoneSpecifications.RIGHT_MIDDLE_PROXIMAL,
"mixamorig:RightHandMiddle2": HumanBoneSpecifications.RIGHT_MIDDLE_INTERMEDIATE,
"mixamorig:RightHandMiddle3": HumanBoneSpecifications.RIGHT_MIDDLE_DISTAL,
"mixamorig:RightHandRing1": HumanBoneSpecifications.RIGHT_RING_PROXIMAL,
"mixamorig:RightHandRing2": HumanBoneSpecifications.RIGHT_RING_INTERMEDIATE,
"mixamorig:RightHandRing3": HumanBoneSpecifications.RIGHT_RING_DISTAL,
"mixamorig:RightHandPinky1": HumanBoneSpecifications.RIGHT_LITTLE_PROXIMAL,
"mixamorig:RightHandPinky2": HumanBoneSpecifications.RIGHT_LITTLE_INTERMEDIATE,
"mixamorig:RightHandPinky3": HumanBoneSpecifications.RIGHT_LITTLE_DISTAL,
"mixamorig:LeftHandThumb1": HumanBoneSpecifications.LEFT_THUMB_METACARPAL,
"mixamorig:LeftHandThumb2": HumanBoneSpecifications.LEFT_THUMB_PROXIMAL,
"mixamorig:LeftHandThumb3": HumanBoneSpecifications.LEFT_THUMB_DISTAL,
"mixamorig:LeftHandIndex1": HumanBoneSpecifications.LEFT_INDEX_PROXIMAL,
"mixamorig:LeftHandIndex2": HumanBoneSpecifications.LEFT_INDEX_INTERMEDIATE,
"mixamorig:LeftHandIndex3": HumanBoneSpecifications.LEFT_INDEX_DISTAL,
"mixamorig:LeftHandMiddle1": HumanBoneSpecifications.LEFT_MIDDLE_PROXIMAL,
"mixamorig:LeftHandMiddle2": HumanBoneSpecifications.LEFT_MIDDLE_INTERMEDIATE,
"mixamorig:LeftHandMiddle3": HumanBoneSpecifications.LEFT_MIDDLE_DISTAL,
"mixamorig:LeftHandRing1": HumanBoneSpecifications.LEFT_RING_PROXIMAL,
"mixamorig:LeftHandRing2": HumanBoneSpecifications.LEFT_RING_INTERMEDIATE,
"mixamorig:LeftHandRing3": HumanBoneSpecifications.LEFT_RING_DISTAL,
"mixamorig:LeftHandPinky1": HumanBoneSpecifications.LEFT_LITTLE_PROXIMAL,
"mixamorig:LeftHandPinky2": HumanBoneSpecifications.LEFT_LITTLE_INTERMEDIATE,
"mixamorig:LeftHandPinky3": HumanBoneSpecifications.LEFT_LITTLE_DISTAL,
}
CONFIG: Final = ("Mixamo", MAPPING)