You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- All command classes inherit from this abstract base class
121
123
-`__init__(parser, config)`: Initializes with optional parser and config references
122
124
-`process(args)`: Main execution method that subclasses can override for custom behavior. Default implementation calls `exec_default_script()`
123
-
-`exec_default_script(args)`: Executes .dsa script with the same name as the command class
124
-
-`exec_remote_script(script_name, script_vars, daz_command_line)`: Static method that spawns DAZ Studio subprocess with specified script and JSON arguments
125
+
-`exec_default_script(args)`: Convenience method that calls `exec_remote_script()`with a script name matching the class name
126
+
-`exec_remote_script(script_name, script_vars, daz_command_line)`: Static method that executes scripts via subprocess or DAZ Script Server based on `DAZ_SCRIPT_SERVER_ENABLED` environment variable
125
127
-`to_dict(args, exclude)`: Static method that converts argparse.Namespace to dict, automatically excluding framework keys ('command', 'class_to_run')
126
128
127
129
**Important**: When creating a new command, you typically only need to create the class and the .dsa script. The default `process()` implementation handles everything unless you need custom Python-side logic.
128
130
129
131
## Environment Setup
130
132
131
133
Required environment variables (typically in `.env` file):
134
+
135
+
**Subprocess Mode (Default)**:
132
136
-`DAZ_ROOT`: Absolute path to DAZ Studio executable
-`DAZ_ARGS`: Optional additional arguments for DAZ Studio
134
140
141
+
**DAZ Script Server Mode (Optional)**:
142
+
-`DAZ_SCRIPT_SERVER_ENABLED`: Set to `true` to enable server mode (default: `false`)
143
+
-`DAZ_SCRIPT_SERVER_HOST`: Server host (default: `127.0.0.1`)
144
+
-`DAZ_SCRIPT_SERVER_PORT`: Server port (default: `18811`)
145
+
146
+
Note: DAZ Script Server is a separate plugin available at https://github.com/bluemoonfoundry/vangard-daz-script-server. When enabled, commands are sent as POST requests to `http://<host>:<port>/execute` with JSON payload containing `scriptFile` (absolute path) and `args` (JSON object) instead of spawning DAZ Studio subprocesses.
147
+
135
148
## Running the Application
136
149
137
150
After installing with `pip install -e .`, use the console scripts:
@@ -152,6 +165,10 @@ vangard server
152
165
# GUI mode
153
166
vangard-gui
154
167
vangard gui
168
+
169
+
# Pro Mode - modern web interface (runs on http://127.0.0.1:8000)
- DSA script files: `CommandNameSU.dsa`(matches class name)
211
229
- CLI command names: Use kebab-case (e.g., `load-scene`, `batch-render`)
212
230
231
+
## Pro Mode Static Files
232
+
233
+
Pro mode serves static files from `vangard/static/`:
234
+
- `index.html`: Main Pro interface
235
+
- `css/styles.css`: Styling and theme definitions
236
+
- `js/app.js`: Frontend JavaScript, including command icons and form generation
237
+
238
+
These files are automatically included via `package_data` in setup.py and served by `vangard/pro.py` using FastAPI's static file mounting. To customize the Pro interface appearance or add command icons, edit these files. See [PRO_MODE.md](PRO_MODE.md) for detailed customization instructions.
0 commit comments