================ EnvironmentLayer ================ .. py:class:: EnvironmentLayer .. py:method:: id :property: The id of the environment layer. :type: str, read-only .. py:method:: name :property: The name of the environment layer. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: visibility :property: The environment layer visibility. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: active :property: The active status of the environment layer. :type: bool, read-only .. py:method:: duplicate() Duplicate this environment layer. :returns: The duplicated environment layer. :rtype: EnvironmentLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this environment layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: assign_environment(surface, env) Assign an :py:obj:`Environment` to the given :py:obj:`Surface` into the current :py:obj:`EnvironmentLayer`. :param surface: Surface on which to assign the environment. :type surface: Surface :param env: Environment to assign. :type env: Environment :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: assign_global_environment(env) Define the global :py:obj:`Environment` into the current :py:obj:`EnvironmentLayer`. :param env: New global :py:obj:`Environment`. :type env: Environment :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove_environment_assignment(surface) Remove the environment assignment on the given :py:obj:`Surface`. :param surface: Surface on which to remove the environment. :type surface: Surface :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove_global_environment() Remove the global environment into the current :py:obj:`EnvironmentLayer`. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: get_environment_assignment(surface) Get the environment 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:`Environment` assigned to the given :py:obj:`Surface`. Returns nullptr if no environment is assigned. :rtype: Environment or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: get_global_environment() Get the global :py:obj:`Environment` asigned into the current :py:obj:`EnvironmentLayer`. :returns: The global :py:obj:`Environment` assigned into the current :py:obj:`EnvironmentLayer`. Return :py:obj:`None` if no global :py:obj:`Environment` if assigned. :rtype: Environment or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode.