SketchUp C API
|
Used to get and set a scene's camera views, using the SUCameraRef object. More...
#include <SketchUpAPI/model/scene.h>
Inherits SUEntityRef.
Related Functions | |
(Note that these are not member functions.) | |
SUEntityRef | SUSceneToEntity (SUSceneRef scene) |
Converts from an SUSceneRef to an SUEntityRef. This is essentially an upcast operation. More... | |
SUSceneRef | SUSceneFromEntity (SUEntityRef entity) |
Converts from an SUEntityRef to an SUSceneRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUSceneRef. More... | |
enum SUResult | SUSceneCreate (SUSceneRef *scene) |
Creates an empty scene object. More... | |
enum SUResult | SUSceneRelease (SUSceneRef *scene) |
Releases a scene object. More... | |
enum SUResult | SUSceneGetUseCamera (SUSceneRef scene, bool *use_camera) |
Retrieves the "use camera" setting of a scene object. More... | |
enum SUResult | SUSceneSetUseCamera (SUSceneRef scene, bool use_camera) |
Sets the "use camera" setting of a scene object. More... | |
enum SUResult | SUSceneGetCamera (SUSceneRef scene, SUCameraRef *camera) |
Retrieves the camera of a scene object. The returned camera object points to scene's internal camera. So the camera must not be released via SUCameraRelease(). More... | |
enum SUResult | SUSceneSetCamera (SUSceneRef scene, SUCameraRef camera) |
Sets a given scene's camera object. The scene does not take ownership of the provided camera, it just copies the properties to the scene's owned camera. If the input camera was created using SUCameraCreate() it must be released using SUCameraRelease(). More... | |
enum SUResult | SUSceneGetIncludeInAnimation (SUSceneRef scene, bool *include_in_animation) |
Retrieves the "include in animation" setting of a scene object. More... | |
enum SUResult | SUSceneSetIncludeInAnimation (SUSceneRef scene, bool include_in_animation) |
Sets the "include in animation" setting of a scene object. More... | |
enum SUResult | SUSceneGetName (SUSceneRef scene, SUStringRef *name) |
Retrieves the name of a scene object. More... | |
enum SUResult | SUSceneSetName (SUSceneRef scene, const char *scene_name) |
Sets the name of a scene object. More... | |
enum SUResult | SUSceneGetRenderingOptions (SUSceneRef scene, SURenderingOptionsRef *options) |
Retrieves the rendering options for the scene object. More... | |
enum SUResult | SUSceneGetShadowInfo (SUSceneRef scene, SUShadowInfoRef *shadow_info) |
Retrieves the shadow info of a scene. More... | |
enum SUResult | SUSceneGetUseShadowInfo (SUSceneRef scene, bool *use_shadow_info) |
Retrieves the "use shadow info" setting of a scene object. More... | |
enum SUResult | SUSceneSetUseShadowInfo (SUSceneRef scene, bool use_shadow_info) |
Sets the "use shadow info" setting of a scene object. More... | |
enum SUResult | SUSceneGetUseRenderingOptions (SUSceneRef scene, bool *use_rendering_options) |
Retrieves the "use rendering options" setting of a scene object. More... | |
enum SUResult | SUSceneSetUseRenderingOptions (SUSceneRef scene, bool use_rendering_options) |
Sets the "use rendering options" setting of a scene object. More... | |
enum SUResult | SUSceneGetUseHidden (SUSceneRef scene, bool *use_hidden) |
Gets whether the scene uses the hidden properties of entities. More... | |
enum SUResult | SUSceneSetUseHidden (SUSceneRef scene, bool use_hidden) |
Sets whether the scene uses the hidden properties of entities. More... | |
enum SUResult | SUSceneGetUseHiddenGeometry (SUSceneRef scene, bool *use_hidden) |
Gets whether the scene uses the hidden geometry properties of root-level entities. More... | |
enum SUResult | SUSceneSetUseHiddenGeometry (SUSceneRef scene, bool use_hidden) |
Sets whether the scene uses the hidden properties of root-level entities. More... | |
enum SUResult | SUSceneGetUseHiddenObjects (SUSceneRef scene, bool *use_hidden) |
Gets whether the scene uses the hidden properties of objects. More... | |
enum SUResult | SUSceneSetUseHiddenObjects (SUSceneRef scene, bool use_hidden) |
Sets whether the scene uses the hidden properties of objects. More... | |
enum SUResult | SUSceneGetUseHiddenLayers (SUSceneRef scene, bool *use_hidden_layers) |
Retrieves the "use hidden layers" setting of a scene object. More... | |
enum SUResult | SUSceneSetUseHiddenLayers (SUSceneRef scene, bool use_hidden_layers) |
Sets the "use hidden layers" setting of a scene object. More... | |
enum SUResult | SUSceneGetUseSectionPlanes (SUSceneRef scene, bool *use_section_planes) |
Gets whether the scene uses section planes. More... | |
enum SUResult | SUSceneSetUseSectionPlanes (SUSceneRef scene, bool use_section_planes) |
Sets whether the scene uses section planes. More... | |
enum SUResult | SUSceneGetNumLayers (SUSceneRef scene, size_t *count) |
Retrieves the number of layers in the scene object. More... | |
enum SUResult | SUSceneGetLayers (SUSceneRef scene, size_t len, SULayerRef layers[], size_t *count) |
Retrieves the layers in the scene object. More... | |
enum SUResult | SUSceneAddLayer (SUSceneRef scene, SULayerRef layer) |
Adds the specified layer to the provided scene. More... | |
enum SUResult | SUSceneRemoveLayer (SUSceneRef scene, SULayerRef layer) |
Removes the specified layer from the provided scene. More... | |
enum SUResult | SUSceneClearLayers (SUSceneRef scene) |
Removes all of the layers from the provided scene. Scenes do not own their layers so removing them does not release them. More... | |
enum SUResult | SUSceneGetNumLayerFolders (SUSceneRef scene, size_t *count) |
Retrieves the number of layer folders in the scene object. More... | |
enum SUResult | SUSceneGetLayerFolders (SUSceneRef scene, size_t len, SULayerFolderRef layer_folders[], size_t *count) |
Retrieves the layer folders in the scene object. More... | |
enum SUResult | SUSceneAddLayerFolder (SUSceneRef scene, SULayerFolderRef layer_folder) |
Adds the specified layer folder to the provided scene. More... | |
enum SUResult | SUSceneRemoveLayerFolder (SUSceneRef scene, SULayerFolderRef layer_folder) |
Removes the specified layer folder from the provided scene. More... | |
enum SUResult | SUSceneClearLayerFolders (SUSceneRef scene) |
Removes all of the layer folders from the provided scene. Scenes do not own their layer folders so removing them does not release them. More... | |
enum SUResult | SUSceneGetAxes (SUSceneRef scene, SUAxesRef *axes) |
Retrieves the axes of a scene object. More... | |
enum SUResult | SUSceneSetUseAxes (SUSceneRef scene, bool use_axes) |
Sets the "use axes" setting of a scene object. More... | |
enum SUResult | SUSceneGetUseAxes (SUSceneRef scene, bool *use_axes) |
Retrieves the "use axes" setting of a scene object. More... | |
enum SUResult | SUSceneGetNumHiddenEntities (SUSceneRef scene, size_t *count) |
Retrieves the number of hidden entities in the scene object. More... | |
enum SUResult | SUSceneGetHiddenEntities (SUSceneRef scene, size_t len, SUEntityRef entities[], size_t *count) |
Retrieves the hidden entities in the scene object. More... | |
enum SUResult | SUSceneSetFlags (SUSceneRef scene, uint32_t flags) |
Sets the flags for a scene object. More... | |
enum SUResult | SUSceneGetFlags (SUSceneRef scene, uint32_t *flags) |
Retrieves the flags in the scene object. More... | |
enum SUResult | SUSceneSetSketchAxesDisplayed (SUSceneRef scene, bool displayed) |
Sets the "sketch axes displayed" setting of a scene object. More... | |
enum SUResult | SUSceneGetSketchAxesDisplayed (SUSceneRef scene, bool *displayed) |
Retrieves the "sketch axes displayed" setting of a scene object. More... | |
enum SUResult | SUSceneGetPhotoMatchImageDisplayed (SUSceneRef scene, bool *displayed) |
Retrieves the "photo matched image displayed" setting of a scene object. More... | |
enum SUResult | SUSceneClearPhotoMatchImage (SUSceneRef scene) |
Clears the provided scene's photo match image. More... | |
enum SUResult | SUSceneGetStyle (SUSceneRef scene, SUStyleRef *style) |
Retrieves the scene's style. More... | |
enum SUResult | SUSceneCopy (SUSceneRef scene, SUSceneRef copy_scene) |
Copies the data from copy_scene to scene. More... | |
enum SUResult | SUSceneActivate (SUSceneRef scene) |
Activates the provided scene. More... | |
enum SUResult | SUSceneSetDrawingElementHidden (SUSceneRef scene, SUDrawingElementRef drawing_element, bool is_hidden) |
Set the visibility of a drawing element in a scene. More... | |
enum SUResult | SUSceneGetDrawingElementHidden (SUSceneRef scene, SUDrawingElementRef drawing_element, bool *is_hidden) |
Get the visibility of a drawing element in a scene. More... | |
enum SUResult | SUSceneGetDescription (SUSceneRef scene, SUStringRef *desc) |
Retrieves the description of a scene object. More... | |
enum SUResult | SUSceneSetDescription (SUSceneRef scene, const char *desc) |
Sets the description of a scene object. More... | |
enum SUResult | SUSceneSetUseEnvironment (SUSceneRef scene, bool use_environment) |
Enables the use of an environment for a scene. More... | |
enum SUResult | SUSceneGetUseEnvironment (SUSceneRef scene, bool *use_environment) |
Retrieves the setting whether a scene uses an environment. More... | |
enum SUResult | SUSceneSetEnvironment (SUSceneRef scene, SUEnvironmentRef environment) |
Sets the environment for a scene. More... | |
enum SUResult | SUSceneGetEnvironment (SUSceneRef scene, SUEnvironmentRef *environment) |
Retrieves the environment of a scene. More... | |
enum SUResult | SUSceneGetNumActiveSectionPlanes (SUSceneRef scene, size_t *count) |
Retrieves the number of section planes that will be activated when the scene is activated. More... | |
enum SUResult | SUSceneGetActiveSectionPlanes (SUSceneRef scene, size_t len, SUSectionPlaneRef active_section_planes[], size_t *count) |
Retrieves the section planes that will be activated when the scene is activated. More... | |
enum SUResult | SUSceneUpdate (SUSceneRef scene, unsigned int flags) |
Performs an update on the scene properties based on the current view that the use has. More... | |
![]() | |
enum SURefType | SUEntityGetType (SUEntityRef entity) |
Returns the concrete type of the given entity. More... | |
enum SUResult | SUEntityGetID (SUEntityRef entity, int32_t *entity_id) |
Retrieves the id of the entity. More... | |
enum SUResult | SUEntityGetPersistentID (SUEntityRef entity, int64_t *entity_pid) |
Retrieves the persistent id of the entity. More... | |
enum SUResult | SUEntityGetNumAttributeDictionaries (SUEntityRef entity, size_t *count) |
Retrieves the number of attribute dictionaries of an entity. More... | |
enum SUResult | SUEntityGetAttributeDictionaries (SUEntityRef entity, size_t len, SUAttributeDictionaryRef dictionaries[], size_t *count) |
Retrieves the attribute dictionaries of an entity. More... | |
enum SUResult | SUEntityAddAttributeDictionary (SUEntityRef entity, SUAttributeDictionaryRef dictionary) |
Adds the attribute dictionary to an entity. The given dictionary object must not belong to another entity. In other words, each dictionary should be added to one entity only. More... | |
enum SUResult | SUEntityGetAttributeDictionary (SUEntityRef entity, const char *name, SUAttributeDictionaryRef *dictionary) |
Retrieves the attribute dictionary of an entity that has the given name. More... | |
enum SUResult | SUEntityGetModel (SUEntityRef entity, SUModelRef *model) |
Retrieves the model object associated with the entity. More... | |
enum SUResult | SUEntityGetParentEntities (SUEntityRef entity, SUEntitiesRef *entities) |
Retrieves the entities object which contains the entity. More... | |
Used to get and set a scene's camera views, using the SUCameraRef object.
|
related |
Activates the provided scene.
[in] | scene | The scene object. |
|
related |
Adds the specified layer to the provided scene.
Adding a layer to a scene will flag the layer to be the opposite of its default scene visibility. See \ref SULayerVisibilityDefaultType. This function does not take ownership of the specified layer.
[in] | scene | The scene object. |
[in] | layer | The new layer to be added to the scene. |
|
related |
Adds the specified layer folder to the provided scene.
Adding a layer folder to a scene will cause that layer folder to be flagged as HIDDEN for the specified scene. Any layers or layer folders within that layer folder will also be hidden, and therefore don't need to be added to the scene. This function does not take ownership of the specified layer folder.
[in] | scene | The scene object. |
[in] | layer_folder | The new layer folder to be added to scene . |
scene
or layer_folder
is not a valid objectscene
is not owned by a valid modelscene's
model does not contain layer_folder
layer_folder
already exists in scene
|
related |
Removes all of the layer folders from the provided scene. Scenes do not own their layer folders so removing them does not release them.
[in] | scene | The scene object. |
scene
is not a valid object
|
related |
Removes all of the layers from the provided scene. Scenes do not own their layers so removing them does not release them.
[in] | scene | The scene object. |
|
related |
Clears the provided scene's photo match image.
[in] | scene | The scene object. |
|
related |
Copies the data from copy_scene to scene.
[in] | scene | The scene object to be altered. |
[in] | copy_scene | The scene to be copied. |
|
related |
Creates an empty scene object.
[out] | scene | The scene object created. |
|
related |
Converts from an SUEntityRef to an SUSceneRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUSceneRef.
[in] | entity | The entity reference. |
|
related |
Retrieves the section planes that will be activated when the scene is activated.
[in] | scene | The scene object. |
[in] | len | The number of section planes to retrieve. |
[out] | active_section_planes | The section planes retrieved. |
[out] | count | The number of section planes retrieved. |
scene
is not a valid objectactive_section_planes
or count
is NULL
|
related |
Retrieves the axes of a scene object.
[in] | scene | The scene object. |
[out] | axes | The axes object retrieved. |
|
related |
Retrieves the camera of a scene object. The returned camera object points to scene's internal camera. So the camera must not be released via SUCameraRelease().
[in] | scene | The scene object. |
[out] | camera | The camera object retrieved. |
|
related |
Retrieves the description of a scene object.
[in] | scene | The scene object. |
[out] | desc | The description retrieved. |
|
related |
Get the visibility of a drawing element in a scene.
[in] | scene | The scene object. |
[in] | drawing_element | The drawing element object. |
[out] | is_hidden | The current setting for whether or not the drawing element is hidden in the scene. |
|
related |
Retrieves the environment of a scene.
[in] | scene | The scene object. |
[out] | environment | The environment object to be retrieved. |
scene
is not a valid objectenvironment
is NULL
|
related |
Retrieves the flags in the scene object.
[in] | scene | The scene object. |
[out] | flags | A bitwise combination of SUSceneFlags. |
|
related |
Retrieves the hidden entities in the scene object.
[in] | scene | The entities object. |
[in] | len | The number of hidden entities to retrieve. |
[out] | entities | The hidden entities retrieved. |
[out] | count | The number of hidden entities retrieved. |
|
related |
Retrieves the "include in animation" setting of a scene object.
[in] | scene | The scene object. |
[out] | include_in_animation | The current setting for whether or not to include in animation. |
|
related |
Retrieves the layer folders in the scene object.
[in] | scene | The entities object. |
[in] | len | The number of layer_folders to retrieve. |
[out] | layer_folders | The layer_folders retrieved. |
[out] | count | The number of layer_folders retrieved. |
scene
is not a valid objectlayer_folders
or count
is NULL
|
related |
Retrieves the layers in the scene object.
[in] | scene | The entities object. |
[in] | len | The number of layers to retrieve. |
[out] | layers | The layers retrieved. |
[out] | count | The number of layers retrieved. |
|
related |
Retrieves the name of a scene object.
[in] | scene | The scene object. |
[out] | name | The name retrieved. |
|
related |
Retrieves the number of section planes that will be activated when the scene is activated.
[in] | scene | The scene object. |
[out] | count | The number of section planes. |
scene
is not a valid objectcount
is NULL
|
related |
Retrieves the number of hidden entities in the scene object.
[in] | scene | The scene object. |
[out] | count | The number of hidden entities. |
|
related |
Retrieves the number of layer folders in the scene object.
[in] | scene | The scene object. |
[out] | count | The number of layer folders. |
scene
is not a valid objectcount
is NULL
|
related |
Retrieves the number of layers in the scene object.
[in] | scene | The scene object. |
[out] | count | The number of layers. |
|
related |
Retrieves the "photo matched image displayed" setting of a scene object.
[in] | scene | The scene object. |
[out] | displayed | The setting retrieved. |
|
related |
Retrieves the rendering options for the scene object.
[in] | scene | The scene object. |
[out] | options | The options retrieved. |
|
related |
Retrieves the shadow info of a scene.
[in] | scene | The scene object. |
[out] | shadow_info | The shadow info object retrieved. This object is owned by the scene and must not be explicitly released. |
|
related |
Retrieves the "sketch axes displayed" setting of a scene object.
[in] | scene | The scene object. |
[out] | displayed | The setting retrieved. |
|
related |
Retrieves the scene's style.
[in] | scene | The scene object. |
[out] | style | The style object retrieved. |
|
related |
Retrieves the "use axes" setting of a scene object.
[in] | scene | The scene object. |
[out] | use_axes | The setting retrieved. |
|
related |
Retrieves the "use camera" setting of a scene object.
[in] | scene | The scene object. |
[out] | use_camera | The setting retrieved. |
|
related |
Retrieves the setting whether a scene uses an environment.
[in] | scene | The scene object. |
[out] | use_environment | The setting whether a scene should use an environment. |
scene
is not a valid objectuse_environment
is NULL
|
related |
Gets whether the scene uses the hidden properties of entities.
[in] | scene | The scene object. |
[out] | use_hidden | The current setting for whether or not the hidden property of entities is used. |
|
related |
Gets whether the scene uses the hidden geometry properties of root-level entities.
[in] | scene | The scene object. |
[out] | use_hidden | The current setting for whether or not the hidden property of root-level entities is used. |
|
related |
Retrieves the "use hidden layers" setting of a scene object.
[in] | scene | The scene object. |
[out] | use_hidden_layers | The current setting for whether or not hidden layer are used. |
|
related |
Gets whether the scene uses the hidden properties of objects.
[in] | scene | The scene object. |
[out] | use_hidden | The current setting for whether or not the hidden property of objects is used. |
|
related |
Retrieves the "use rendering options" setting of a scene object.
[in] | scene | The scene object. |
[out] | use_rendering_options | The current setting for whether or not rendering options are used. |
|
related |
Gets whether the scene uses section planes.
[in] | scene | The scene object. |
[out] | use_section_planes | The current setting for whether or not section planes property is used. |
|
related |
Retrieves the "use shadow info" setting of a scene object.
[in] | scene | The scene object. |
[out] | use_shadow_info | The current setting for whether or not shadow info is used. |
|
related |
Releases a scene object.
[in] | scene | The scene object. |
|
related |
Removes the specified layer from the provided scene.
Removing a layer from a scene will flag the layer to use its default scene visibility. See \ref SULayerVisibilityDefaultType. Scenes do not own their layers so removing them doesn't release them.
[in] | scene | The scene object. |
[in] | layer | The layer to be removed from the scene. |
|
related |
Removes the specified layer folder from the provided scene.
Removing a layer folder from a scene will cause that layer folder to be flagged as VISIBLE for the specified scene. Scenes do not own their layer folders so removing them doesn't release them.
[in] | scene | The scene object. |
[in] | layer_folder | The layer folder to be removed from scene . |
scene
or layer_folder
is not a valid objectlayer_folder
doesn't exist in scene
|
related |
Sets a given scene's camera object. The scene does not take ownership of the provided camera, it just copies the properties to the scene's owned camera. If the input camera was created using SUCameraCreate() it must be released using SUCameraRelease().
[in] | scene | The scene object. |
[in] | camera | The camera object to be set. |
|
related |
Sets the description of a scene object.
[in] | scene | The scene object. |
[in] | desc | The new description for the scene. Assumed to be UTF-8 encoded. |
|
related |
Set the visibility of a drawing element in a scene.
[in] | scene | The scene object. |
[in] | drawing_element | The drawing element object. |
[in] | is_hidden | The new setting for whether or not the drawing element is hidden in the scene. |
|
related |
Sets the environment for a scene.
[in] | scene | The scene object. |
[in] | environment | The environment object to be set. |
scene
is not a valid object
|
related |
Sets the flags for a scene object.
SUSceneSetUse*
setters after the scene has been added to the model.[in] | scene | The scene object. |
[in] | flags | A bitwise combination of SUSceneFlags. |
|
related |
Sets the "include in animation" setting of a scene object.
[in] | scene | The scene object. |
[in] | include_in_animation | The new setting for whether or not to include in animation. |
|
related |
Sets the name of a scene object.
[in] | scene | The scene object. |
[in] | scene_name | The name of the scene object. Assumed to be UTF-8 encoded. |
|
related |
Sets the "sketch axes displayed" setting of a scene object.
[in] | scene | The scene object. |
[in] | displayed | The new setting for whether or not sketch axes should be displayed. |
|
related |
Sets the "use axes" setting of a scene object.
[in] | scene | The scene object. |
[in] | use_axes | The new setting for whether or not the axes is used. |
|
related |
Sets the "use camera" setting of a scene object.
[in] | scene | The scene object. |
[in] | use_camera | The current setting for whether or not the camera is used. |
|
related |
Enables the use of an environment for a scene.
[in] | scene | The scene object. |
[in] | use_environment | The setting whether a scene should use an environment. |
scene
is not a valid object
|
related |
Sets whether the scene uses the hidden properties of entities.
[in] | scene | The scene object. |
[in] | use_hidden | The new setting for whether or not the hidden property of entities is used. |
|
related |
Sets whether the scene uses the hidden properties of root-level entities.
[in] | scene | The scene object. |
[in] | use_hidden | The new setting for whether or not the hidden property of root-level entities is used. |
|
related |
Sets the "use hidden layers" setting of a scene object.
[in] | scene | The scene object. |
[in] | use_hidden_layers | The new setting for whether or not hidden layers are used. |
|
related |
Sets whether the scene uses the hidden properties of objects.
[in] | scene | The scene object. |
[in] | use_hidden | The new setting for whether or not the hidden property of objects is used. |
|
related |
Sets the "use rendering options" setting of a scene object.
[in] | scene | The scene object. |
[in] | use_rendering_options | The new setting for whether or not rendering options are used. |
|
related |
Sets whether the scene uses section planes.
[in] | scene | The scene object. |
[in] | use_section_planes | The new setting for whether or not section planes property is used. |
|
related |
Sets the "use shadow info" setting of a scene object.
[in] | scene | The scene object. |
[in] | use_shadow_info | The new setting for whether or not shadow info is used. |
|
related |
Converts from an SUSceneRef to an SUEntityRef. This is essentially an upcast operation.
[in] | scene | The given scene reference. |
|
related |
Performs an update on the scene properties based on the current view that the use has.
What properties of the Scene get updated are controlled via an integer whose bits corresponds to different properties. These flags can be used individually or combined using bitwise OR.
flags
and the flags on the scene set by SUSceneSetFlags() or the separate SUSceneSetUse*
setters.[in] | scene | The scene object. |
[in] | flags | The bitwise OR of SUSceneFlags. |
scene
is not a valid objectscene
is not added to a model