Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2019-05-17 17:57:31 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-17 18:59:26 +0300
commitbc3139d79226896cf6c2b0813a1188eda70fad09 (patch)
treee5c7f1f878b4769def10e2ddbc75aacebda4afd5 /source/blender/makesdna
parent043299ab69ca47a42fc8ca4f629727f8a6a2dd31 (diff)
Cycles/Eevee: unify depth of field settings for cameras
There is now a checkbox to enable/disable depth of field per camera. For Eevee this replace the scene level setting. For Cycles there is now only an F-Stop value, no longer a Radius. Existing files are converted based on Cycles or Eevee being set in the scene. Differential Revision: https://developer.blender.org/D4882
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_camera_types.h25
-rw-r--r--source/blender/makesdna/DNA_scene_types.h2
-rw-r--r--source/blender/makesdna/intern/makesdna.c2
3 files changed, 25 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 8c5d911b7fa..b78b2f64648 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -67,6 +67,19 @@ typedef struct CameraBGImage {
short source;
} CameraBGImage;
+/** Properties for dof effect. */
+typedef struct CameraDOFSettings {
+ /** Focal distance for depth of field. */
+ struct Object *focus_object;
+ float focus_distance;
+ float aperture_fstop;
+ float aperture_rotation;
+ float aperture_ratio;
+ int aperture_blades;
+ short flag;
+ char _pad[2];
+} CameraDOFSettings;
+
typedef struct Camera_Runtime {
/* For draw manager. */
float drw_corners[2][4][2];
@@ -91,13 +104,14 @@ typedef struct Camera {
float lens, ortho_scale, drawsize;
float sensor_x, sensor_y;
float shiftx, shifty;
- float dof_distance;
+ float dof_distance DNA_DEPRECATED;
/** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
- struct Object *dof_ob;
- struct GPUDOFSettings gpu_dof;
+ struct Object *dof_ob DNA_DEPRECATED;
+ struct GPUDOFSettings gpu_dof DNA_DEPRECATED;
+ struct CameraDOFSettings dof;
/* CameraBGImage reference images */
struct ListBase bg_images;
@@ -204,6 +218,11 @@ enum {
CAM_BGIMG_SOURCE_MOVIE = 1,
};
+/* CameraDOFSettings->flag */
+enum {
+ CAM_DOF_ENABLED = (1 << 0),
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index c64a593c9e2..0f6d028ea35 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -2376,7 +2376,7 @@ enum {
SCE_EEVEE_GTAO_ENABLED = (1 << 4),
SCE_EEVEE_GTAO_BENT_NORMALS = (1 << 5),
SCE_EEVEE_GTAO_BOUNCE = (1 << 6),
- SCE_EEVEE_DOF_ENABLED = (1 << 7),
+ // SCE_EEVEE_DOF_ENABLED = (1 << 7), /* Moved to camera->dof.flag */
SCE_EEVEE_BLOOM_ENABLED = (1 << 8),
SCE_EEVEE_MOTION_BLUR_ENABLED = (1 << 9),
SCE_EEVEE_SHADOW_HIGH_BITDEPTH = (1 << 10),
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 0ea1ca9c018..c09ada4a41d 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -41,6 +41,8 @@
* numbers give more output.
*/
+#define DNA_DEPRECATED_ALLOW
+
#include <string.h>
#include <stdlib.h>
#include <stdio.h>