MetaWhiz/Readme.md
2025-04-17 13:00:39 +08:00

139 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MetaWhiz - Maya MetaHuman 插件
## 项目概述
- **语言**基于Python
- **Maya版本**2022, 2023, 2024, 2025
- **目标**本项目是一个Maya自定义MetaHuman插件
- **功能**提供与MetaHuman相同拓扑的模型或自定义3D模型的处理功能包括
- 自定义绑定
- 编辑DNA
- 校准骨骼位置
- 保存/载入DNA
- 导出FBX
- 批量导出BlendShape
- 编辑BlendShape
## 代码规则
- Cascade使用中文回复
- 代码注释用英文
- Reference路径不参与功能实现只作为参考可以从中拷贝必要的文件到当前项目中但不可直接引用
- UI样式参考SuperRiggingEditor使用PySide的QtWidgets、QtLayouts、QtConnect等功能
## 参考文档
- DNA 校准文档:[MetaHuman DNA Calibration](https://epicgames.github.io/MetaHuman-DNA-Calibration/index.html)
- DNA 校准文档:`Reference\MetaHuman-DNA-Calibration\docs`
- Metahuman文档`Reference\docs\Metahuman.pdf`
- SuperRiggingEditor文档`Reference\docs\SuperRiggingEditor.pdf`
## 代码参考
- Metahuman DNA 校准器:`Reference\MetaHuman-DNA-Calibration`
- SuperRiggingEditor`Reference\SuperRiggingEditor`
- MSLiveLink`Reference\MSLiveLink`
**参考指向**
- MetaHuman-DNA-Calibration主要参考DNA编辑等功能
- SuperRiggingEditor主要参考UI样式和对应的UI元素
## 项目结构
### 配置文件
- `config.py`:全局配置文件
### 主要文件
- `Install.py`:安装和卸载主程序
- `scripts\Main.py`:主程序入口文件
- `scripts\ui\`UI程序模块目录
- `scripts\utils\`:功能模块目录
- `scripts\style\`:样式文件目录
### 资源文件
- `assets`:资源文件目录
- `icons`:图标文件目录
- `icons\logo.png`Logo图标文件
- `plugins`:插件文件目录
## 安装说明
1. 将整个项目文件夹复制到您的Maya插件目录或任意位置
2. 在Maya中运行以下Python代码
```python
import maya.cmds as cmds
import sys
# 替换为您的项目路径
project_path = "path/to/Tool"
if project_path not in sys.path:
sys.path.append(project_path)
# 运行安装程序
import Install
Install.main()
```
## 使用说明
安装完成后可以通过Maya架子上的Tool按钮启动插件或者运行以下Python代码
```python
import maya.cmds as cmds
import sys
# 替换为您的项目路径
project_path = "path/to/Tool"
if project_path not in sys.path:
sys.path.append(project_path)
# 运行主程序
from scripts import Main
Main.main()
```
## 功能模块说明
### DNA编辑器
- 支持加载和保存DNA文件
- 编辑DNA参数和属性
- 从选中模型创建DNA
- 导出DNA文件
### 骨骼校准
- 自动和手动校准骨骼位置
- 加载参考骨骼
- 可视化骨骼差异
- 重置和应用校准数据
### 自定义绑定
- 支持多种绑定方法
- 导入和导出权重
- 权重绘制工具
- 权重镜像和裁剪
### BlendShape编辑
- 创建和管理BlendShape
- 添加、移除和编辑目标
- 批量导出目标
- 连接到控制器
## 技术要求
- Maya 2022或更高版本
- Python 3.7+
- PySide2/PySide6
## 联系与支持
如有任何问题或建议,请联系项目维护者。