Skip to content

Command line (webex.exe)

The Windows editor, webex.exe, is fully scriptable. Point it at a scene, hand it a script of commands, and it will apply materials, tune properties, and render pictures, videos, spinners, and exports without ever opening a window.

webex.exe -k:<api_key> -i:<scene> -s:"<cmd>;<cmd>;..." [-S:<script_file>] [-o:<output>] [-w]

Switches

Switch Description
-k:<api_key> required API key. Validated locally and against the backend before anything runs. The key is masked in console output.
-i:<path> required Input scene to load: .3dm, .glb, or .webex. Existence is checked before startup.
-s:<script> required * Inline script: commands separated by ;. Newlines inside the string are also accepted as separators.
-S:<path> required * Load a script file (one command per line). May be combined with -s; inline commands run first, then the file's.
-o:<path> optional Output path pattern. A printf style index (e.g. %02d) is replaced with the command number, so one script can emit several files. Any extension you give is replaced by the action's own (.jpg, .mp4, .webex).
-w optional Show the window while running. Without it, the run is headless.
-x optional Accepted for compatibility. The application always exits when the script completes, whether or not -x is passed.
-h, --help, -? optional Print usage and exit.

* At least one of -s or -S must be provided, together with -k and -i.

Script syntax

  • Commands are separated by ; inline, or one per line in a script file.
  • Blank lines are ignored. Lines starting with # are comments.
  • Only set_string understands double quotes, for node names containing spaces.
  • Each command is echoed to the console as [NN] <command> as it runs; failures are reported with a specific error message.

Command reference

Properties

Command Description
set <ustr> <value> Set a property by its prefixed name. The prefix picks the node: globals_, animation_, camera_, or render_pipeline_. Camera sets also refresh the live camera geometry. See Scene properties (USTR).
set_string <node> <ustr> <value> Set any property on any node. <node> may be a special alias, a layer name (quote it if it has spaces), or a hex CUID. This is the only way to reach per-object obj_* properties. The render restarts to reflect the change.

Void (button) properties are triggered rather than set; the value is ignored but must be present. For example, set_string ::camera camera_center_view 1 re-centers the view on the scene -- useful after hiding layers or reassigning families.

Materials and ambience

Command Description
apply_mtl <layer>:<material> Apply a library material to a layer. The layer name is case-sensitive; the material name is not. See Material and ambience names.
apply_amb <shelf>:<name> Apply an ambience preset. The shelf is the lowercase shelf alias (white, black, floor, sun) and the name is the preset id, e.g. Ambience01w. Both are case-sensitive.
set_layer_family <layer>:<family> Reassign a layer to a different material family (gemstone, metal, opal, pearl, plastic). Assignments to gemstone are safety-checked: the layer is rejected, with the reason printed, if any of its meshes exceeds 16384 faces or clusters into more than 1024 hull planes -- dense meshes such as shanks are not stones.

Dressings

Command Description
export_dressing [categories:]<file> Export the scene's settings (its "dressing") as a tiny settings-only .dressing.webex (no geometry, no assets). Settings travel in categories that mirror the editor pages: pose, camera, ambience, backplate, globals, video, atlas, viewer, and branding. By default all of them are exported; prefix the path with a comma-separated category list and a colon to export a subset, e.g. export_dressing camera,ambience:hero.dressing.webex. The file records which categories it carries.
import_dressing [categories:]<file> Load a dressing file and reproduce its page categories on the current scene, then reset the render. By default everything the file carries is applied; prefix the path with a comma-separated category list and a colon to apply a subset, e.g. import_dressing camera:hero.dressing.webex. Categories absent from the file or from the list are left untouched. The prefix is only treated as a filter when every entry is a valid category name, so plain Windows paths like C:\... are never misread.
probe_dressing <file> Print the comma-separated list of categories a dressing file carries, without applying anything. Useful to inspect a dressing before a selective import.

Discovery

Command Description
list_layers Print every layer alias in the loaded scene, grouped by family.
list_materials Print every material name in the library.
list_ambiences Print every ambience as shelf:name, ready to paste into apply_amb.

Render actions

Action commands do not run immediately: the engine first waits 64 frames so the accumulating render converges, then starts the action. The script resumes when the action completes.

Command Description
take_picture Render and save a still picture (.jpg) at the configured resolution.
take_atlas Render a multi-viewpoint atlas contact sheet using the atlas layout and slot viewpoints.
record_video Record an animation video (.mp4) using the animation settings.
record_spinner Record a 360 degree turntable video.
save_static Export the scene as a regular .webex file.
save_interactive Export a self-contained interactive .webex for the viewer.

Flow control

Command Description
nop Wait 64 frames and do nothing. Useful to force extra convergence between edits.
exit Terminate the process. Appended automatically at the end of every script.

Node names for set_string

Node Example Resolves to
Special alias ::globals Scene globals.
Special alias ::camera / ::main_camera Main camera.
Special alias ::render_pipeline / ::main_pipeline Render pipeline.
Special alias ::animation Animation settings.
Layer name MyLayer Layer by alias, no spaces.
Quoted layer name "Metal Band" Layer by alias, spaces allowed.
Hex CUID 0A3F12B7 Any node by unique id.

Execution model

  • Commands execute sequentially, one instant command per frame, only while the engine is idle. While an action renders, the script pauses.
  • Edit commands restart the render, so the next capture starts from a clean state.
  • Every render action and nop waits 64 frames before starting.
  • When the script ends, the process exits (an exit is always appended).

Examples

Load a scene and take a picture:

webex.exe -k:ak_xxx -i:scene.3dm -s:take_picture

Set the resolution before capturing:

webex.exe -k:ak_xxx -i:scene.3dm -s:"set globals_resolution_w 1920;set globals_resolution_h 1080;take_picture"

Apply materials and an ambience, then record a video:

webex.exe -k:ak_xxx -i:scene.3dm -s:"apply_amb white:Ambience01w;apply_mtl Metal 01:Yellow Gold 18k;apply_mtl Gem 01:Diamond;record_video"

Hide layers (including names with spaces):

webex.exe -k:ak_xxx -i:scene.3dm -s:"set_string MyLayer obj_visible 0;take_picture"
webex.exe -k:ak_xxx -i:scene.3dm -s:"set_string \"Metal Band\" obj_visible 0;take_picture"

Batch several outputs with indexed names:

webex.exe -k:ak_xxx -i:scene.glb -o:renders\shot_%02d -S:script.txt
script.txt
# Warm gold look.
apply_amb white:Ambience03w
apply_mtl Metal:Yellow Gold 18k
apply_mtl Gem:Diamond
take_picture

# Cool platinum look.
apply_mtl Metal:Platinum 950
apply_mtl Gem:Sapphire Blue
take_picture

Capture a dressing and reuse it:

webex.exe -k:ak_xxx -i:hero.3dm  -s:"export_dressing hero.dressing.webex"
webex.exe -k:ak_xxx -i:other.3dm -s:"import_dressing hero.dressing.webex;take_picture"

Selective: export only the camera and ambience, then apply just the camera elsewhere:

webex.exe -k:ak_xxx -i:hero.3dm  -s:"export_dressing camera,ambience:hero.dressing.webex"
webex.exe -k:ak_xxx -i:other.3dm -s:"probe_dressing hero.dressing.webex"
webex.exe -k:ak_xxx -i:other.3dm -s:"import_dressing camera:hero.dressing.webex;take_picture"