AspectLayer
- class AspectLayer
-
- property name
The name of the aspect layer.
- Type
- 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
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property visible
The aspect layer visibility.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- property locked
The aspect layer locking status.
- Type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- duplicate()
Duplicate this aspect layer.
- Returns
The duplicated aspect layer.
- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- remove()
Delete this aspect layer.
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- Cannot be removed if the aspect layer is the only one remaining.
- assign_material(surface, material, uvset=0)
Assign a
Material
to the givenSurface
into the currentAspectLayer
.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- replace_material_assignment(surface, material, uvset=0)
Replace the material assignment on the given
Surface
with theMaterial
while keeping the uv transformation in the currentAspectLayer
.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- material_assignment_uvset(surface)
Get the uvset in for the material assignment on the given
Surface
.- Parameters
surface (Surface) -- Surface on which to get the uvset.
- Returns
The uvset.
- Return type
- Raises
ValueError -- If the aspect layer is not applied on this surface.
- 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
- 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
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If the aspect layer is not applied on this surface.
- 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
- 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
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If the aspect layer is not applied on this surface.
- 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
- 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
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If the aspect layer is not applied on this surface.
- 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.
- material_assignment(surface)
Get the material assignment on the given
Surface
if it exists. ReturnNone
if not.
- material_assignment_per_surface()
Get the map of material assignments per surface.
- assign_sticker(surface, material, uvset=0)
Assign a
Material
as a sticker to the givenSurface
into the currentAspectLayer
.- Parameters
- Returns
The index of the
Material
assigned as a sticker to the givenSurface
.- Return type
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- sticker_assignment_offset_u(surface, sticker_index)
Get the offset in the U direction of the sticker assignment on the given
Surface
, in meters.- Parameters
- Returns
The offset in the U direction.
- Return type
- Raises
ValueError -- If the aspect layer is not applied on this surface.
ValueError -- If the stickerIndex does not correspond to a sticker assigned to this surface.
- set_sticker_assignment_offset_u(offset_u, surface, sticker_index)
Set the offset in the U direction of the sticker assignment on the given
Surface
, in meters.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If the aspect layer is not applied on this surface.
ValueError -- If the stickerIndex does not correspond to a sticker assigned to this surface.
- sticker_assignment_offset_v(surface, sticker_index)
Get the offset in the U direction of the sticker assignment on the given
Surface
, in meters.- Parameters
- Returns
The offset in the V direction.
- Return type
- Raises
ValueError -- If the aspect layer is not applied on this surface.
ValueError -- If the stickerIndex does not correspond to a sticker assigned to this surface.
- set_sticker_assignment_offset_v(offset_v, surface, sticker_index)
Set the offset in the V direction of the sticker assignment on the given
Surface
, in meters.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If the aspect layer is not applied on this surface.
ValueError -- If the stickerIndex does not correspond to a sticker assigned to this surface.
- sticker_assignment_rotation(surface, sticker_index)
Get the rotation of the sticker assignment on the given
Surface
, in degrees.- Parameters
- Returns
The rotation in degrees.
- Return type
- Raises
ValueError -- If the aspect layer is not applied on this surface.
ValueError -- If the stickerIndex does not correspond to a sticker assigned to this surface.
- set_sticker_assignment_rotation(rotation, surface, sticker_index)
Set the rotation of the sticker assignment on the given
Surface
, in degrees.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If the aspect layer is not applied on this surface.
ValueError -- If the stickerIndex does not correspond to a sticker assigned to this surface.
- remove_sticker_assignment(surface, sticker_index)
Remove the sticker assignment of the given index on the given
Surface
.- Parameters
- Raises
ReadOnlyError -- If
Database
is in read only mode.ValueError -- If the aspect layer is not applied on this surface.
ValueError -- If the stickerIndex does not correspond to a sticker assigned to this surface.
- remove_all_sticker_assignments(surface)
Remove all the sticker assignments on the given
Surface
.- Parameters
surface (Surface) -- Surface from which to remove all sticker assignments.
- Raises
ReadOnlyError -- If
Database
is in read only mode.
- sticker_assignment(surface, sticker_index)
Get the sticker assignment on the given
Surface
at the given index if it exists. ReturnNone
if not.- Parameters
- Returns
The
Material
assigned as sticker at the given stickerIndex to the givenSurface
. ReturnsNone
if no material is assigned as a sticker with the given stickerIndex.- Return type
- Raises
ValueError -- If the aspect layer is not applied on this surface.
ValueError -- If the stickerIndex does not correspond to a sticker assigned to this surface.