Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/VITA-Group/Diffusion4D
/ functions
Functions
45 in github.com/VITA-Group/Diffusion4D
⨍
Functions
45
◇
Types & classes
1
↓ 7 callers
Function
place_camera
(time, camera_pose_mode="random", camera_dist_min=2.0, camera_dist_max=2.0,Direction_type='front',elevation=0,
rendering/blender.py:742
↓ 7 callers
Function
write_camera_metadata
(path)
rendering/blender.py:791
↓ 4 callers
Function
_create_light
Creates a light object. Args: name (str): Name of the light object. light_type (Literal["POINT", "SUN", "SPOT", "AREA"]): Type of
rendering/blender.py:179
↓ 4 callers
Function
get_scene_root_objects
Returns all root objects in the scene. Yields: Generator[bpy.types.Object, None, None]: Generator of all root objects in the
rendering/blender.py:374
↓ 4 callers
Function
scene_bbox
Returns the bounding box of the scene. Taken from Shap-E rendering script (https://github.com/openai/shap-e/blob/main/shap_e/rendering/blende
rendering/blender.py:336
↓ 2 callers
Function
pan_camera
(time, axis="Z", camera_dist=2.0, elevation=-0.1,Direction_type='multi',azimuth=0)
rendering/blender.py:754
↓ 2 callers
Function
set_camera
(direction, camera_dist=2.0,Direction_type='front',az_front_vector=None)
rendering/blender.py:768
↓ 1 callers
Function
_apply_color_to_object
Applies the given color to the object. Args: obj (bpy.types.Object): The object to apply the color to. color (Tuple[float, float,
rendering/blender.py:549
↓ 1 callers
Method
_get_image_filepaths
Returns the filepaths of all images used in the scene.
rendering/blender.py:661
↓ 1 callers
Method
_get_linked_libraries_filepaths
Returns the filepaths of all linked libraries.
rendering/blender.py:681
↓ 1 callers
Method
_get_material_filepaths
Returns the filepaths of all images used in materials.
rendering/blender.py:669
↓ 1 callers
Function
_get_random_color
Generates a random RGB-A color. The alpha value is always 1. Returns: Tuple[float, float, float, float]: A random RGB-A color. Each
rendering/blender.py:537
↓ 1 callers
Function
apply_single_random_color_to_all_objects
Applies a single random color to all objects in the scene. Returns: Tuple[float, float, float, float]: The random color that was applied
rendering/blender.py:570
↓ 1 callers
Function
delete_invisible_objects
Deletes all invisible objects in the scene. Returns: None
rendering/blender.py:427
↓ 1 callers
Function
delete_missing_textures
Deletes all missing textures in the scene. Returns: Dict[str, Any]: Dictionary with keys "count", "files", and "file_path_to_color".
rendering/blender.py:487
↓ 1 callers
Method
get_animation_count
Returns the number of animations in the scene.
rendering/blender.py:644
↓ 1 callers
Method
get_armature_count
Returns the number of armatures in the scene.
rendering/blender.py:705
↓ 1 callers
Method
get_edge_count
Returns the total number of edges in the scene.
rendering/blender.py:620
↓ 1 callers
Method
get_lamp_count
Returns the number of lamps in the scene.
rendering/blender.py:628
↓ 1 callers
Method
get_linked_files
Returns the filepaths of all linked files.
rendering/blender.py:648
↓ 1 callers
Method
get_material_count
Returns the number of materials in the scene.
rendering/blender.py:636
↓ 1 callers
Method
get_mesh_count
Returns the number of meshes in the scene.
rendering/blender.py:632
↓ 1 callers
Method
get_metadata
Returns the metadata of the scene. Returns: Dict[str, Any]: Dictionary of the metadata with keys for "file_size", "po
rendering/blender.py:717
↓ 1 callers
Method
get_object_count
Returns the number of objects in the scene.
rendering/blender.py:640
↓ 1 callers
Method
get_poly_count
Returns the total number of polygons in the scene.
rendering/blender.py:604
↓ 1 callers
Function
get_scene_meshes
Returns all meshes in the scene. Yields: Generator[bpy.types.Object, None, None]: Generator of all meshes in the scene.
rendering/blender.py:386
↓ 1 callers
Method
get_scene_size
Returns the size of the scene bounds in meters.
rendering/blender.py:688
↓ 1 callers
Method
get_shape_key_count
Returns the number of shape keys in the scene.
rendering/blender.py:693
↓ 1 callers
Method
get_vertex_count
Returns the total number of vertices in the scene.
rendering/blender.py:612
↓ 1 callers
Function
load_object
Loads a model with a supported file extension into the scene. Args: object_path (str): Path to the model file. Raises: Value
rendering/blender.py:295
↓ 1 callers
Function
normalize_scene
Normalizes the scene by scaling and translating it to fit in a unit cube centered at the origin. Mostly taken from the Point-E / Shap-E rende
rendering/blender.py:448
↓ 1 callers
Function
randomize_camera
(camera_dist=2.0,Direction_type='front',az_front_vector=None)
rendering/blender.py:141
↓ 1 callers
Function
randomize_lighting
Randomizes the lighting in the scene. Returns: Dict[str, bpy.types.Object]: Dictionary of the lights in the scene. The keys are
rendering/blender.py:214
↓ 1 callers
Method
read_file_size
Returns the size of the file in bytes.
rendering/blender.py:713
↓ 1 callers
Function
render_object
Saves rendered images with its camera matrix and metadata of the object. Args: object_file (str): Path to the object file. frame_
rendering/blender.py:826
↓ 1 callers
Function
reset_cameras
Resets the cameras in the scene to a single default camera.
rendering/blender.py:34
↓ 1 callers
Function
reset_scene
Resets the scene to a clean state. Returns: None
rendering/blender.py:271
↓ 1 callers
Function
scene_fov
()
rendering/blender.py:814
Method
__init__
Initializes the MetadataExtractor. Args: object_path (str): Path to the object file. scene (bpy.types.Scene): The cur
rendering/blender.py:587
Function
_sample_spherical
Sample a random point in a spherical shell. Args: radius_min (float): Minimum radius of the spherical shell. radius_max (float):
rendering/blender.py:70
Function
_set_camera_at_size
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, option
rendering/blender.py:147
Function
execute_command
(args,glb_file, gpu_id,file_name)
rendering/render.py:36
Function
get_3x4_RT_matrix_from_blender
Returns the 3x4 RT matrix from the given camera. Taken from Zero123, which in turn was taken from https://github.com/panmari/stanford-shapene
rendering/blender.py:397
Function
look_at
(obj_camera, point)
rendering/blender.py:1035
Function
sample_point_on_sphere
Samples a point on a sphere with the given radius. Args: radius (float): Radius of the sphere. Returns: Tuple[float, float,
rendering/blender.py:52