=============== VisibilityLayer =============== .. py:class:: VisibilityLayer .. 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:: visible :property: The layer visibility. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: inherited_visibility :property: The inherited layer visibility. :type: bool, read-only .. py:method:: locked :property: The layer lock state. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: inherited_locking :property: The inherited layer lock state. :type: bool, read-only .. py:method:: configured :property: If the layer is used in configuration or not. :type: bool, read-only .. py:method:: active :property: Visibility layer active state. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: model :property: The parent model of this layer. :type: Model, read-only .. py:method:: parent_layer :property: The parent layer of this layer or :py:obj:`None` if no parent. :type: VisibilityLayer or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to move the layer into one of its children or trying to move the layer to another model or trying to move the layer to itself. .. py:method:: list_child_layers(recursive = True) List the child visibility layers of this layer. :param recursive: If :py:obj:`True`, lists all child layers in this layer, otherwise only the direct child layers are returned. :type recursive: bool :returns: The list of visibility layers of this layer. :rtype: list(VisibilityLayer) .. py:method:: create_visibility_layer(name) Create a new child visibility layer of this layer. :param name: Name of the layer. :type name: str :returns: The newly created layer. :rtype: VisibilityLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this visibility layer with its children. :returns: The duplicated layer. :rtype: VisibilityLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete this visibility layer .. note:: By default, only empty layers can be deleted (:py:obj:`NotEmptyError` is raised otherwise), use ``force`` to force deletion of non empty layers. :param force: Force the deletion of the layer even if it contains surfaces. :type force: bool :raises NotEmptyError: If ``force`` is :py:obj:`False` and the layer contains surfaces. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: list_surfaces() List the surfaces of this layer. :returns: The list of surfaces of this layer. :rtype: list(Surface)