=========== AspectLayer =========== .. py:class:: AspectLayer .. py:method:: id :property: The id of the aspect layer. :type: str, read-only .. py:method:: name :property: The name of the aspect layer. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of this aspect layer or :py:obj:`None` if the aspect layer is at the root of the hierarchy. :type: AspectLayerGroup or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: visibility :property: The aspect layer visibility. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: active :property: The active status of the aspect layer. :type: bool, read-only .. py:method:: duplicate() Duplicate this aspect layer. :returns: The duplicated aspect layer. :rtype: AspectLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this aspect layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: assign_material(surface, material, uvset = 0) Assign a :py:obj:`Material` to the given :py:obj:`Surface` into the current :py:obj:`AspectLayer`. :param surface: Surface on which to assign the material. :type surface: Surface :param material: Material to assign. :type material: Material :param uvset: UV set to use for this material assignment. :type uvset: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: get_material_assignment_offset_u(surface) Get the offset in the U direction of the material assignment on the given :py:obj:`Surface`, in meters. :param surface: Surface on which to get the offset in the U direction. :type surface: Surface :returns: The offset in the U direction. :rtype: float :raises ValueError: If the aspect layer is not applied on this surface. .. py:method:: set_material_assignment_offset_u(offset_u, surface) Set the offset in the U direction of the material assignment on the given :py:obj:`Surface`, in meters. :param offset_u: Offset in the U direction to set. :type offset_u: float :param surface: Surface on which to set the offset in the U direction. :type surface: Surface :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If the aspect layer is not applied on this surface. .. py:method:: get_material_assignment_offset_v(surface) Get the offset in the V direction of the material assignment on the given :py:obj:`Surface`, in meters. :param surface: Surface on which to get the offset in the V direction. :type surface: Surface :returns: The offset in the V direction. :rtype: float :raises ValueError: If the aspect layer is not applied on this surface. .. py:method:: set_material_assignment_offset_v(offset_v, surface) Set the offset in the V direction of the material assignment on the given :py:obj:`Surface`, in meters. :param offset_v: Offset in the V direction to set. :type offset_v: float :param surface: Surface on which to set the offset in the V direction. :type surface: Surface :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If the aspect layer is not applied on this surface. .. py:method:: get_material_assignment_rotation(surface) Get the rotation of the material assignment on the given :py:obj:`Surface`, in degrees. :param surface: Surface on which to get the rotation. :type surface: Surface :returns: The rotation. :rtype: float :raises ValueError: If the aspect layer is not applied on this surface. .. py:method:: set_material_assignment_rotation(rotation, surface) Set the rotation of the material assignment on the given :py:obj:`Surface`, in degrees. :param rotation: Rotation to set. :type rotation: float :param surface: Surface on which to set the rotation. :type surface: Surface :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If the aspect layer is not applied on this surface. .. py:method:: remove_material_assignment(surface) Remove the material assignment on the given :py:obj:`Surface`. :param surface: Surface from which to remove the material. :type surface: Surface :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: get_material_assignment(surface) Get the material assignment on the given :py:obj:`Surface` if it exists. Return :py:obj:`None` if not. :param surface: Surface on which to get the material assignment. :type surface: Surface :returns: The :py:obj:`Material` assigned to the given :py:obj:`Surface`. Returns :py:obj:`None` if no material is assigned. :rtype: Material or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode.