MCPcopy Create free account
hub / github.com/openai/point-e / write_camera_metadata

Function write_camera_metadata

point_e/evals/scripts/blender_script.py:430–448  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

428
429
430def write_camera_metadata(path):
431 x_fov, y_fov = scene_fov()
432 bbox_min, bbox_max = scene_bbox()
433 matrix = bpy.context.scene.camera.matrix_world
434 with open(path, "w") as f:
435 json.dump(
436 dict(
437 format_version=FORMAT_VERSION,
438 max_depth=MAX_DEPTH,
439 bbox=[list(bbox_min), list(bbox_max)],
440 origin=list(matrix.col[3])[:3],
441 x_fov=x_fov,
442 y_fov=y_fov,
443 x=list(matrix.col[0])[:3],
444 y=list(-matrix.col[1])[:3],
445 z=list(-matrix.col[2])[:3],
446 ),
447 f,
448 )
449
450
451def save_rendering_dataset(

Callers 1

save_rendering_datasetFunction · 0.85

Calls 2

scene_fovFunction · 0.85
scene_bboxFunction · 0.85

Tested by

no test coverage detected