blenderproc.python.types.EntityUtility module¶
-
class
blenderproc.python.types.EntityUtility.
Entity
(bpy_object)[source]¶ Bases:
blenderproc.python.types.StructUtility.Struct
-
apply_T
(transform)[source]¶ Apply the given transformation to the pose of the entity.
Parameters: transform ( Union
[ndarray
,Matrix
]) – A 4x4 matrix representing the transformation.
-
get_local2world_mat
()[source]¶ Returns the pose of the object in the form of a local2world matrix.
Return type: ndarray
Returns: The 4x4 local2world matrix.
-
get_location
(frame=None)[source]¶ Returns the location of the entity in 3D world coordinates.
Parameters: frame ( Optional
[int
]) – The frame number at which the value should be returned. If None is given, the current frame number is used.Return type: ndarray
Returns: The location at the specified frame.
-
get_parent
()[source]¶ Returns the parent of the entity.
Return type: Optional
[Entity
]Returns: The parent.
-
get_rotation
(frame=None)[source]¶ Returns the rotation of the entity in euler angles.
Parameters: frame ( Optional
[int
]) – The frame number at which the value should be returned. If None is given, the current frame number is used.Return type: ndarray
Returns: The rotation at the specified frame.
-
get_scale
(frame=None)[source]¶ Returns the scale of the entity along all three axes.
Parameters: frame ( Optional
[int
]) – The frame number at which the value should be returned. If None is given, the current frame number is used.Return type: ndarray
Returns: The scale at the specified frame.
-
is_empty
()[source]¶ Returns whether the entity is from type “EMPTY”.
Return type: bool
Returns: True, if its an empty.
-
set_local2world_mat
(matrix_world)[source]¶ Sets the pose of the object in the form of a local2world matrix.
Parameters: matrix_world ( Union
[ndarray
,Matrix
]) – A 4x4 matrix.
-
set_location
(location, frame=None)[source]¶ Sets the location of the entity in 3D world coordinates.
Parameters:
-
set_parent
(parent)[source]¶ Sets the parent of entity.
Parameters: parent ( Entity
) – The parent entity to set.
-
set_rotation_euler
(rotation_euler, frame=None)[source]¶ Sets the rotation of the entity in euler angles.
Parameters:
-
-
blenderproc.python.types.EntityUtility.
convert_to_entities
(blender_objects)[source]¶ Converts the given list of blender objects to entities
Parameters: blender_objects ( list
) – List of blender objects.Return type: List
[Entity
]Returns: The list of entities.