ValidShape/README.md

116 lines
2.8 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.

# ValidShape
Maya Deformer Node Plugin for mesh validation with license checking
## 功能
### ValidShape Plugin
- **ValidShape** - Maya Deformer Node可根據授權檔案驗證並對 Mesh 進行變形
- 檢查授權檔案格式是否包含有效日期
- 當授權無效時,使用雜訊對 Mesh 進行變形Deform Object to noise
- 支援 Maya 2022 至 Maya 2026
### ProtectAsset Plugin
- **ProtectAsset** - 加密保護 Maya 資產的命令
- 對 Mesh 幾何進行加密處理
- 自動掛載解密 Deformer
## 專案結構
```
ValidShape/
├── CMakeLists.txt # Root CMake configuration
├── CMakePresets.json # CMake presets (Maya 2022-2026)
├── src/
│ ├── ValidAsset/ # ValidShape plugin source
│ │ ├── ValidShape.cpp/h # Deformer node implementation
│ │ ├── LicenseChecker.cpp/h
│ │ ├── EncryptCommand.cpp/h
│ │ ├── pluginMain.cpp
│ │ └── scripts/
│ │ └── AEValidShapeTemplate.mel
│ ├── ProtectAsset/ # ProtectAsset plugin source
│ │ ├── ProtectAssetCommand.cpp/h
│ │ └── plugin.cpp
│ └── CipherProvider.h # Shared encryption utilities
├── cmake/modules/
│ └── FindMaya.cmake # Maya SDK finder
├── install/ # Installed plugins
├── icons/ # Icons
└── build/ # Build output
```
## 編譯需求
### 必要工具
- Visual Studio 2022
- CMake 3.21+
- Maya SDK 2022/2023/2024/2025/2026
### 編譯方式
```bash
# 使用 CMake Preset 編譯
cmake --preset release
cmake --build build --config Release
# 安裝
cmake --install build --config Release
```
### Maya 版本對應
| CMake Preset | Maya 版本 |
|-------------|-----------|
| maya2022 | Maya 2022 |
| maya2023 | Maya 2023 |
| maya2024 | Maya 2024 |
| maya2025 | Maya 2025 |
| maya2026 | Maya 2026 |
## 測試方式
### 設定環境變數
```bash
# 設定 Maya module 路徑
set MAYYA_MODULE_PATH=D:\workspace\ValidShape\install
```
### 測試指令
#### 使用 mayapy.exe 測試 Load Plugin
```bash
"C:\Program Files\Autodesk\Maya2023\bin\mayapy.exe"
```
#### 使用 maya.exe + MEL 測試 Viewport 顯示
```bash
"C:\Program Files\Autodesk\Maya2023\bin\maya.exe"
```
### MEL 測試指令
```mel
# Load plugin
loadPlugin "D:/workspace/ValidShape/install/plug-ins/2023/ValidShape.mll";
# Create test mesh
polySphere;
# Apply ValidShape deformer
select pSphere1;
deformer -type "ValidShape";
```
## 輸出檔案
編譯後的 plugin 會輸出至:
| 類型 | 路徑 |
|-----|------|
| `.mll` | `build/bin/Release/[PluginName].mll` |
| `.mod` | `install/ValidShape.mod` |
| MEL | `install/scripts/AEValidShapeTemplate.mel` |
## 授權
Copyright © 2024. All rights reserved.