INNER CODE UNIT · Python
offset
VITA-Group/Diffusion4D · rendering/blender.py:478
offset = -(bbox_min + bbox_max) / 2
for obj in get_scene_root_objects():
obj.matrix_world.translation += offset
bpy.ops.object.select_all(action="DESELECT")
# unparent the camera
bpy.data.objects["Camera"].parent = None
def delete_missing_textures() -> Dict[str, Any]:
"""Deletes all missing textures in the scene.
Returns:
Dict[str, Any]: Dictionary with keys "count", "files", and "file_path_to_color".
"count" is the number of missing textures, "files" is a list of the missing
texture file paths, and "file_path_to_color" is a dictionary mapping the
missing texture file paths to a random color.
"""