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:
69
common/human_bone_mapper/microsoft_rocketbox_mapping.py
Normal file
69
common/human_bone_mapper/microsoft_rocketbox_mapping.py
Normal file
@@ -0,0 +1,69 @@
|
||||
# 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_TEMPLATE: Final[Mapping[str, HumanBoneSpecification]] = {
|
||||
"Head": HumanBoneSpecifications.HEAD,
|
||||
"REye": HumanBoneSpecifications.RIGHT_EYE,
|
||||
"LEye": HumanBoneSpecifications.LEFT_EYE,
|
||||
"MJaw": HumanBoneSpecifications.JAW,
|
||||
"Spine2": HumanBoneSpecifications.CHEST,
|
||||
"Spine1": HumanBoneSpecifications.SPINE,
|
||||
"Pelvis": HumanBoneSpecifications.HIPS,
|
||||
"R Clavicle": HumanBoneSpecifications.RIGHT_SHOULDER,
|
||||
"R UpperArm": HumanBoneSpecifications.RIGHT_UPPER_ARM,
|
||||
"R Forearm": HumanBoneSpecifications.RIGHT_LOWER_ARM,
|
||||
"R Hand": HumanBoneSpecifications.RIGHT_HAND,
|
||||
"L Clavicle": HumanBoneSpecifications.LEFT_SHOULDER,
|
||||
"L UpperArm": HumanBoneSpecifications.LEFT_UPPER_ARM,
|
||||
"L Forearm": HumanBoneSpecifications.LEFT_LOWER_ARM,
|
||||
"L Hand": HumanBoneSpecifications.LEFT_HAND,
|
||||
"R Thigh": HumanBoneSpecifications.RIGHT_UPPER_LEG,
|
||||
"R Calf": HumanBoneSpecifications.RIGHT_LOWER_LEG,
|
||||
"R Foot": HumanBoneSpecifications.RIGHT_FOOT,
|
||||
"R Toe0": HumanBoneSpecifications.RIGHT_TOES,
|
||||
"L Thigh": HumanBoneSpecifications.LEFT_UPPER_LEG,
|
||||
"L Calf": HumanBoneSpecifications.LEFT_LOWER_LEG,
|
||||
"L Foot": HumanBoneSpecifications.LEFT_FOOT,
|
||||
"L Toe0": HumanBoneSpecifications.LEFT_TOES,
|
||||
"R Finger0": HumanBoneSpecifications.RIGHT_THUMB_METACARPAL,
|
||||
"R Finger01": HumanBoneSpecifications.RIGHT_THUMB_PROXIMAL,
|
||||
"R Finger02": HumanBoneSpecifications.RIGHT_THUMB_DISTAL,
|
||||
"R Finger1": HumanBoneSpecifications.RIGHT_INDEX_PROXIMAL,
|
||||
"R Finger11": HumanBoneSpecifications.RIGHT_INDEX_INTERMEDIATE,
|
||||
"R Finger12": HumanBoneSpecifications.RIGHT_INDEX_DISTAL,
|
||||
"R Finger2": HumanBoneSpecifications.RIGHT_MIDDLE_PROXIMAL,
|
||||
"R Finger21": HumanBoneSpecifications.RIGHT_MIDDLE_INTERMEDIATE,
|
||||
"R Finger22": HumanBoneSpecifications.RIGHT_MIDDLE_DISTAL,
|
||||
"R Finger3": HumanBoneSpecifications.RIGHT_RING_PROXIMAL,
|
||||
"R Finger31": HumanBoneSpecifications.RIGHT_RING_INTERMEDIATE,
|
||||
"R Finger32": HumanBoneSpecifications.RIGHT_RING_DISTAL,
|
||||
"R Finger4": HumanBoneSpecifications.RIGHT_LITTLE_PROXIMAL,
|
||||
"R Finger41": HumanBoneSpecifications.RIGHT_LITTLE_INTERMEDIATE,
|
||||
"R Finger42": HumanBoneSpecifications.RIGHT_LITTLE_DISTAL,
|
||||
"L Finger0": HumanBoneSpecifications.LEFT_THUMB_METACARPAL,
|
||||
"L Finger01": HumanBoneSpecifications.LEFT_THUMB_PROXIMAL,
|
||||
"L Finger02": HumanBoneSpecifications.LEFT_THUMB_DISTAL,
|
||||
"L Finger1": HumanBoneSpecifications.LEFT_INDEX_PROXIMAL,
|
||||
"L Finger11": HumanBoneSpecifications.LEFT_INDEX_INTERMEDIATE,
|
||||
"L Finger12": HumanBoneSpecifications.LEFT_INDEX_DISTAL,
|
||||
"L Finger2": HumanBoneSpecifications.LEFT_MIDDLE_PROXIMAL,
|
||||
"L Finger21": HumanBoneSpecifications.LEFT_MIDDLE_INTERMEDIATE,
|
||||
"L Finger22": HumanBoneSpecifications.LEFT_MIDDLE_DISTAL,
|
||||
"L Finger3": HumanBoneSpecifications.LEFT_RING_PROXIMAL,
|
||||
"L Finger31": HumanBoneSpecifications.LEFT_RING_INTERMEDIATE,
|
||||
"L Finger32": HumanBoneSpecifications.LEFT_RING_DISTAL,
|
||||
"L Finger4": HumanBoneSpecifications.LEFT_LITTLE_PROXIMAL,
|
||||
"L Finger41": HumanBoneSpecifications.LEFT_LITTLE_INTERMEDIATE,
|
||||
"L Finger42": HumanBoneSpecifications.LEFT_LITTLE_DISTAL,
|
||||
}
|
||||
|
||||
|
||||
def prefixed_mapping(key_prefix: str) -> dict[str, HumanBoneSpecification]:
|
||||
return {key_prefix + k: v for k, v in MAPPING_TEMPLATE.items()}
|
||||
|
||||
|
||||
CONFIG_BIP01: Final = ("Microsoft Rocketbox (Bip01)", prefixed_mapping("Bip01 "))
|
||||
CONFIG_BIP02: Final = ("Microsoft Rocketbox (Bip02)", prefixed_mapping("Bip02 "))
|
||||
Reference in New Issue
Block a user