Sketch

Summary

Represents the current sketch

Class Properties

NameReturn TypeDescription

cameraPaths

CameraPathList Read-only

Returns a list of active camera paths in the sketch

strokes

StrokeList Read-only

Returns a list of all active strokes in the sketch

layers

LayerList Read-only

Returns a list of all layers in the sketch

mainLayer

Layer Read-only

Returns a list of all layers in the sketch

groups

GroupList Read-only

All the groups in this sketch

images

ImageList Read-only

Returns a list of active image widgets in the sketch

videos

VideoList Read-only

Returns a list of active video widgets in the sketch

models

ModelList Read-only

Returns a list of active model widgets in the sketch

guides

GuideList Read-only

Returns a list of active stencil widgets in the sketch

environments

EnvironmentList Read-only

Returns a list of all the available environments

ambientLightColor

Color Read/Write

The ambient light color

mainLightColor

Color Read/Write

The main light's color

secondaryLightColor

Color Read/Write

The secondary light's color

mainLightRotation

Rotation Read/Write

The main light's rotation

secondaryLightRotation

Rotation Read/Write

The secondary light's rotation

Class Methods

Sketch:Open(name)

Opens a sketch with the specified name in the User's Sketches folder

Returns: nil

Parameters:

NameTypeDefaultDescription

name

string

The filename of the sketch

Example

Sketch:Open("MySketch.tilt")

Sketch:Save(overwrite)

Saves the current sketch, possibly overwriting an existing one

Returns: nil

Parameters:

NameTypeDefaultDescription

overwrite

boolean

If set to true, overwrite the existing file. If false, the method will not overwrite the file

Example

Sketch:Save(overwrite)

Sketch:SaveAs(name)

Saves the current sketch with a new name

Returns: nil

Parameters:

NameTypeDefaultDescription

name

string

The new name for the sketch

Example

Sketch:SaveAs("NewName.tilt")

Sketch:Export()

Exports the sketch in all supported export formats

Returns: nil

Example

Sketch:Export()

Sketch:NewSketch()

Creates a new sketch

Returns: nil

Example

Sketch:NewSketch()

Sketch:ImportSkybox(filename)

Imports a image with the specified name from the MediaLibrary/BackgroundImages folder and assigns it as a custom skybox

Returns: nil

Parameters:

NameTypeDefaultDescription

filename

string

The filename of the image

Example

App:ImportSkybox("landscape.hdr")

Last updated