Scene
A saved camera position and view state — like a bookmark for a particular viewpoint in the model.
Scenes appear as tabs or thumbnails inside SketchUp.
When a user clicks a scene, SketchUp restores the
camera angle, tag visibility, shadow settings, and style
that were saved with it. The properties field records
exactly which of those settings this scene captures.
Retrieve all scenes with model.getScenes(). Create new
scenes inside a performOperation with op.createScene().
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();
// Save the current view as a named sceneawait model.performOperation(op => { const ref = op.createScene('Exterior View'); op.sceneSetDescription( ref, 'Front of the building' );}, 'Add scene');
// Read it backlet scenes = await model.getScenes();let scene = scenes[0];console.log(scene.name);// => 'Exterior View'console.log(scene.description);// => 'Front of the building'SDK 2.10.0 Protocol 1.7.0
Properties
Section titled “Properties”animation
Section titled “animation”
readonlyanimation:Readonly<SketchupSceneAnimationInfo>
Timing settings for how this scene plays during a slideshow, including the transition delay and duration in seconds.
attributes
Section titled “attributes”
readonlyattributes:Attributes
User-defined key-value data attached to this scene.
readonlyaxes:Axes|undefined
The custom axis orientation saved with this scene, if any.
camera
Section titled “camera”
readonlycamera:Camera
The camera data stored with this scene — eye position,
target, up vector, and field of view. Use getCamera()
if you need coordinate conversion helpers.
description
Section titled “description”
readonlydescription:string|undefined
The text shown in the Scenes panel for this scene, like
'Front elevation view'.
environmentId
Section titled “environmentId”
readonlyenvironmentId:number|undefined
The persistent identifier of the environment (sky/background) associated with this scene.
readonlyid:number
The persistent numeric identifier for this scene, stable across sessions.
readonlylabel:string|undefined
An alternate display label for certain UI contexts.
readonlyname:string|undefined
The user-visible tab label shown at the top of the viewport,
like 'Exterior View'.
properties
Section titled “properties”
readonlyproperties:Readonly<SketchupSceneProperties>
Flags indicating which scene properties SketchUp saves and restores when the user activates this scene.
readonlystyle:StyleRef|undefined
A reference to the style applied when this scene is active.
Use model.getStyles() to resolve this to a full Style.
readonlytype:Scene=EntityType.Scene
Accessors
Section titled “Accessors”sketchupId
Section titled “sketchupId”Get Signature
Section titled “Get Signature”get sketchupId():
SketchupId
JS API identifier for this scene. Pass it to API methods that accept a sketchupId.
Returns
Section titled “Returns”typeName
Section titled “typeName”Get Signature
Section titled “Get Signature”get typeName():
string
Returns a named variant of the type field.
SDK 2.35.0
Returns
Section titled “Returns”string
Methods
Section titled “Methods”getActiveSectionPlanes()
Section titled “getActiveSectionPlanes()”getActiveSectionPlanes(
options?):Promise<SectionPlane[]>
Fetches the section planes that are active when this scene is shown.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
optional filter to narrow results by entity type |
Returns
Section titled “Returns”Promise<SectionPlane[]>
the active section planes for this scene
SDK 2.29.0 Protocol 1.13.0
getAxes()
Section titled “getAxes()”getAxes():
Promise<Axes|undefined>
Fetches the custom axes orientation saved with this scene, if any.
Returns
Section titled “Returns”Promise<Axes | undefined>
the axes for this scene, or undefined if not saved
SDK 2.10.0 Protocol 1.7.0
getCamera()
Section titled “getCamera()”getCamera():
Promise<Camera>
Fetches the full Camera object saved with this scene. Useful
if you need the full capabilities not provided by the .camera
property.
Returns
Section titled “Returns”Promise<Camera>
the camera for this scene
SDK 2.10.0 Protocol 1.7.0
getHiddenElements()
Section titled “getHiddenElements()”Call Signature
Section titled “Call Signature”getHiddenElements<
Filter>(options?):Promise<EntityTypeForFilter<Filter,DrawingElement>[]>
Fetches the drawing elements hidden when this scene is active.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
|
|
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
|
optional filter to narrow results by entity type |
Returns
Section titled “Returns”Promise<EntityTypeForFilter<Filter, DrawingElement>[]>
the hidden drawing elements in this scene
SDK 2.10.0 Protocol 1.7.0
Call Signature
Section titled “Call Signature”getHiddenElements(
options?):Promise<DrawingElement[]>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<DrawingElement[]>
getHiddenTagFolders()
Section titled “getHiddenTagFolders()”Call Signature
Section titled “Call Signature”getHiddenTagFolders(
options?):Promise<TagFolder[]>
Fetches the tag folders that are hidden when this scene is
active. Mirrors getHiddenTags() but for tag folders.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
optional filter to narrow the results |
Returns
Section titled “Returns”Promise<TagFolder[]>
the tag folders hidden in this scene
SDK 2.10.0 Protocol 1.7.0
Call Signature
Section titled “Call Signature”getHiddenTagFolders(
options):Promise<TagFolder[]>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<TagFolder[]>
getHiddenTags()
Section titled “getHiddenTags()”Call Signature
Section titled “Call Signature”getHiddenTags(
options?):Promise<Tag[]>
Fetches the tags that are hidden when this scene is active. Only tags explicitly hidden by this scene are returned.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
optional filter to narrow results by tag name or other criteria |
Returns
Section titled “Returns”Promise<Tag[]>
the tags hidden in this scene
SDK 2.10.0 Protocol 1.7.0
Call Signature
Section titled “Call Signature”getHiddenTags(
options):Promise<Tag[]>
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<Tag[]>
getRenderingOptions()
Section titled “getRenderingOptions()”getRenderingOptions():
Promise<RenderingOptions|undefined>
Fetches the rendering options saved with this scene, if any.
Returns
Section titled “Returns”Promise<RenderingOptions | undefined>
a snapshot of the rendering options for this scene,
or undefined if not saved
SDK 2.24.0 Protocol 1.21.0
getShadowInfo()
Section titled “getShadowInfo()”getShadowInfo():
Promise<ShadowInfo|undefined>
Fetches the shadow settings saved with this scene, if any.
Returns
Section titled “Returns”Promise<ShadowInfo | undefined>
the shadow settings for this scene, or undefined
SDK 2.10.0 Protocol 1.7.0
refresh()
Section titled “refresh()”refresh():
Promise<Scene>
Re-fetches this scene from SketchUp to pick up any changes made by the user since this snapshot was taken.
Returns
Section titled “Returns”Promise<Scene>
the latest version of this scene from SketchUp
toString()
Section titled “toString()”toString():
string
Returns
Section titled “Returns”string
Deprecated
Section titled “Deprecated”styleId
Section titled “styleId”
readonlystyleId:number|undefined
The persistent id of the style associated with this scene
activeSectionPlanes()
Section titled “activeSectionPlanes()”activeSectionPlanes(
filter?):Promise<readonlySectionPlane[]>
Query to find only the active section planes for this scene (protocol)
Parameters
Section titled “Parameters”| Parameter | Type | Default value | Description |
|---|---|---|---|
|
|
|
|
when provided, filters the list of active section planes |
Returns
Section titled “Returns”Promise<readonly SectionPlane[]>
a promise containing a snapshot of the active section planes for this scene
SDK 2.16.0 Protocol 1.13.0