# BatchWeaver: Batch Export and Automation Guide
~ Batch Output Guide for Multiple Angles and Specific Frame Ranges ~

Last Updated: 2026/04/20

## 1. BatchWeaver Function Definition and Operational Benefits

BatchWeaver is a **"Batch Automation Tool"** for sequentially executing the motion conversion process of MotionWeaver based on an external parameter definition file (CSV).

### Optimization via Implementation
By automating individual manual conversions, it becomes possible to efficiently mass-produce assets under different conditions from the same source data (BVH).
- **Efficient Multi-Angle Output**: From a single "Walking (Walking.bvh)" data, it batch-generates guide data for all directions necessary for animation production, such as front, side, back, and high-angle.
- **Elimination of Human Error**: Since processing is performed based on pre-defined CSVs, it prevents minute discrepancies in angles and inconsistencies in naming conventions caused by manual settings.

---

## 2. Operational Workflow: 3 Stages of Batch Processing

The system is operated through three phases: Definition, Generation, and Execution.

### Phase 1: Specifying Source Data (BVH)
Select the 3D motion data that serves as the standard for conversion. The system automatically scans the total number of frames and calculates reference values for subsequent range specification.

### Phase 2: Logical Construction of Parameter Instruction Sheet (CSV)
Prepare a CSV file describing "Projection Angles," "Frame Ranges," and "Output Labels."

### Phase 3: Generation of Execution File (RUN.bat) and Batch Launch
By operating buttons on the UI, generate **`RUN.bat`**, which encapsulates processing instructions. This execution file sequentially processes all specified conversion processes and automatically places the deliverables in the directory.

---

## 3. UI Components and Operation Specifications

### [1. Source BVH File]
Specifies the motion data (BVH format) that serves as the source for batch processing. After loading is complete, the total number of frames included in the current file is displayed in the system log.

### [2. Parameter CSV File]
Selects the CSV file defining conversion conditions for each row.
- **Schema Generation**: If a new file path is specified via the "Select / Create" button, the system automatically generates a standard header definition (template).

### [3. Generate Batch File]
Generates a batch processing instruction sheet (bat file) at the OS level using the "GENERATE RUN.bat" command.

---

## 4. Logical Design and Construction Protocol of Instruction Sheet (CSV)

Each row in the CSV corresponds to one independent motion conversion process.

| Item Name | Definition | Operational Notes |
| :--- | :--- | :--- |
| **X_ROT_DEG** | X-axis Rotation (Pitch) | Positive values for high-angle, negative values for low-angle. |
| **Y_ROT_DEG** | Y-axis Rotation (Yaw) | Defines the viewpoint direction. 45.0 (Diagonal), 90.0 (Profile), 180.0 (Back). |
| **Z_ROT_DEG** | Z-axis Rotation (Roll) | Basically recommended to keep at 0.0. |
| **START_FRAME** | Start Frame | Specifies the frame number to start extraction. |
| **END_FRAME_EXCL**| End Frame | Frame number to end extraction (Exclusive). |
| **MODE** | Conversion Mode | **IMPORTANT**: Specify `mode1` as a rule. |
| **LABEL** | Output File Identifier | Attach a label that is easy to manage visually, such as `Walk_Right_45`. |

> [!TIP]
> **Selection Criteria for Conversion Modes "mode1" and "mode2"**
> - **`mode1` (Standard Conversion)**: Maintains the characteristics of the initial pose to the maximum extent and performs anatomically natural adaptation. Apply this mode to all rows normally.
> - **`mode2` (Exception Correction Mode)**: An alternative when abnormal overlapping or twisting of joints occurs in specific data. Forcibly inserts and restores the standard T-pose (base pose) at frame 1 to avoid rigging inconsistencies.

---

## 5. Advanced Operational Stack

### Fragmentation of Assets via Partial Extraction (Chop-up)
By defining and exporting only necessary performance sections (e.g., walk start, direction change, stop) from a long duration of BVH data as individual frame ranges, the cost of duration adjustment in the post-production process can be significantly reduced.

### Construction of Motion Catalog (Actions)
Import the `_3d.csv` files mass-produced with this tool into Moho's "Actions" function.
An angle-specific "movement database" independent of the main timeline will be constructed. This realizes an advanced directorial environment where appropriate angle data can be applied like "stamps" according to the production phase.

---

## 6. Exception Handling and Technical Support

If there are inconsistencies in the description format of the instruction sheet (CSV syntax), batch processing will not be completed normally. Missing commas or data type mismatches will cause parsing errors by the system.

If identifying the problem is difficult, please present logical diagnostic data, along with the **"created CSV file"** and **"source BVH,"** to the developer or specialist in charge. Technical troubles that hinder the excitement of creation can be promptly resolved by accurate correction based on data.
