API Commands List
This page was generated from the output directly from Open Brush API server. It's not always totally up to date. When you're running Open Brush then use the live commands list you get from http://localhost:40074/help/commands as that will always be current.
The "Try It" links assume that a version of Open Brush with API support is currently running on this computer. They won't work if Open Brush isn't running. You can run a monoscopic version if you don't have a VR headset attached.
To run commands just send a request to this url with http://localhost:40074/api/v1?
Commands are query string parameters. Like this: command.name=parameters
Separate multiple commands with: &
Example: http://localhost:40074/api/v1?brush.turn.y=45&brush.draw=1
If you want to send a lot of commands or especially long commands (complex paths etc) then you can just http POST instead of GET. The commands should be form-encoded in the body of the request (exactly as if you submitted a html form with the form name as the command name and the form value as the command parameters)
You can also send multiple requests although because of the nature of http, these can sometimes arrive in a different order to how yousent them. We will soon support websockets which should be a better way to send realtime streams of commands.
Command List
draw.paths (string jsonString) Try it
Draws a series of paths at the current brush position [[[x1,y1,z1],[x2,y2,z2], etc...]]. Does not move the brush position
draw.path (string jsonString) Try it
Draws a path at the current brush position [[x1,y1,z1],[x2,y2,z2], etc...]. Does not move the brush position
draw.polygon (int sides, float radius, float angle) Try it
Draws a polygon at the current brush position. Does not move the brush position
showfolder.scripts Try it
Opens the user's Scripts folder on the desktop
showfolder.exports Try it
Opens the user's Exports folder on the desktop
draw.text (string text) Try it
Draws the characters supplied at the current brush position
draw.svg (string svgPathString) Try it
Draws the path supplied as an SVG Path string at the current brush position
brush.type (string brushType) Try it
Changes the brush. brushType can either be the brush name or it's guid. brushes are listed in the localhost:40074/help screen
color.add.hsv (Vector3 hsv) Try it
Adds the supplied values to the current color. Values are hue, saturation and value
color.add.rgb (Vector3 rgb) Try it
Adds the supplied values to the current color. Values are red green and blue
color.set.rgb (Vector3 rgb) Try it
Sets the current color. Values are hue, saturation and value
color.set.hsv (Vector3 hsv) Try it
Sets the current color. Values are red, green and blue
color.set.html (string color) Try it
Sets the current color. colorString can either be a hex value or a css color name.
brush.size.set (float size) Try it
Sets the current brush size
brush.size.add (float amount) Try it
Changes the current brush size by 'amount'
camera.move.to (Vector3 position) Try it
Moves the spectator or non-VR camera to the given position
camera.move.by (Vector3 amount) Try it
Moves the spectator or non-VR camera by the given amount
camera.turn.y (float angle) Try it
Turns the spectator or non-VR camera left or right.
camera.turn.x (float angle) Try it
Changes the angle of the spectator or non-VR camera up or down.
camera.turn.z (float angle) Try it
Tilts the angle of the spectator or non-VR camera clockwise or anticlockwise.
camera.lookat (Vector3 direction) Try it
Points the spectator or non-VR camera to look in the specified direction. Angles are given in x,y,z degrees
brush.move.to (Vector3 position) Try it
Moves the brush to the given coordinates
brush.move.by (Vector3 offset) Try it
Moves the brush by the given amount
brush.move (float distance) Try it
Moves the brush forward by 'distance' without drawing a line
brush.draw (float distance) Try it
Moves the brush forward by 'distance' and draws a line
brush.turn.y (float angle) Try it
Changes the brush direction to the left or right. Angle is measured in degrees
brush.turn.x (float angle) Try it
Changes the brush direction up or down. Angle is measured in degrees
brush.turn.z (float angle) Try it
Rotates the brush clockwise or anticlockwise. Angle is measured in degrees
brush.lookat (Vector3 direction) Try it
Changes the brush direction to look at the specified point
brush.look.forwards Try it
Changes the brush direction to look forwards
brush.look.up Try it
Changes the brush direction to look upwards
brush.look.down Try it
Changes the brush direction to look downwards
brush.look.left Try it
Changes the brush direction to look to the left
brush.look.right Try it
Changes the brush direction to look to the right
brush.look.backwards Try it
Changes the brush direction to look backwards
brush.home Try it
Resets the brush position and direction
brush.home.set Try it
Sets the current brush position and direction as the new home
brush.transform.push Try it
Stores the current brush position and direction on to a stack
brush.transform.pop Try it
Pops the most recent current brush position and direction from the stack
debug.brush Try it
Logs some info about the brush
stroke.delete (int index) Try it
Delete strokes by their index. If index is 0 the most recent stroke is deleted. -1 etc steps back in time
stroke.select (int index) Try it
Selects a stroke by it's index. 0 is the most recent stroke, -1 is second to last, 1 is the first.
strokes.select (int start, int end) Try it
Select multiple strokes by their index. 0 is the most recent stroke, -1 is second to last, 1 is the first.
selection.recolor Try it
Recolors the currently selected strokes
selection.rebrush Try it
Rebrushes the currently selected strokes
selection.resize Try it
Changes the brush size the currently selected strokes
selection.trim (int count) Try it
Removes a number of points from the currently selected strokes
selection.points.addnoise (string axis, Vector3 scale) Try it
Moves the position of all control points in the selection using a noise function
selection.points.quantize (Vector3 grid) Try it
Snaps all the points in selected strokes to a grid (buggy)
stroke.join Try it
Joins a stroke with the previous one
strokes.join (int start, int end) Try it
Joins all strokes between the two indices (inclusive)
stroke.add (int index) Try it
Adds a point at the current brush position to the specified stroke
tool.sketchsurface Try it
Activates the SketchSurface
tool.selection Try it
Activates the Selection Tool
tool.colorpicker Try it
Activates the Color Picker
tool.brushpicker Try it
Activates the Brush Picker
tool.brushandcolorpicker Try it
Activates the Brush And Color Picker
tool.sketchorigin Try it
Activates the SketchOrigin Tool
tool.autogif Try it
Activates the AutoGif Tool
tool.canvas Try it
Activates the Canvas Tool
tool.transform Try it
Activates the Transform Tool
tool.stamp Try it
Activates the Stamp Tool
tool.freepaint Try it
Activates the FreePaint Tool
tool.eraser Try it
Activates the Eraser Tool
tool.screenshot Try it
Activates the Screenshot Tool
tool.dropper Try it
Activates the Dropper Tool
tool.saveicon Try it
Activates the SaveIcon Tool
tool.threedofviewing Try it
Activates the ThreeDofViewing Tool
tool.multicam Try it
Activates the MultiCam Tool
tool.teleport Try it
Activates the Teleport Tool
tool.repaint Try it
Activates the Repaint Tool
tool.recolor Try it
Activates the Recolor Tool
tool.rebrush Try it
Activates the Rebrush Tool
tool.pin Try it
Activates the Pin Tool
tool.camerapath Try it
Activates the CameraPath Tool
tool.fly Try it
Activates the Fly Tool
save.overwrite Try it
Save the current scene overwriting the last save if it exists
save Try it
Saves the current scene in a new slot
export.all Try it
Exports all the scenes in the users's sketch folder
drafting.visible Try it
Shows all strokes made with the drafting brush fully opaque
drafting.transparent Try it
Shows all strokes made with the drafting brush semi-transparent
drafting.hidden Try it
Hides all strokes made with the drafting brush
load.user (int slot) Try it
Loads the sketch in the given slot number from the user's sketch folder
load.curated (int slot) Try it
Loads the sketch in the given slot number from the curated sketch list
load.liked (int slot) Try it
Loads the sketch in the given slot number from the user's liked sketches
load.drive (int slot) Try it
Loads the sketch in the given slot number from the user's Google Drive
load.named (string filename) Try it
Loads the sketch with the given name from the user's sketch folder
new Try it
Clears the current sketch
symmetry.mirror Try it
Sets the symmetry mode to 'mirror'
symmetry.doublemirror Try it
Sets the symmetry mode to 'double mirror'
straightedge.toggle Try it
Toggles the straight edge tool on or off
autoorient.toggle Try it
Toggles autoorientate on or off
undo Try it
Undoes the last action
redo Try it
Redo the last action
panels.reset Try it
Reset the position of all panels
sketch.origin Try it
Enables the sketch origin tool
viewonly.toggle Try it
Toggles 'view only' mode on or off
dropcam.toggle Try it
Toggles the Drop Cam widget on or off
autosimplify.toggle Try it
Toggles 'auto-simplify' mode on or off
export Try it
Exports the current sketch to the user's Exports folder
showfolder.sketch (int index) Try it
Opens the user's Sketches folder on the desktop
stencils.disabled Try it
Disables all stencils
disco Try it
Starts a party
selection.duplicate Try it
Create a duplicate of the current selection
selection.group Try it
Groups the current selection
export.selected Try it
Exports the selected strokes to the user's Media Library
camerapath.render Try it
Renders the current camera path to a video
profiling.toggle Try it
Toggles profiling mode on or off
settings.toggle Try it
Toggles the settings panel on or off
mirror.summon Try it
Summons the mirror origin to the user's position
selection.invert Try it
Inverts the current selection
select.all Try it
Selects all strokes and widgets in the scene
selection.flip Try it
Mirrors the current selection
postprocessing.toggle Try it
Toggles post-processing effects on or off
watermark.toggle Try it
Toggles the watermark on or off
camerapath.togglevisuals Try it
Toggles the camera path visuals on or off
camerapath.togglepreview Try it
Toggles the camera path preview on or off
camerapath.delete Try it
Deletes the current camera path
camerapath.record Try it
Starts recording a camera path
Last updated