Surface
- class Surface
Base class:
SceneObject
- property name
The name of the scene object.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property type
The type of the scene object.
- Type
SceneObjectType, read-only
- property parent_object
The parent object of this object or
None
if no parent.- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If trying to move the object into one of its children, trying to move the object to another model, trying to move the object to itself or trying to move the object to an object which is not a
KinematicNode
(that is anAxis
, aNull
or aVector
).
- property visible
The scene object visibility.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property locked
The scene object lock state.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property selected
Whether the scene object is selected.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property color
The shaper color of the scene object.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property translation
The global translation of the scene object, in meters.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property rotation
The global rotation of the scene object, in degrees.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property scale
The global scale of the scene object.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If trying to set a negative scale or trying to scale a Kinematics object.
- property pivot_to_world_translation
The translation from pivot point to global position, in meters.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property pivot_to_world_rotation
The rotation from pivot point to global orientation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property local_to_pivot_translation
The translation from local point to pivot position, in meters.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property local_to_pivot_rotation
The rotation from local point to pivot orientation, in degrees.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property pivot_to_parent_translation
The translation from pivot point to parent position, in meters
Note
If the object does not have a parent, it returns the global translation.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property pivot_to_parent_rotation
The rotation from pivot point to parent orientation, in degrees
Note
If the object does not have a parent, it returns the global rotation.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property local_to_parent_translation
The translation from local point to parent position, in meters.
- Type
Vector3, read-only
- property local_to_parent_rotation
The rotation from local point to parent orientation, in degrees.
- Type
Vector3, read-only
- property layer
The geometry layer containing this surface.
- 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.
- list_child_objects(recursive=True)
List the child kinematic object of this objects.
- has_tag(tag)
Whether the tag is assigned to the scene object.
- list_tags()
List all the tags assigned to the scene object.
- add_tag(tag)
Create a new tag and assign to the scene object.
- Parameters
tag (str) -- Name of the tag.
- Returns
Whether the tag was added or not.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- remove_tag(tag)
Remove tag from the scene object.
- Parameters
tag (str) -- Name of the tag.
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- remove()
Delete this scene object.
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- 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
- 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
- Raises
ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- set_dressing_mapping_mode(uv_set, value)
Set for the given uv_set the given mapping mode.
Note
Available for dressings of any mapping mode.
- Parameters
uv_set (int) -- The queryied dressing uv_set.
value (MappingMode) -- The queryied dressing mapping mode.
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.- Parameters
uv_set (int) -- The queryied dressing uv_set.
- Returns
If the given uv_set dressing UV is scaled using surface scale.
- Return type
- Raises
ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.- Parameters
uv_set (int) -- The queryied dressing uv_set.
- Returns
The dressing local translation.
- Return type
- Raises
ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.- Parameters
uv_set (int) -- The queryied dressing uv_set.
- Returns
The dressing local orientation.
- Return type
- Raises
ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.- Parameters
uv_set (int) -- The queryied dressing uv_set.
- Returns
The dressing size.
- Return type
- Raises
ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.- Parameters
uv_set (int) -- The queryied dressing uv_set.
- Returns
The dressing tile.
- Return type
- Raises
ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.ValueError -- If trying to set an invalid uvset, must be between 0 and 31.
- 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.
- 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.