Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_camera.cpp
| Show First 20 Lines • Show All 642 Lines • ▼ Show 20 Lines | static void blender_camera_from_view(BlenderCamera *bcam, | ||||
| bcam->lens = b_v3d.lens(); | bcam->lens = b_v3d.lens(); | ||||
| bcam->shuttertime = b_scene.render().motion_blur_shutter(); | bcam->shuttertime = b_scene.render().motion_blur_shutter(); | ||||
| BL::CurveMapping b_shutter_curve(b_scene.render().motion_blur_shutter_curve()); | BL::CurveMapping b_shutter_curve(b_scene.render().motion_blur_shutter_curve()); | ||||
| curvemapping_to_array(b_shutter_curve, bcam->shutter_curve, RAMP_TABLE_SIZE); | curvemapping_to_array(b_shutter_curve, bcam->shutter_curve, RAMP_TABLE_SIZE); | ||||
| if(b_rv3d.view_perspective() == BL::RegionView3D::view_perspective_CAMERA) { | if(b_rv3d.view_perspective() == BL::RegionView3D::view_perspective_CAMERA) { | ||||
| /* camera view */ | /* camera view */ | ||||
| BL::Object b_ob = (b_v3d.lock_camera_and_layers())? b_scene.camera(): b_v3d.camera(); | BL::Object b_ob = (b_v3d.use_local_camera())? b_v3d.camera(): b_scene.camera(); | ||||
| if(b_ob) { | if(b_ob) { | ||||
| blender_camera_from_object(bcam, b_engine, b_ob, skip_panorama); | blender_camera_from_object(bcam, b_engine, b_ob, skip_panorama); | ||||
| if(!skip_panorama && bcam->type == CAMERA_PANORAMA) { | if(!skip_panorama && bcam->type == CAMERA_PANORAMA) { | ||||
| /* in panorama camera view, we map viewplane to camera border */ | /* in panorama camera view, we map viewplane to camera border */ | ||||
| BoundBox2D view_box, cam_box; | BoundBox2D view_box, cam_box; | ||||
| ▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | if(b_v3d.use_render_border()) { | ||||
| bcam->border.left = b_v3d.render_border_min_x(); | bcam->border.left = b_v3d.render_border_min_x(); | ||||
| bcam->border.right = b_v3d.render_border_max_x(); | bcam->border.right = b_v3d.render_border_max_x(); | ||||
| bcam->border.bottom = b_v3d.render_border_min_y(); | bcam->border.bottom = b_v3d.render_border_min_y(); | ||||
| bcam->border.top = b_v3d.render_border_max_y(); | bcam->border.top = b_v3d.render_border_max_y(); | ||||
| } | } | ||||
| return; | return; | ||||
| } | } | ||||
| BL::Object b_ob = (b_v3d.lock_camera_and_layers())? b_scene.camera(): b_v3d.camera(); | BL::Object b_ob = (b_v3d.use_local_camera())? b_v3d.camera(): b_scene.camera(); | ||||
| if(!b_ob) | if(!b_ob) | ||||
| return; | return; | ||||
| /* Determine camera border inside the viewport. */ | /* Determine camera border inside the viewport. */ | ||||
| BoundBox2D full_border; | BoundBox2D full_border; | ||||
| blender_camera_border_subset(b_engine, | blender_camera_border_subset(b_engine, | ||||
| b_render, | b_render, | ||||
| ▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines | |||||