======= Overlay ======= .. py:currentmodule:: p3dsdk .. py:class:: Overlay .. py:method:: id :property: The id of the overlay. :type: str, read-only .. py:method:: name :property: The name of the overlay. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: group :property: The group of the overlay. :type: OverlayGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: alpha :property: The transparency of the overlay. :type: float :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative alpha value or an alpha value greater than 1. .. py:method:: list_layers() List the layers of this overlay, in bottom to top order. :returns: The list of layers in the overlay. :rtype: list(OverlayLayer) .. py:method:: duplicate() Duplicate this overlay. :returns: The duplicated overlay. :rtype: Overlay :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this overlay .. note:: By default, only not used overlay can be deleted (:py:obj:`InUseError` is raised otherwise), use ``force`` to force deletion of used overlays. :param force: Force the deletion of the overlay even if it is in use. :type force: bool :raises InUseError: If ``force`` is :py:obj:`False` and the overlay is used. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: create_layer(name) Create a new layer. :param name: The name of the new layer. :type name: str :returns: The newly created layer. :rtype: OverlayLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. OverlayLayer ------------ .. py:class:: OverlayLayer .. py:method:: id :property: The id of the layer. :type: str, read-only .. py:method:: name :property: The name of the layer. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: overlay :property: The overlay containing the layer. :type: Overlay, read-only .. py:method:: index :property: The index of this layer in the layer list. :type: int :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: visible :property: Whether the layer is visible. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: configured :property: Whether the layer is used in configuration. :type: bool, read-only .. py:method:: duplicate() Duplicate this layer. :returns: The duplicated layer. :rtype: OverlayLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode.