Surface
- class Surface
-
- property name
The name of the surface.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property layer
The geometry layer containing this surface.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property visible
The surface visibility.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property locked
The surface lock state.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property selected
Whether the surface is selected.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property color
The shaper color of the surface.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property translation
The global translation of the surface from the pivot point, in meters.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property rotation
The global rotation of the surface from the pivot point, in degrees.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property scale
The global scale of the surface from the pivot point.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If trying to set a negative scale.
- property pivot_global_position
The pivot point global position, in meters.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property pivot_global_orientation
The pivot point global orientation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property pivot_local_position
The pivot point local position, in meters.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property pivot_local_orientation
The pivot point local orientation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property symmetry
Whether symmetry is enabled for this layer.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property symmetry_plane_normal
The normal vector of the symmetry plane.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property symmetry_plane_distance
The distance in meters of the symmetry plane from the origin.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property triangle_mesh_indices
Indices of vertices to make triangles in counter-clockwise order.
- property triangle_mesh_positions
Indexed triangle mesh vertices position (x, y, z) as floats. Units are meters.
- property triangle_mesh_normals
Indexed triangle mesh vertices normals (x, y, z) as floats or
None
if the mesh has no normals.
- property triangle_mesh_uvs
The 32 UV layers of the indexed triangle mesh mesh. Each layer contains UVs (u, v) as floats or
None
if the mesh has no UV at this layer.
- get_shadow_cast(layer)
Get surface property shadow cast for the lighting layer.
- Parameters
layer (LightingLayer) -- The lighting layer.
- Returns
The shadow cast property of the surface.
- Return type
- get_dressing_mapping_mode(uv_set)
Get the mapping mode for the given dressing.
Note
Available for dressings of any mapping mode.
- Parameters
uv_set (int) -- The queryied dressing uv_set.
- Returns
The mapping mode for the given dressing.
- Return type
- get_dressing_scale_uv(uv_set)
Get if the given uv_set dressing UV is scaled using surface scale.
Note
Only available for
EXTRACT
,PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.
- set_dressing_scale_uv(uv_set, value)
Set if the given uv_set dressing UV is scaled using surface scale.
Note
Only available for
EXTRACT
,PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- get_dressing_local_translation(uv_set)
Get the dressing local translation.
Note
Only available for
PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.
- set_dressing_local_translation(uv_set, value)
Set the dressing local translation.
Note
Only available for
PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- get_dressing_local_orientation(uv_set)
Get the dressing local orientation.
Note
Only available for
PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.
- set_dressing_local_orientation(uv_set, value)
Set the dressing local orientation.
Note
Only available for
PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- get_dressing_size(uv_set)
Get the dressing size.
Note
Only available for
PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.
- set_dressing_size(uv_set, value)
Set the dressing size.
Note
Only available for
PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- get_dressing_tile(uv_set)
Get the dressing tile.
Note
Only available for
PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.
- set_dressing_tile(uv_set, value)
Set the dressing tile.
Note
Only available for
PLANAR
,CYLINDRICAL
,CYLINDRICAL_WITH_CAP
,SPHERICAL
,BOX
,BOX_WITHOUT_CAP
andTORUS_MAPPER
mapping modes.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- aabb_min()
Get minimum point of the surface aabb.
- Returns
The minimum point of the surface aabb.
- Return type
- aabb_max()
Get maximum point of the surface aab.
- Returns
The maximum point of the surface aabb.
- Return type
- set_shadow_cast(layer, value)
Set surface property shadow cast for the lighting layer.
- Parameters
layer (LightingLayer) -- The lighting layer.
value (bool) -- The value to be set for shadow cast property.
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- get_shadow_receive(layer)
Get surface property shadow receive for the lighting layer.
- Parameters
layer (LightingLayer) -- The lighting layer.
- Returns
The shadow receive property of the surface.
- Return type
- set_shadow_receive(layer, value)
Set surface property shadow receive for the lighting layer.
- Parameters
layer (LightingLayer) -- The lighting layer.
value (bool) -- The value to be set for shadow receive property.
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- duplicate()
Duplicate this surface.
- Returns
The duplicated surface.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- remove()
Delete this surface.
- Raises
ReadOnlyError -- If
Database
is in read only mode.