- 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
34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
# SPDX-License-Identifier: MIT OR GPL-3.0-or-later
|
|
import bpy
|
|
|
|
from .abstract_base_vrm_exporter import AbstractBaseVrmExporter
|
|
|
|
|
|
class glTF2ExportUserExtension:
|
|
def __init__(self) -> None:
|
|
context = bpy.context
|
|
|
|
self.object_name_to_modifier_names = (
|
|
AbstractBaseVrmExporter.enter_hide_mtoon1_outline_geometry_nodes(context)
|
|
)
|
|
|
|
# 3 arguments in Blender 2.93.0
|
|
# https://github.com/KhronosGroup/glTF-Blender-IO/blob/709630548cdc184af6ea50b2ff3ddc5450bc0af3/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py#L68
|
|
# 5 arguments in Blender 3.3.0
|
|
# https://github.com/KhronosGroup/glTF-Blender-IO/blob/92061fa5b8058c8dff964c9bf177e079926b9671/addons/io_scene_gltf2/blender/exp/gltf2_blender_export.py#L85
|
|
def gather_gltf_hook(
|
|
self,
|
|
# The number of arguments and specifications vary widely from version to version
|
|
# of the glTF 2.0 add-on.
|
|
_arg1: object,
|
|
_arg2: object,
|
|
_arg3: object = None,
|
|
_arg4: object = None,
|
|
) -> None:
|
|
context = bpy.context
|
|
|
|
AbstractBaseVrmExporter.exit_hide_mtoon1_outline_geometry_nodes(
|
|
context, self.object_name_to_modifier_names
|
|
)
|
|
self.object_name_to_modifier_names.clear()
|