feat: 添加VRM网格工具插件,支持网格分离和UV边融并功能
添加VRM网格工具插件,包含以下主要功能: - Body网格分离:将非皮肤材质面分离为独立对象 - UV边融并:根据预定义UV数据将三角面转换为四边面 - 提供独立面板和操作符,与VRM官方插件兼容 - 包含材质处理顺序和自动转换逻辑 - 添加JSON数据文件和工具函数
This commit is contained in:
45
__init__.py
Normal file
45
__init__.py
Normal file
@@ -0,0 +1,45 @@
|
||||
# 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)
|
||||
Reference in New Issue
Block a user