=========== SceneObject =========== .. py:currentmodule:: p3dsdk .. py:class:: SceneObject .. py:method:: id :property: The id of the scene object. :type: str, read-only .. py:method:: name :property: The name of the scene object. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: type :property: The type of the scene object. :type: SceneObjectType, read-only .. py:method:: parent_object :property: The parent object of this object or :py:obj:`None` if no parent. :type: KinematicNode or None :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to move the object into one of its children, trying to move the object to another model, trying to move the object to itself or trying to move the object to an object which is not a :py:obj:`KinematicNode` (that is an :py:obj:`Axis`, a :py:obj:`Null` or a :py:obj:`Vector` ). .. py:method:: visible :property: The scene object visibility. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: locked :property: The scene object lock state. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: selected :property: Whether the scene object is selected. :type: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: color :property: The shaper color of the scene object. :type: ColorRgb :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: translation :property: The global translation of the scene object, in meters. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: rotation :property: The global rotation of the scene object, in degrees. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: scale :property: The global scale of the scene object. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. :raises ValueError: If trying to set a negative scale or trying to scale a Kinematics object. .. py:method:: pivot_to_world_translation :property: The translation from pivot point to global position, in meters. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: pivot_to_world_rotation :property: The rotation from pivot point to global orientation, in degrees. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: local_to_pivot_translation :property: The translation from local point to pivot position, in meters. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: local_to_pivot_rotation :property: The rotation from local point to pivot orientation, in degrees. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: pivot_to_parent_translation :property: The translation from pivot point to parent position, in meters .. note:: If the object does not have a parent, it returns the global translation. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: pivot_to_parent_rotation :property: The rotation from pivot point to parent orientation, in degrees .. note:: If the object does not have a parent, it returns the global rotation. :type: Vector3 :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: local_to_parent_translation :property: The translation from local point to parent position, in meters. :type: Vector3, read-only .. py:method:: local_to_parent_rotation :property: The rotation from local point to parent orientation, in degrees. :type: Vector3, read-only .. py:method:: list_child_objects(recursive = True) List the child kinematic object of this objects. :param recursive: If :py:obj:`True`, lists all child objects in this object, otherwise only the direct child objects are returned. :type recursive: bool :returns: The list of kinematic object of this node. :rtype: list(KinematicNode) .. py:method:: has_tag(tag) Whether the tag is assigned to the scene object. :param tag: Name of the tag. :type tag: str :returns: Whether the tag is assigned to the scene object. :rtype: bool .. py:method:: list_tags() List all the tags assigned to the scene object. :returns: The list of tags assigned to the scene object. :rtype: list(str) .. py:method:: add_tag(tag) Create a new tag and assign to the scene object. :param tag: Name of the tag. :type tag: str :returns: Whether the tag was added or not. :rtype: bool :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove_tag(tag) Remove tag from the scene object. :param tag: Name of the tag. :type tag: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove() Delete this scene object. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. SceneObjectType --------------- .. py:class:: SceneObjectType .. py:attribute:: SURFACE :annotation: = 0 Surface. .. py:attribute:: NULL_OBJECT :annotation: = 1 Kinematics object Null. .. py:attribute:: AXIS :annotation: = 2 Kinematics object Axis. .. py:attribute:: VECTOR :annotation: = 3 Kinematics object Vector. .. py:attribute:: BEZIER_PATH :annotation: = 4 Bezier Path. .. py:attribute:: CAMERA :annotation: = 5 Camera.