INNER CODE UNIT · Python
scene_bbox
VITA-Group/Diffusion4D · rendering/blender.py:336
def scene_bbox(
single_obj: Optional[bpy.types.Object] = None, ignore_matrix: bool = False
) -> Tuple[Vector, Vector]:
"""Returns the bounding box of the scene.
Taken from Shap-E rendering script
(https://github.com/openai/shap-e/blob/main/shap_e/rendering/blender/blender_script.py#L68-L82)
Args:
single_obj (Optional[bpy.types.Object], optional): If not None, only computes
the bounding box for the given object. Defaults to None.
ignore_matrix (bool, optional): Whether to ignore the object's matrix. Defaults
to False.
Raises:
RuntimeError: If there are no objects in the scene.
Returns: