Skip to content

SceneOptions

Settings that control how scene transitions animate in SketchUp.

Access it from model.options.sceneOptions. Use it to read or update whether scene clicks animate smoothly and how long the transition takes.

let model = await SketchUpApi.getActiveModel();
let opts = model.options.sceneOptions;
console.log(opts.showTransition);
// => true
console.log(opts.transitionTime);
// => 2 (seconds)
// Slow down the transition
await opts.update({ TransitionTime: 5 });
let updated = await opts.refresh();
console.log(updated.transitionTime);
// => 5

Model

SDK 1.18.0

get name(): string

The internal name of this options provider, like 'PageOptions'.

string


get showTransition(): boolean

Whether scene transitions animate when the user clicks a scene tab. When false, the view jumps instantly.

boolean


get transitionTime(): number

The duration of the scene transition animation in seconds, like 2.

number

refresh(): Promise<SceneOptions>

Re-fetches these options from SketchUp to pick up any changes the user has made since this snapshot was taken.

Promise<SceneOptions>

SDK 1.18.0


toString(): string

string


update(updates): Promise<string[]>

Applies updates to the scene animation settings. Returns an array of any keys that were rejected as invalid.

Parameter Type Description

updates

SceneOptionsUpdate

the properties to change

Promise<string[]>

rejected keys, or an empty array on success

SDK 1.18.0 protocol 1.15.0