Surface

class Surface
property id

The id of the surface.

Type

str, read-only

property name

The name of the surface.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property layer

The geometry layer containing this surface.

Type

GeometryLayer

Raises

ReadOnlyError -- If Database is in read only mode.

property visible

The surface visibility.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property locked

The surface lock state.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property selected

Whether the surface is selected.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property color

The shaper color of the surface.

Type

ColorRgb

Raises

ReadOnlyError -- If Database is in read only mode.

property translation

The global translation of the surface from the pivot point, in meters.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property rotation

The global rotation of the surface from the pivot point, in degrees.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property scale

The global scale of the surface from the pivot point.

Type

Vector3

Raises
property pivot_global_position

The pivot point global position, in meters.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property pivot_global_orientation

The pivot point global orientation, in degrees.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property pivot_local_position

The pivot point local position, in meters.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property pivot_local_orientation

The pivot point local orientation, in degrees.

Type

Vector3

Raises

ReadOnlyError -- If Database is in read only mode.

property symmetry

Whether symmetry is enabled for this layer.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property symmetry_plane_normal

The normal vector of the symmetry plane.

Type

Vector3

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

float

Raises

ReadOnlyError -- If Database is in read only mode.

property triangle_mesh_indices

Indices of vertices to make triangles in counter-clockwise order.

Type

list(int), read-only

property triangle_mesh_positions

Indexed triangle mesh vertices position (x, y, z) as floats. Units are meters.

Type

list(float), read-only

property triangle_mesh_normals

Indexed triangle mesh vertices normals (x, y, z) as floats or None if the mesh has no normals.

Type

list(float) or None, read-only

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.

Type

list(list(float) or None), read-only

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

bool

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

MappingMode

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 and TORUS_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

bool

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 and TORUS_MAPPER mapping modes.

Parameters
  • uv_set (int) -- The queryied dressing uv_set.

  • value (bool) -- Set true if you want to apply surface scale to uv mapping, false otherwise.

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 and TORUS_MAPPER mapping modes.

Parameters

uv_set (int) -- The queryied dressing uv_set.

Returns

The dressing local translation.

Return type

Vector3

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 and TORUS_MAPPER mapping modes.

Parameters
  • uv_set (int) -- The queryied dressing uv_set.

  • value (Vector3) -- The new dressing local translation.

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 and TORUS_MAPPER mapping modes.

Parameters

uv_set (int) -- The queryied dressing uv_set.

Returns

The dressing local orientation.

Return type

Vector3

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 and TORUS_MAPPER mapping modes.

Parameters
  • uv_set (int) -- The queryied dressing uv_set.

  • value (Vector3) -- The new dressing local orientation.

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 and TORUS_MAPPER mapping modes.

Parameters

uv_set (int) -- The queryied dressing uv_set.

Returns

The dressing size.

Return type

Vector3

set_dressing_size(uv_set, value)

Set the dressing size.

Note

Only available for PLANAR, CYLINDRICAL, CYLINDRICAL_WITH_CAP, SPHERICAL, BOX, BOX_WITHOUT_CAP and TORUS_MAPPER mapping modes.

Parameters
  • uv_set (int) -- The queryied dressing uv_set.

  • value (Vector3) -- The new dressing size.

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 and TORUS_MAPPER mapping modes.

Parameters

uv_set (int) -- The queryied dressing uv_set.

Returns

The dressing tile.

Return type

Vector3

set_dressing_tile(uv_set, value)

Set the dressing tile.

Note

Only available for PLANAR, CYLINDRICAL, CYLINDRICAL_WITH_CAP, SPHERICAL, BOX, BOX_WITHOUT_CAP and TORUS_MAPPER mapping modes.

Parameters
  • uv_set (int) -- The queryied dressing uv_set.

  • value (Vector3) -- The new dressing tile.

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

Vector3

aabb_max()

Get maximum point of the surface aab.

Returns

The maximum point of the surface aabb.

Return type

Vector3

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

bool

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

Surface

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this surface.

Raises

ReadOnlyError -- If Database is in read only mode.