Depsgraph: New dependency graph integration commit
[blender.git] / source / blender / makesdna / DNA_scene_types.h
index 49f8b3cd4d03612c741d912f41257c88a3311bdb..fe346eecec5aa751a060728767a5d228df95c2ce 100644 (file)
@@ -46,7 +46,10 @@ extern "C" {
 #include "DNA_listBase.h"
 #include "DNA_ID.h"
 #include "DNA_freestyle_types.h"
+#include "DNA_gpu_types.h"
+#include "DNA_userdef_types.h"
 
+struct CurveMapping;
 struct Object;
 struct Brush;
 struct World;
@@ -247,6 +250,73 @@ typedef enum ScenePassType {
 
 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
 
+/* View - MultiView */
+typedef struct SceneRenderView {
+       struct SceneRenderView *next, *prev;
+
+       char name[64];  /* MAX_NAME */
+       char suffix[64];        /* MAX_NAME */
+
+       int viewflag;
+       int pad[2];
+       char pad2[4];
+
+} SceneRenderView;
+
+/* srv->viewflag */
+#define SCE_VIEW_DISABLE               (1<<0)
+
+/* scene.render.views_format */
+enum {
+       SCE_VIEWS_FORMAT_STEREO_3D = 0,
+       SCE_VIEWS_FORMAT_MULTIVIEW = 1,
+};
+
+/* ImageFormatData.views_output */
+enum {
+       R_IMF_VIEWS_INDIVIDUAL = 0,
+       R_IMF_VIEWS_STEREO_3D  = 1,
+       R_IMF_VIEWS_MULTIVIEW  = 2,
+};
+
+typedef struct Stereo3dFormat {
+       short flag;
+       char display_mode; /* encoding mode */
+       char anaglyph_type; /* anaglyph scheme for the user display */
+       char interlace_type;  /* interlace type for the user display */
+       char pad[3];
+} Stereo3dFormat;
+
+/* Stereo3dFormat.display_mode */
+typedef enum eStereoDisplayMode {
+       S3D_DISPLAY_ANAGLYPH    = 0,
+       S3D_DISPLAY_INTERLACE   = 1,
+       S3D_DISPLAY_PAGEFLIP    = 2,
+       S3D_DISPLAY_SIDEBYSIDE  = 3,
+       S3D_DISPLAY_TOPBOTTOM   = 4,
+} eStereoDisplayMode;
+
+/* Stereo3dFormat.flag */
+typedef enum eStereo3dFlag {
+       S3D_INTERLACE_SWAP        = (1 << 0),
+       S3D_SIDEBYSIDE_CROSSEYED  = (1 << 1),
+       S3D_SQUEEZED_FRAME        = (1 << 2),
+} eStereo3dFlag;
+
+/* Stereo3dFormat.anaglyph_type */
+typedef enum eStereo3dAnaglyphType {
+       S3D_ANAGLYPH_REDCYAN      = 0,
+       S3D_ANAGLYPH_GREENMAGENTA = 1,
+       S3D_ANAGLYPH_YELLOWBLUE   = 2,
+} eStereo3dAnaglyphType;
+
+/* Stereo3dFormat.interlace_type */
+typedef enum eStereo3dInterlaceType {
+       S3D_INTERLACE_ROW          = 0,
+       S3D_INTERLACE_COLUMN       = 1,
+       S3D_INTERLACE_CHECKERBOARD = 2,
+} eStereo3dInterlaceType;
+
 /* *************************************************************** */
 
 /* Generic image format settings,
@@ -284,7 +354,11 @@ typedef struct ImageFormatData {
        char  jp2_flag;
        char jp2_codec;
 
-       char pad[6];
+       char pad[5];
+
+       /* Multiview */
+       char views_format;
+       Stereo3dFormat stereo3d_format;
 
        /* color management */
        ColorManagedViewSettings view_settings;
@@ -348,6 +422,12 @@ typedef struct ImageFormatData {
 #define R_IMF_EXR_CODEC_ZIP   2
 #define R_IMF_EXR_CODEC_PIZ   3
 #define R_IMF_EXR_CODEC_RLE   4
+#define R_IMF_EXR_CODEC_ZIPS  5
+#define R_IMF_EXR_CODEC_B44   6
+#define R_IMF_EXR_CODEC_B44A  7
+#define R_IMF_EXR_CODEC_DWAA  8
+#define R_IMF_EXR_CODEC_DWAB  9
+#define R_IMF_EXR_CODEC_MAX  10
 
 /* ImageFormatData.jp2_flag */
 #define R_IMF_JP2_FLAG_YCC          (1<<0)  /* when disabled use RGB */ /* was R_JPEG2K_YCC */
@@ -577,8 +657,10 @@ typedef struct RenderData {
        /* render simplify */
        int simplify_flag;
        short simplify_subsurf;
-       short simplify_shadowsamples;
+       short simplify_subsurf_render;
+       short simplify_shadowsamples, pad9;
        float simplify_particles;
+       float simplify_particles_render;
        float simplify_aosss;
 
        /* cineon */
@@ -608,6 +690,12 @@ typedef struct RenderData {
 
        int preview_start_resolution;
        int pad;
+
+       /* MultiView */
+       ListBase views;
+       short actview;
+       short views_format;
+       short pad8[2];
 } RenderData;
 
 /* *************************************************************** */
@@ -710,7 +798,12 @@ typedef struct GameData {
        short obstacleSimulation;
        short raster_storage;
        float levelHeight;
-       float deactivationtime, lineardeactthreshold, angulardeactthreshold, pad2;
+       float deactivationtime, lineardeactthreshold, angulardeactthreshold;
+
+       /* Scene LoD */
+       short lodflag, pad2;
+       int scehysteresis, pad5;
+
 } GameData;
 
 #define STEREO_NOSTEREO                1
@@ -783,6 +876,9 @@ enum {
 #pragma GCC poison GAME_MAT_TEXFACE
 #endif
 
+/* GameData.lodflag */
+#define SCE_LOD_USE_HYST               (1 << 0)
+
 /* UV Paint */
 #define UV_SCULPT_LOCK_BORDERS                         1
 #define UV_SCULPT_ALL_ISLANDS                          2
@@ -794,6 +890,19 @@ enum {
 #define UV_SCULPT_TOOL_RELAX_LAPLACIAN 1
 #define UV_SCULPT_TOOL_RELAX_HC                        2
 
+/* Stereo Flags */
+#define STEREO_RIGHT_NAME "right"
+#define STEREO_LEFT_NAME "left"
+#define STEREO_RIGHT_SUFFIX "_R"
+#define STEREO_LEFT_SUFFIX "_L"
+
+typedef enum StereoViews {
+       STEREO_LEFT_ID = 0,
+       STEREO_RIGHT_ID = 1,
+       STEREO_3D_ID = 2,
+       STEREO_MONO_ID = 3,
+} StereoViews;
+
 /* Markers */
 
 typedef struct TimeMarker {    
@@ -813,6 +922,7 @@ typedef struct TimeMarker {
 typedef struct Paint {
        struct Brush *brush;
        struct Palette *palette;
+       struct CurveMapping *cavity_curve; /* cavity curve */
 
        /* WM Paint cursor */
        void *paint_cursor;
@@ -849,7 +959,7 @@ typedef struct ImagePaintSettings {
        struct Image *clone;       /* clone layer for image mode for projective texture painting */
        struct Image *canvas;      /* canvas when the explicit system is used for painting */
        float stencil_col[3];
-       float pad1;
+       float dither;              /* dither amount used when painting on byte images */
 } ImagePaintSettings;
 
 /* ------------------------------------------- */
@@ -882,6 +992,7 @@ typedef struct ParticleEditSettings {
 
        struct Scene *scene;
        struct Object *object;
+       struct Object *shape_object;
 } ParticleEditSettings;
 
 /* ------------------------------------------- */
@@ -910,6 +1021,8 @@ typedef struct Sculpt {
 
        /* scale for constant detail size */
        float constant_detail;
+       float detail_percent;
+       float pad;
 
        struct Object *gravity_object;
        void *pad2;
@@ -1160,7 +1273,11 @@ typedef struct ToolSettings {
        short snap_flag, snap_target;
        short proportional, prop_mode;
        char proportional_objects; /* proportional edit, object mode */
-       char proportional_mask; /* proportional edit, object mode */
+       char proportional_mask; /* proportional edit, mask editing */
+       char proportional_action; /* proportional edit, action editor */
+       char proportional_fcurve; /* proportional edit, graph editor */
+       char lock_markers; /* lock marker editing */
+       char pad4[5];
 
        char auto_normalize; /*auto normalizing mode in wpaint*/
        char multipaint; /* paint multiple bones in wpaint */
@@ -1216,6 +1333,21 @@ typedef struct PhysicsSettings {
        int flag, quick_cache_step, rt;
 } PhysicsSettings;
 
+/* ------------------------------------------- */
+/* Safe Area options used in Camera View & VSE
+ */
+typedef struct DisplaySafeAreas {
+       /* each value represents the (x,y) margins as a multiplier.
+        * 'center' in this context is just the name for a different kind of safe-area */
+
+       float title[2];         /* Title Safe */
+       float action[2];        /* Image/Graphics Safe */
+
+       /* use for alternate aspect ratio */
+       float title_center[2];
+       float action_center[2];
+} DisplaySafeAreas;
+
 /* *************************************************************** */
 /* Scene ID-Block */
 
@@ -1251,6 +1383,7 @@ typedef struct Scene {
        
        struct ToolSettings *toolsettings;              /* default allocated now */
        struct SceneStats *stats;                               /* default allocated now */
+       struct DisplaySafeAreas safe_areas;
 
        /* migrate or replace? depends on some internal things... */
        /* no, is on the right place (ton) */
@@ -1268,6 +1401,7 @@ typedef struct Scene {
        void *fps_info;                                 /* (runtime) info/cache used for presenting playback framerate info to the user */
        
        /* none of the dependency graph  vars is mean to be saved */
+       struct Depsgraph *depsgraph;
        struct  DagForest *theDag;
        short dagflags;
        short recalc;                           /* recalc = counterpart of ob->recalc */
@@ -1406,6 +1540,7 @@ typedef struct Scene {
 #define R_TEXNODE_PREVIEW      0x40000
 #define R_VIEWPORT_PREVIEW     0x80000
 #define R_EXR_CACHE_FILE       0x100000
+#define R_MULTIVIEW                    0x200000
 
 /* r->stamp */
 #define R_STAMP_TIME   0x0001
@@ -1608,7 +1743,8 @@ extern const char *RE_engine_id_CYCLES;
 #define PROP_LIN               4
 #define PROP_CONST             5
 #define PROP_RANDOM            6
-#define PROP_MODE_MAX          7
+#define PROP_INVSQUARE         7
+#define PROP_MODE_MAX          8
 
 /* toolsettings->proportional */
 #define PROP_EDIT_OFF                  0
@@ -1675,7 +1811,8 @@ enum {
 typedef enum {
        PAINT_SHOW_BRUSH = (1 << 0),
        PAINT_FAST_NAVIGATE = (1 << 1),
-       PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2)
+       PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2),
+       PAINT_USE_CAVITY_MASK = (1 << 3)
 } PaintFlags;
 
 /* Paint.symmetry_flags
@@ -1717,7 +1854,8 @@ typedef enum SculptFlags {
        SCULPT_DYNTOPO_COLLAPSE = (1 << 11),
 
        /* If set, dynamic-topology detail size will be constant in object space */
-       SCULPT_DYNTOPO_DETAIL_CONSTANT = (1 << 13)
+       SCULPT_DYNTOPO_DETAIL_CONSTANT = (1 << 13),
+       SCULPT_DYNTOPO_DETAIL_BRUSH = (1 << 14),
 } SculptFlags;
 
 typedef enum ImagePaintMode {
@@ -1736,12 +1874,13 @@ typedef enum ImagePaintMode {
 // #define IMAGEPAINT_DRAW_TOOL_DRAWING        4 // deprecated
 
 /* projection painting only */
-#define IMAGEPAINT_PROJECT_XRAY                        16
-#define IMAGEPAINT_PROJECT_BACKFACE            32
-#define IMAGEPAINT_PROJECT_FLAT                        64
-#define IMAGEPAINT_PROJECT_LAYER_CLONE 128
-#define IMAGEPAINT_PROJECT_LAYER_STENCIL       256
-#define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV   512
+#define IMAGEPAINT_PROJECT_XRAY                        (1 << 4)
+#define IMAGEPAINT_PROJECT_BACKFACE            (1 << 5)
+#define IMAGEPAINT_PROJECT_FLAT                        (1 << 6)
+#define IMAGEPAINT_PROJECT_LAYER_CLONE (1 << 7)
+#define IMAGEPAINT_PROJECT_LAYER_STENCIL       (1 << 8)
+#define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV   (1 << 9)
+
 
 #define IMAGEPAINT_MISSING_UVS       (1 << 0)
 #define IMAGEPAINT_MISSING_MATERIAL  (1 << 1)