============= PositionLayer ============= .. py:currentmodule:: p3dsdk .. py:class:: PositionLayer .. 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:: 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:: configured :property: If the layer is used in configuration or not. :type: bool, read-only .. py:method:: is_active() Whether the position layer is active or not. :returns: The position layer's active state. :rtype: bool .. py:method:: set_active_layer() Set this position layer as active layer. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: duplicate() Duplicate this position layer. :returns: The duplicated layer. :rtype: PositionLayer :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(remove_configuration = True) Delete this position layer. :param remove_configuration: If :py:obj:`True`, delete the configuration rule for this position layer. :type remove_configuration: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: Cannot be removed if the position layer is the base layer. .. py:method:: has_scene_object_position(object) Returns whether the :py:obj:`SceneObject`'s position is in the current :py:obj:`PositionLayer`. :param object: Object in the :py:obj:`PositionLayer`. :type object: SceneObject :returns: Whether the :py:obj:`SceneObject`'s position is in the current :py:obj:`PositionLayer`. :rtype: bool .. py:method:: remove_scene_object_position_from_layer(object) Remove the :py:obj:`SceneObject`'s position from the current :py:obj:`PositionLayer`. :param object: Scene Object which position is to be removed from the :py:obj:`PositionLayer`. :type object: SceneObject :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: set_scene_object_translation(object, translation) Save the :py:obj:`SceneObject`'s translation into the current :py:obj:`PositionLayer`. :param object: Scene Object to be in the :py:obj:`PositionLayer`. :type object: SceneObject :param translation: Translation for the object to be in the :py:obj:`PositionLayer`. :type translation: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: scene_object_translation(object) Returns the :py:obj:`SceneObject` translation in the current :py:obj:`PositionLayer`. :param object: SceneObject in the :py:obj:`PositionLayer`. :type object: SceneObject :returns: The object translation in the current :py:obj:`PositionLayer`. :rtype: Vector3 :raises ValueError: If the position layer is not applied to this object. .. py:method:: set_scene_object_rotation(object, rotation) Save the :py:obj:`SceneObject`'s rotation into the current :py:obj:`PositionLayer`, in degrees. :param object: SceneObject to be in the :py:obj:`PositionLayer`. :type object: SceneObject :param rotation: Rotation for the object to be in the :py:obj:`PositionLayer`. :type rotation: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: scene_object_rotation(object) Returns the :py:obj:`SceneObject` rotation in the current :py:obj:`PositionLayer`, in degrees. :param object: SceneObject in the :py:obj:`PositionLayer`. :type object: SceneObject :returns: The object srotation in the current :py:obj:`PositionLayer`. :rtype: Vector3 :raises ValueError: If the position layer is not applied to this object. .. py:method:: set_scene_object_scale(object, scale) Save the :py:obj:`SceneObject`'s scale into the current :py:obj:`PositionLayer`. :param object: SceneObject to be in the :py:obj:`PositionLayer`. :type object: SceneObject :param scale: Scale for the object to be in the :py:obj:`PositionLayer`. :type scale: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If the object is a kinematics object. .. py:method:: scene_object_scale(object) Returns the :py:obj:`SceneObject` scale in the current :py:obj:`PositionLayer`. :param object: SceneObject in the :py:obj:`PositionLayer`. :type object: SceneObject :returns: The object scale in the current :py:obj:`PositionLayer`. :rtype: Vector3 :raises ValueError: If the position layer is not applied to this object.