Go to the source code of this file.
Creates a new layer object.
Layers associated with a SketchUp model must not be explicitly deallocated. Layers that are not associated with a SketchUp model must be deallocated with SULayerRelease.
- Parameters
-
[out] | layer | The layer object created. |
- Returns
-
Converts from an SUEntityRef to an SULayerRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SULayerRef.
- Parameters
-
[in] | entity | The given entity reference. |
- Returns
- The converted SULayerRef if the downcast operation succeeds
- If not, the returned reference will be invalid
Retrieves the material object associated with a layer object.
The retrieved material object must not be deallocated by the caller since it is owned by the layer object.
- Parameters
-
[in] | layer | The layer object. |
[out] | material | The material object retrieved. |
- Returns
-
Retrieves the name of a layer object.
- Parameters
-
[in] | layer | The layer object. |
[out] | name | The name retrieved. |
- Returns
-
SU_RESULT SULayerGetVisibility |
( |
SULayerRef |
layer, |
|
|
bool * |
visible |
|
) |
| |
Retrieves the boolean flag indicating whether a layer object is visible.
- Parameters
-
[in] | layer | The layer object. |
[out] | visible | The visibility flag retrieved. |
- Returns
-
Deallocates a layer object.
The layer object to be deallocated must not be associated with a SketchUp model.
- Parameters
-
[in] | layer | The layer object. |
- Returns
-
SU_RESULT SULayerSetName |
( |
SULayerRef |
layer, |
|
|
const char * |
name |
|
) |
| |
Assigns the name of a layer object.
- Parameters
-
[in] | layer | The layer object. |
[in] | name | The new name of the layer object. Assumed to be UTF-8 encoded. |
- Returns
-
SU_RESULT SULayerSetVisibility |
( |
SULayerRef |
layer, |
|
|
bool |
visible |
|
) |
| |
Sets the boolean flag indicating whether a layer object is visible.
- Parameters
-
[in] | layer | The layer object. |
[in] | visible | The visibility flag to set. |
- Returns
-
Converts from an SULayerRef to an SUEntityRef. This is essentially an upcast operation.
- Parameters
-
[in] | layer | The given layer reference. |
- Returns
- The converted SUEntityRef if layer is a valid layer
- If not, the returned reference will be invalid