frame_objects_with_camera
Position the camera to make selected objects fill the frame, using render aspect and FOV to set distance and clipping. Use it before rendering to control the viewing angle.
Instructions
Position a camera so the given objects exactly fill the frame.
Distance is computed from the render aspect ratio and the camera's field of view, and the clipping range is widened to suit. Use this before render_preview when you want to control the angle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| camera | No | Camera to move; omit for the active one | |
| create | No | Create an AI_PreviewCam if the scene has no camera | |
| margin | No | Padding factor; 1.0 fills the frame exactly | |
| objects | No | Objects to fit in frame; omit for the selection, else all geometry | |
| direction | No | Named viewing angle. 'three_quarter' reads best for inspecting a prop; 'front'/'left'/'top' are for checking proportions. | |
| set_active | No |