添加VRM网格工具插件,包含以下主要功能: - Body网格分离:将非皮肤材质面分离为独立对象 - UV边融并:根据预定义UV数据将三角面转换为四边面 - 提供独立面板和操作符,与VRM官方插件兼容 - 包含材质处理顺序和自动转换逻辑 - 添加JSON数据文件和工具函数
46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
# SPDX-License-Identifier: MIT
|
|
# VRM Mesh Tools - Standalone mesh separation and UV edge merging tools
|
|
|
|
bl_info = {
|
|
"name": "VRM Mesh Tools",
|
|
"author": "VRM Mesh Tools Contributors",
|
|
"version": (1, 0, 0),
|
|
"blender": (4, 2, 0),
|
|
"location": "View3D > Sidebar > VRM Tools",
|
|
"description": "Standalone mesh separation and UV edge merging tools for VRM models",
|
|
"warning": "",
|
|
"support": "COMMUNITY",
|
|
"category": "Mesh",
|
|
}
|
|
|
|
from .ops import (
|
|
VRM_TOOLS_OT_separate_non_skin_faces,
|
|
VRM_TOOLS_OT_merge_uv_edges,
|
|
)
|
|
from .panel import (
|
|
VRM_TOOLS_PT_mesh_separator,
|
|
)
|
|
|
|
# Classes to register
|
|
_classes: list[type] = [
|
|
VRM_TOOLS_OT_separate_non_skin_faces,
|
|
VRM_TOOLS_OT_merge_uv_edges,
|
|
VRM_TOOLS_PT_mesh_separator,
|
|
]
|
|
|
|
|
|
def register() -> None:
|
|
"""Register all classes for the addon."""
|
|
import bpy
|
|
|
|
for cls in _classes:
|
|
bpy.utils.register_class(cls)
|
|
|
|
|
|
def unregister() -> None:
|
|
"""Unregister all classes for the addon."""
|
|
import bpy
|
|
|
|
for cls in reversed(_classes):
|
|
bpy.utils.unregister_class(cls)
|