Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_camera.c
| Show All 36 Lines | |||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| #include "BKE_camera.h" | #include "BKE_camera.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_depsgraph.h" | #include "BKE_depsgraph.h" | ||||
| #include "WM_api.h" | |||||
| static float rna_Camera_angle_get(PointerRNA *ptr) | static float rna_Camera_angle_get(PointerRNA *ptr) | ||||
| { | { | ||||
| Camera *cam = ptr->id.data; | Camera *cam = ptr->id.data; | ||||
| float sensor = BKE_camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y); | float sensor = BKE_camera_sensor_size(cam->sensor_fit, cam->sensor_x, cam->sensor_y); | ||||
| return focallength_to_fov(cam->lens, sensor); | return focallength_to_fov(cam->lens, sensor); | ||||
| } | } | ||||
| static void rna_Camera_angle_set(PointerRNA *ptr, float value) | static void rna_Camera_angle_set(PointerRNA *ptr, float value) | ||||
| ▲ Show 20 Lines • Show All 351 Lines • Show Last 20 Lines | |||||