diff options
Diffstat (limited to 'source/blender/makesdna/DNA_scene_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 157 |
1 files changed, 77 insertions, 80 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 6535124a1be..0dc640adb29 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -47,6 +47,8 @@ extern "C" { #include "DNA_ID.h" #include "DNA_freestyle_types.h" #include "DNA_gpu_types.h" +#include "DNA_layer_types.h" +#include "DNA_material_types.h" #include "DNA_userdef_types.h" struct CurveMapping; @@ -65,19 +67,11 @@ struct bGPdata; struct bGPDbrush; struct MovieClip; struct ColorSpace; +struct SceneCollection; /* ************************************************************* */ /* Scene Data */ -/* Base - Wrapper for referencing Objects in a Scene */ -typedef struct Base { - struct Base *next, *prev; - unsigned int lay, selcol; - int flag; - short sx, sy; - struct Object *object; -} Base; - /* ************************************************************* */ /* Output Format Data */ @@ -178,25 +172,24 @@ typedef struct AudioData { typedef struct SceneRenderLayer { struct SceneRenderLayer *next, *prev; - char name[64]; /* MAX_NAME */ + char name[64] DNA_DEPRECATED; /* MAX_NAME */ - struct Material *mat_override; - struct Group *light_override; + struct Material *mat_override DNA_DEPRECATED; /* Converted to ViewLayer override. */ - unsigned int lay; /* scene->lay itself has priority over this */ - unsigned int lay_zmask; /* has to be after lay, this is for Z-masking */ - unsigned int lay_exclude; /* not used by internal, exclude */ - int layflag; + unsigned int lay DNA_DEPRECATED; /* Converted to LayerCollection cycles camera visibility override. */ + unsigned int lay_zmask DNA_DEPRECATED; /* Converted to LayerCollection cycles holdout override. */ + unsigned int lay_exclude DNA_DEPRECATED; + int layflag DNA_DEPRECATED; /* Converted to ViewLayer layflag and flag. */ - int passflag; /* pass_xor has to be after passflag */ - int pass_xor; + int passflag DNA_DEPRECATED; /* pass_xor has to be after passflag */ + int pass_xor DNA_DEPRECATED; /* Converted to ViewLayer passflag and flag. */ - int samples; - float pass_alpha_threshold; + int samples DNA_DEPRECATED; /* Converted to ViewLayer override. */ + float pass_alpha_threshold DNA_DEPRECATED; /* Converted to ViewLayer pass_alpha_threshold. */ - IDProperty *prop; + IDProperty *prop DNA_DEPRECATED; /* Converted to ViewLayer id_properties. */ - struct FreestyleConfig freestyleConfig; + struct FreestyleConfig freestyleConfig DNA_DEPRECATED; /* Converted to ViewLayer freestyleConfig. */ } SceneRenderLayer; /* srl->layflag */ @@ -542,6 +535,12 @@ typedef enum eBakePassFilter { #define R_BAKE_PASS_FILTER_ALL (~0) +/* RenderEngineSettingsClay.options */ +typedef enum ClayFlagSettings { + CLAY_USE_AO = (1 << 0), + CLAY_USE_HSV = (1 << 1), +} ClayFlagSettings; + /* *************************************************************** */ /* Render Data */ @@ -663,8 +662,8 @@ typedef struct RenderData { rcti disprect; /* information on different layers to be rendered */ - ListBase layers; - short actlay; + ListBase layers DNA_DEPRECATED; /* Converted to Scene->view_layers. */ + short actlay DNA_DEPRECATED; /* Converted to Scene->active_layer. */ /* number of mblur samples */ short mblur_samples; @@ -746,7 +745,7 @@ typedef struct RenderData { float unit_line_thickness; /* in pixels */ /* render engine */ - char engine[32]; + char engine[32] DNA_DEPRECATED; // XXX deprecated since 2.8 /* Cycles baking */ struct BakeData bake; @@ -770,6 +769,12 @@ typedef struct RenderData { } RenderData; /* *************************************************************** */ +/* Settings related to viewport drawing/render, only settings used by WorkSpace and Scene. */ +typedef struct ViewRender { + char engine_id[32]; +} ViewRender; + +/* *************************************************************** */ /* Render Conversion/Simplfication Settings */ /* control render convert and shading engine */ @@ -880,7 +885,6 @@ typedef struct GameData { /* Scene LoD */ short lodflag, pad2; int scehysteresis, pad5; - } GameData; #define STEREO_NOSTEREO 1 @@ -923,7 +927,7 @@ typedef struct GameData { #define GAME_SHOW_DEBUG_PROPS (1 << 2) #define GAME_SHOW_FRAMERATE (1 << 3) #define GAME_SHOW_PHYSICS (1 << 4) -#define GAME_DISPLAY_LISTS (1 << 5) +// #define GAME_DISPLAY_LISTS (1 << 5) /* deprecated */ #define GAME_GLSL_NO_LIGHTS (1 << 6) #define GAME_GLSL_NO_SHADERS (1 << 7) #define GAME_GLSL_NO_SHADOWS (1 << 8) @@ -1071,6 +1075,7 @@ typedef struct ParticleEditSettings { int draw_step, fade_frames; struct Scene *scene; + struct ViewLayer *view_layer; struct Object *object; struct Object *shape_object; } ParticleEditSettings; @@ -1246,17 +1251,6 @@ typedef enum eGP_Interpolate_Type { GP_IPO_SINE = 12, } eGP_Interpolate_Type; - -/* *************************************************************** */ -/* Transform Orientations */ - -typedef struct TransformOrientation { - struct TransformOrientation *next, *prev; - char name[64]; /* MAX_NAME */ - float mat[3][3]; - int pad; -} TransformOrientation; - /* *************************************************************** */ /* Unified Paint Settings */ @@ -1616,8 +1610,8 @@ typedef struct Scene { struct Scene *set; - ListBase base; - struct Base *basact; /* active base */ + ListBase base DNA_DEPRECATED; + struct Base *basact DNA_DEPRECATED; /* active base */ struct Object *obedit; /* name replaces old G.obedit */ float cursor[3]; /* 3d cursor location */ @@ -1637,17 +1631,17 @@ typedef struct Scene { struct Editing *ed; /* sequence editor data is allocated here */ struct ToolSettings *toolsettings; /* default allocated now */ - struct SceneStats *stats; /* default allocated now */ + void *pad2; struct DisplaySafeAreas safe_areas; /* migrate or replace? depends on some internal things... */ /* no, is on the right place (ton) */ struct RenderData r; struct AudioData audio; - + ListBase markers; - ListBase transform_spaces; - + ListBase transform_spaces DNA_DEPRECATED; + void *sound_scene; void *playback_handle; void *sound_scrub_handle; @@ -1656,11 +1650,8 @@ 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; - void *pad1; - struct DagForest *theDag; - short dagflags; - short pad3; + struct GHash *depsgraph_hash; + int pad7; /* User-Defined KeyingSets */ int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */ @@ -1685,6 +1676,7 @@ typedef struct Scene { uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by BKE_object_handle_update() */ uint64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */ + /* Color Management */ ColorManagedViewSettings view_settings; ColorManagedDisplaySettings display_settings; @@ -1694,6 +1686,18 @@ typedef struct Scene { struct RigidBodyWorld *rigidbody_world; struct PreviewImage *preview; + + ListBase view_layers; + struct SceneCollection *collection; + int active_view_layer; + int pad4; + + IDProperty *collection_properties; /* settings to be overriden by layer collections */ + IDProperty *layer_properties; /* settings to be override by workspaces */ + + int pad5[2]; + + ViewRender view_render; } Scene; /* **************** RENDERDATA ********************* */ @@ -1885,6 +1889,8 @@ enum { /* scene->r.engine (scene.c) */ extern const char *RE_engine_id_BLENDER_RENDER; extern const char *RE_engine_id_BLENDER_GAME; +extern const char *RE_engine_id_BLENDER_CLAY; +extern const char *RE_engine_id_BLENDER_EEVEE; extern const char *RE_engine_id_CYCLES; /* **************** SCENE ********************* */ @@ -1903,39 +1909,30 @@ extern const char *RE_engine_id_CYCLES; #define MINAFRAME -1048574 #define MINAFRAMEF -1048574.0f -/* depricate this! */ -#define TESTBASE(v3d, base) ( \ - ((base)->flag & SELECT) && \ - ((base)->lay & v3d->lay) && \ - (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0)) -#define TESTBASELIB(v3d, base) ( \ - ((base)->flag & SELECT) && \ - ((base)->lay & v3d->lay) && \ +/* deprecate this! */ +#define TESTBASE(base) ( \ + (((base)->flag & BASE_SELECTED) != 0) && \ + (((base)->flag & BASE_VISIBLED) != 0)) +#define TESTBASELIB(base) ( \ + (((base)->flag & BASE_SELECTED) != 0) && \ ((base)->object->id.lib == NULL) && \ - (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0)) -#define TESTBASELIB_BGMODE(v3d, scene, base) ( \ - ((base)->flag & SELECT) && \ - ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \ + (((base)->flag & BASE_VISIBLED) != 0)) +#define TESTBASELIB_BGMODE(base) ( \ + (((base)->flag & BASE_SELECTED) != 0) && \ ((base)->object->id.lib == NULL) && \ - (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0)) -#define BASE_EDITABLE_BGMODE(v3d, scene, base) ( \ - ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \ + (((base)->flag & BASE_VISIBLED) != 0)) +#define BASE_EDITABLE_BGMODE(base) ( \ ((base)->object->id.lib == NULL) && \ - (((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0)) -#define BASE_SELECTABLE(v3d, base) ( \ - (base->lay & v3d->lay) && \ - (base->object->restrictflag & (OB_RESTRICT_SELECT | OB_RESTRICT_VIEW)) == 0) -#define BASE_VISIBLE(v3d, base) ( \ - (base->lay & v3d->lay) && \ - (base->object->restrictflag & OB_RESTRICT_VIEW) == 0) -#define BASE_VISIBLE_BGMODE(v3d, scene, base) ( \ - (base->lay & (v3d ? v3d->lay : scene->lay)) && \ - (base->object->restrictflag & OB_RESTRICT_VIEW) == 0) - -#define FIRSTBASE scene->base.first -#define LASTBASE scene->base.last -#define BASACT (scene->basact) -#define OBACT (BASACT ? BASACT->object: NULL) + (((base)->flag & BASE_VISIBLED) != 0)) +#define BASE_SELECTABLE(base) \ + (((base)->flag & BASE_SELECTABLED) != 0) +#define BASE_VISIBLE(base) ( \ + ((base)->flag & BASE_VISIBLED) != 0) + +#define FIRSTBASE(_view_layer) ((_view_layer)->object_bases.first) +#define LASTBASE(_view_layer) ((_view_layer)->object_bases.last) +#define BASACT(_view_layer) ((_view_layer)->basact) +#define OBACT(_view_layer) (BASACT(_view_layer) ? BASACT(_view_layer)->object: NULL) #define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL) #define V3D_CAMERA_SCENE(scene, v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera) @@ -1951,7 +1948,7 @@ extern const char *RE_engine_id_CYCLES; #define TIME2FRA(a) ((((double) scene->r.frs_sec) * (double)(a)) / (double)scene->r.frs_sec_base) #define FPS (((double) scene->r.frs_sec) / (double)scene->r.frs_sec_base) -/* base->flag is in DNA_object_types.h */ +/* base->legacy_flag is in DNA_object_types.h */ /* toolsettings->snap_flag */ #define SCE_SNAP 1 |