utils module#
Utility functions for rendering scenes in Blender.
- utils.add_object(object_dir: str, name: str, scale: float, loc: tuple[float, float], theta: float = 0) None [source]#
Load an object from a file. We assume that in the directory object_dir, there is a file named “$name.blend” which contains a single object named “$name” that has unit size and is centered at the origin.
- Parameters:
object_dir – string giving the directory where the object .blend file is located
name – string giving the name of the object to load
scale – scalar giving the size that the object should be in the scene
loc – tuple (x, y) giving the coordinates on the ground plane where the object should be placed.
theta – optional rotation of the object about the z-axis