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

Function set_camera

point_e/evals/scripts/blender_script.py:123–131  ·  view source on GitHub ↗
(direction, camera_dist=2.0)

Source from the content-addressed store, hash-verified

121
122
123def set_camera(direction, camera_dist=2.0):
124 camera_pos = -camera_dist * direction
125 bpy.context.scene.camera.location = camera_pos
126
127 # https://blender.stackexchange.com/questions/5210/pointing-the-camera-in-a-particular-direction-programmatically
128 rot_quat = direction.to_track_quat("-Z", "Y")
129 bpy.context.scene.camera.rotation_euler = rot_quat.to_euler()
130
131 bpy.context.view_layer.update()
132
133
134def randomize_camera(camera_dist=2.0):

Callers 2

randomize_cameraFunction · 0.85
pan_cameraFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected