INNER CODE UNIT · Python
_set_camera_at_size
VITA-Group/Diffusion4D · rendering/blender.py:147
def _set_camera_at_size(i: int, scale: float = 1.5) -> bpy.types.Object:
"""Debugging function to set the camera on the 6 faces of a cube.
Args:
i (int): Index of the face of the cube.
scale (float, optional): Scale of the cube. Defaults to 1.5.
Returns:
bpy.types.Object: The camera object.
"""
if i == 0:
x, y, z = scale, 0, 0
elif i == 1:
x, y, z = -scale, 0, 0
elif i == 2:
x, y, z = 0, scale, 0
elif i == 3:
x, y, z = 0, -scale, 0