1. Always Start with VStitcher UI + Python Playground
Before developing or running anything headless:
Start with VStitcher UI
Open the Python Playground plugin (installed as part of VStitcher)
Why this matters:
Python Playground talks directly to the VStitcher backend via BwAPI
Every operation you execute is immediately reflected in the VStitcher UI
This gives instant visual feedback and avoids blind debugging in CLI
👉 Rule of thumb:
If it doesn’t work in Python Playground, it will not work in CLI.
2. Discover Available BwAPI Commands Quickly
Inside Python Playground:
Type:
BwApi.
Press TAB
This will display all available BwAPI commands.
Tips
Use the search / find feature inside the Playground to filter commands
This is the fastest way to discover new APIs without external documentation
Command names in Playground match those used by VStitcher-CLI scripts
3. Inspect API Requirements with help()
For any command you want to use:
help(BwApi.COMMAND_OF_INTEREST)
This shows:
Required and optional parameters
Expected data types
Return values
Usage notes
Example
help(BwApi.RenderExportByPreset)
This is the most reliable source of truth for:
What arguments are required
Why a command might fail
What output to expect
4. Learn from Existing Sample Code (Strongly Recommended)
Browzwear provides official sample scripts that cover common workflows.
Sample Plugin (Highly Recommended)
Sample Python Plugin
https://help.browzwear.com/en/articles/13066080-samplepluginpython
This plugin can be:
Installed directly into VStitcher
Used as a base for your own scripts
What You’ll Find in the Sample Plugin
The sample scripts demonstrate:
Opening garments (
.bwfiles)Accessing garment IDs and snapshots
Loading colorways and avatars
Running simulations
Rendering and exporting assets
Error handling patterns
API sequencing best practices
👉 Best practice:
Install the sample plugin, open each example, run commands step by step, and observe the result in the VStitcher UI.
5. Use Sample Code as a Plugin (Not Just as Reference)
Instead of copying code line by line:
Install the sample scripts as a VStitcher plugin
Observe:
UI changes
Simulation results
Rendering output
Error dialogs
This dramatically reduces trial-and-error when moving to CLI.
6. Validate Logic in UI Before Running Headless
Recommended workflow:
Prototype logic in Python Playground
Verify results visually in VStitcher UI
Copy the validated logic into a CLI Python script
Run the script with:
VStitcher-CLI.exe --script your_script.py
This ensures:
Correct API usage
Correct order of operations
Fewer silent failures in headless mode
7. When Something Fails — Use UI Feedback First
Many errors:
Appear as UI dialogs
Include more context than CLI logs
Are not visible when running CLI alone
If a CLI script fails:
Re-run the same logic in Python Playground
Check UI alerts and warnings
Use:
BwApi.GetLastError()
8. Combine with Error Code Documentation
If an error occurs:
VStitcher prints an error code
You can retrieve it programmatically with:
BwApi.GetLastError()
Full error code reference:
https://help.browzwear.com/en/articles/13066101-error-codes
Summary – Key Takeaways
✅ Always start in VStitcher UI + Python Playground
✅ Use
BwApi.+ TAB to discover APIs✅ Use
help()to understand required parameters✅ Learn from official sample plugins
✅ Validate visually before running headless
✅ Use UI feedback and error codes for debugging