AspectLayer

class AspectLayer
property id

The id of the aspect layer.

Type

str, read-only

property name

The name of the aspect layer.

Type

str

Raises

ReadOnlyError -- If Database is in read only mode.

property group

The group of this aspect layer or None if the aspect layer is at the root of the hierarchy.

Type

AspectLayerGroup or None

Raises

ReadOnlyError -- If Database is in read only mode.

property visibility

The aspect layer visibility.

Type

bool

Raises

ReadOnlyError -- If Database is in read only mode.

property active

The active status of the aspect layer.

Type

bool, read-only

duplicate()

Duplicate this aspect layer.

Returns

The duplicated aspect layer.

Return type

AspectLayer

Raises

ReadOnlyError -- If Database is in read only mode.

remove()

Delete this aspect layer.

Raises

ReadOnlyError -- If Database is in read only mode.

assign_material(surface, material, uvset = 0)

Assign a Material to the given Surface into the current AspectLayer.

Parameters
  • surface (Surface) -- Surface on which to assign the material.

  • material (Material) -- Material to assign.

  • uvset (int) -- UV set to use for this material assignment.

Raises

ReadOnlyError -- If Database is in read only mode.

get_material_assignment_offset_u(surface)

Get the offset in the U direction of the material assignment on the given Surface, in meters.

Parameters

surface (Surface) -- Surface on which to get the offset in the U direction.

Returns

The offset in the U direction.

Return type

float

Raises

ValueError -- If the aspect layer is not applied on this surface.

set_material_assignment_offset_u(offset_u, surface)

Set the offset in the U direction of the material assignment on the given Surface, in meters.

Parameters
  • offset_u (float) -- Offset in the U direction to set.

  • surface (Surface) -- Surface on which to set the offset in the U direction.

Raises
get_material_assignment_offset_v(surface)

Get the offset in the V direction of the material assignment on the given Surface, in meters.

Parameters

surface (Surface) -- Surface on which to get the offset in the V direction.

Returns

The offset in the V direction.

Return type

float

Raises

ValueError -- If the aspect layer is not applied on this surface.

set_material_assignment_offset_v(offset_v, surface)

Set the offset in the V direction of the material assignment on the given Surface, in meters.

Parameters
  • offset_v (float) -- Offset in the V direction to set.

  • surface (Surface) -- Surface on which to set the offset in the V direction.

Raises
get_material_assignment_rotation(surface)

Get the rotation of the material assignment on the given Surface, in degrees.

Parameters

surface (Surface) -- Surface on which to get the rotation.

Returns

The rotation.

Return type

float

Raises

ValueError -- If the aspect layer is not applied on this surface.

set_material_assignment_rotation(rotation, surface)

Set the rotation of the material assignment on the given Surface, in degrees.

Parameters
  • rotation (float) -- Rotation to set.

  • surface (Surface) -- Surface on which to set the rotation.

Raises
remove_material_assignment(surface)

Remove the material assignment on the given Surface.

Parameters

surface (Surface) -- Surface from which to remove the material.

Raises

ReadOnlyError -- If Database is in read only mode.

get_material_assignment(surface)

Get the material assignment on the given Surface if it exists. Return None if not.

Parameters

surface (Surface) -- Surface on which to get the material assignment.

Returns

The Material assigned to the given Surface. Returns None if no material is assigned.

Return type

Material or None

Raises

ReadOnlyError -- If Database is in read only mode.