Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_camera.cpp
| Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | switch(b_camera.type()) | ||||
| bcam->type = CAMERA_PERSPECTIVE; | bcam->type = CAMERA_PERSPECTIVE; | ||||
| break; | break; | ||||
| case BL::Camera::type_PERSP: | case BL::Camera::type_PERSP: | ||||
| default: | default: | ||||
| bcam->type = CAMERA_PERSPECTIVE; | bcam->type = CAMERA_PERSPECTIVE; | ||||
| break; | break; | ||||
| } | } | ||||
| switch(get_enum(ccamera, "panorama_type")) { | bcam->panorama_type = (PanoramaType)get_enum(ccamera, | ||||
| case 1: | "panorama_type", | ||||
| bcam->panorama_type = PANORAMA_FISHEYE_EQUIDISTANT; | PANORAMA_NUM_TYPES, | ||||
| break; | PANORAMA_EQUIRECTANGULAR); | ||||
| case 2: | |||||
| bcam->panorama_type = PANORAMA_FISHEYE_EQUISOLID; | |||||
| break; | |||||
| case 3: | |||||
| bcam->panorama_type = PANORAMA_MIRRORBALL; | |||||
| break; | |||||
| case 0: | |||||
| default: | |||||
| bcam->panorama_type = PANORAMA_EQUIRECTANGULAR; | |||||
| break; | |||||
| } | |||||
| bcam->fisheye_fov = RNA_float_get(&ccamera, "fisheye_fov"); | bcam->fisheye_fov = RNA_float_get(&ccamera, "fisheye_fov"); | ||||
| bcam->fisheye_lens = RNA_float_get(&ccamera, "fisheye_lens"); | bcam->fisheye_lens = RNA_float_get(&ccamera, "fisheye_lens"); | ||||
| bcam->latitude_min = RNA_float_get(&ccamera, "latitude_min"); | bcam->latitude_min = RNA_float_get(&ccamera, "latitude_min"); | ||||
| bcam->latitude_max = RNA_float_get(&ccamera, "latitude_max"); | bcam->latitude_max = RNA_float_get(&ccamera, "latitude_max"); | ||||
| bcam->longitude_min = RNA_float_get(&ccamera, "longitude_min"); | bcam->longitude_min = RNA_float_get(&ccamera, "longitude_min"); | ||||
| bcam->longitude_max = RNA_float_get(&ccamera, "longitude_max"); | bcam->longitude_max = RNA_float_get(&ccamera, "longitude_max"); | ||||
| ▲ Show 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | void BlenderSync::sync_camera(BL::RenderSettings& b_render, | ||||
| bcam.pixelaspect.x = b_render.pixel_aspect_x(); | bcam.pixelaspect.x = b_render.pixel_aspect_x(); | ||||
| bcam.pixelaspect.y = b_render.pixel_aspect_y(); | bcam.pixelaspect.y = b_render.pixel_aspect_y(); | ||||
| bcam.shuttertime = b_render.motion_blur_shutter(); | bcam.shuttertime = b_render.motion_blur_shutter(); | ||||
| BL::CurveMapping b_shutter_curve(b_render.motion_blur_shutter_curve()); | BL::CurveMapping b_shutter_curve(b_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); | ||||
| PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles"); | PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles"); | ||||
| switch(get_enum(cscene, "motion_blur_position")) { | bcam.motion_position = | ||||
| case 0: | (Camera::MotionPosition)get_enum(cscene, | ||||
| bcam.motion_position = Camera::MOTION_POSITION_START; | "motion_blur_position", | ||||
| break; | Camera::MOTION_NUM_POSITIONS, | ||||
| case 1: | Camera::MOTION_POSITION_CENTER); | ||||
| bcam.motion_position = Camera::MOTION_POSITION_CENTER; | bcam.rolling_shutter_type = | ||||
| break; | (Camera::RollingShutterType)get_enum(cscene, | ||||
| case 2: | "rolling_shutter_type", | ||||
| bcam.motion_position = Camera::MOTION_POSITION_END; | Camera::ROLLING_SHUTTER_NUM_TYPES, | ||||
| break; | Camera::ROLLING_SHUTTER_NONE); | ||||
| default: | |||||
| bcam.motion_position = Camera::MOTION_POSITION_CENTER; | |||||
| break; | |||||
| } | |||||
| switch(get_enum(cscene, "rolling_shutter_type")) { | |||||
| case 0: | |||||
| bcam.rolling_shutter_type = Camera::ROLLING_SHUTTER_NONE; | |||||
| break; | |||||
| case 1: | |||||
| bcam.rolling_shutter_type = Camera::ROLLING_SHUTTER_TOP; | |||||
| break; | |||||
| default: | |||||
| bcam.rolling_shutter_type = Camera::ROLLING_SHUTTER_NONE; | |||||
| break; | |||||
| } | |||||
| bcam.rolling_shutter_duration = RNA_float_get(&cscene, "rolling_shutter_duration"); | bcam.rolling_shutter_duration = RNA_float_get(&cscene, "rolling_shutter_duration"); | ||||
| /* border */ | /* border */ | ||||
| if(b_render.use_border()) { | if(b_render.use_border()) { | ||||
| bcam.border.left = b_render.border_min_x(); | bcam.border.left = b_render.border_min_x(); | ||||
| bcam.border.right = b_render.border_max_x(); | bcam.border.right = b_render.border_max_x(); | ||||
| bcam.border.bottom = b_render.border_min_y(); | bcam.border.bottom = b_render.border_min_y(); | ||||
| bcam.border.top = b_render.border_max_y(); | bcam.border.top = b_render.border_max_y(); | ||||
| ▲ Show 20 Lines • Show All 342 Lines • Show Last 20 Lines | |||||