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:
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h155
-rw-r--r--source/blender/makesdna/DNA_action_types.h41
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h583
-rw-r--r--source/blender/makesdna/DNA_anim_types.h9
-rw-r--r--source/blender/makesdna/DNA_armature_types.h2
-rw-r--r--source/blender/makesdna/DNA_camera_types.h57
-rw-r--r--source/blender/makesdna/DNA_cloth_types.h2
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h8
-rw-r--r--source/blender/makesdna/DNA_controller_types.h95
-rw-r--r--source/blender/makesdna/DNA_curve_types.h1
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h8
-rw-r--r--source/blender/makesdna/DNA_defs.h6
-rw-r--r--source/blender/makesdna/DNA_dynamicpaint_types.h5
-rw-r--r--source/blender/makesdna/DNA_effect_types.h4
-rw-r--r--source/blender/makesdna/DNA_fileglobal_types.h6
-rw-r--r--source/blender/makesdna/DNA_freestyle_types.h4
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h5
-rw-r--r--source/blender/makesdna/DNA_gpu_types.h2
-rw-r--r--source/blender/makesdna/DNA_group_types.h55
-rw-r--r--source/blender/makesdna/DNA_image_types.h27
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h124
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h1
-rw-r--r--source/blender/makesdna/DNA_layer_types.h140
-rw-r--r--source/blender/makesdna/DNA_lightprobe_types.h113
-rw-r--r--source/blender/makesdna/DNA_material_types.h376
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h49
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h76
-rw-r--r--source/blender/makesdna/DNA_meta_types.h3
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h27
-rw-r--r--source/blender/makesdna/DNA_node_types.h10
-rw-r--r--source/blender/makesdna/DNA_object_enums.h3
-rw-r--r--source/blender/makesdna/DNA_object_force_types.h63
-rw-r--r--source/blender/makesdna/DNA_object_types.h233
-rw-r--r--source/blender/makesdna/DNA_outliner_types.h22
-rw-r--r--source/blender/makesdna/DNA_particle_types.h36
-rw-r--r--source/blender/makesdna/DNA_property_types.h65
-rw-r--r--source/blender/makesdna/DNA_rigidbody_types.h6
-rw-r--r--source/blender/makesdna/DNA_scene_types.h652
-rw-r--r--source/blender/makesdna/DNA_screen_types.h129
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h334
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h6
-rw-r--r--source/blender/makesdna/DNA_space_types.h237
-rw-r--r--source/blender/makesdna/DNA_texture_types.h132
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h79
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h5
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h217
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h37
-rw-r--r--source/blender/makesdna/DNA_workspace_types.h207
-rw-r--r--source/blender/makesdna/DNA_world_types.h119
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c91
-rw-r--r--source/blender/makesdna/intern/makesdna.c27
51 files changed, 1876 insertions, 2818 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 80640d8dffe..4d59a7c9669 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -96,14 +96,104 @@ enum {
IDP_STRING_SUB_BYTE = 1, /* arbitrary byte array, _not_ null terminated */
};
+/* IDP_GROUP */
+enum {
+ IDP_GROUP_SUB_NONE = 0, /* default */
+ IDP_GROUP_SUB_MODE_OBJECT = 1, /* object mode settings */
+ IDP_GROUP_SUB_MODE_EDIT = 2, /* mesh edit mode settings */
+ IDP_GROUP_SUB_ENGINE_RENDER = 3, /* render engine settings */
+ IDP_GROUP_SUB_OVERRIDE = 4, /* data override */
+ IDP_GROUP_SUB_MODE_PAINT_WEIGHT = 5, /* weight paint mode settings */
+ IDP_GROUP_SUB_MODE_PAINT_VERTEX = 6, /* vertex paint mode settings */
+};
+
/*->flag*/
enum {
+ /* This IDProp may be statically overridden. Should only be used/be relevant for custom properties. */
+ IDP_FLAG_OVERRIDABLE_STATIC = 1 << 0,
+
IDP_FLAG_GHOST = 1 << 7, /* this means the property is set but RNA will return false when checking
* 'RNA_property_is_set', currently this is a runtime flag */
};
/* add any future new id property types here.*/
+
+/* Static ID override structs. */
+
+typedef struct IDOverrideStaticPropertyOperation {
+ struct IDOverrideStaticPropertyOperation *next, *prev;
+
+ /* Type of override. */
+ short operation;
+ short flag;
+ short pad_s1[2];
+
+ /* Sub-item references, if needed (for arrays or collections only).
+ * We need both reference and local values to allow e.g. insertion into collections (constraints, modifiers...).
+ * In collection case, if names are defined, they are used in priority.
+ * Names are pointers (instead of char[64]) to save some space, NULL when unset.
+ * Indices are -1 when unset. */
+ char *subitem_reference_name;
+ char *subitem_local_name;
+ int subitem_reference_index;
+ int subitem_local_index;
+} IDOverrideStaticPropertyOperation;
+
+/* IDOverridePropertyOperation->operation. */
+enum {
+ /* Basic operations. */
+ IDOVERRIDESTATIC_OP_NOOP = 0, /* Special value, forbids any overriding. */
+
+ IDOVERRIDESTATIC_OP_REPLACE = 1, /* Fully replace local value by reference one. */
+
+ /* Numeric-only operations. */
+ IDOVERRIDESTATIC_OP_ADD = 101, /* Add local value to reference one. */
+ /* Subtract local value from reference one (needed due to unsigned values etc.). */
+ IDOVERRIDESTATIC_OP_SUBTRACT = 102,
+ /* Multiply reference value by local one (more useful than diff for scales and the like). */
+ IDOVERRIDESTATIC_OP_MULTIPLY = 103,
+
+ /* Collection-only operations. */
+ IDOVERRIDESTATIC_OP_INSERT_AFTER = 201, /* Insert after given reference's subitem. */
+ IDOVERRIDESTATIC_OP_INSERT_BEFORE = 202, /* Insert before given reference's subitem. */
+ /* We can add more if needed (move, delete, ...). */
+};
+
+/* IDOverridePropertyOperation->flag. */
+enum {
+ IDOVERRIDESTATIC_FLAG_MANDATORY = 1 << 0, /* User cannot remove that override operation. */
+ IDOVERRIDESTATIC_FLAG_LOCKED = 1 << 1, /* User cannot change that override operation. */
+};
+
+/* A single overriden property, contain all operations on this one. */
+typedef struct IDOverrideStaticProperty {
+ struct IDOverrideStaticProperty *next, *prev;
+
+ /* Path from ID to overridden property. *Does not* include indices/names for final arrays/collections items. */
+ char *rna_path;
+
+ ListBase operations; /* List of overriding operations (IDOverridePropertyOperation) applied to this property. */
+} IDOverrideStaticProperty;
+
+/* Main container for all overriding data info of a data-block. */
+typedef struct IDOverrideStatic {
+ struct ID *reference; /* Reference linked ID which this one overrides. */
+ ListBase properties; /* List of IDOverrideProperty structs. */
+
+ short flag;
+ short pad[3];
+
+ /* Read/write data. */
+ /* Temp ID storing extra override data (used for differential operations only currently).
+ * Always NULL outside of read/write context. */
+ struct ID *storage;
+} IDOverrideStatic;
+
+enum eStaticOverride_Flag {
+ STATICOVERRIDE_AUTO = 1 << 0, /* Allow automatic generation of overriding rules. */
+};
+
/* watch it: Sequence has identical beginning. */
/**
* ID is the first thing included in all serializable types. It
@@ -134,6 +224,13 @@ typedef struct ID {
int pad;
IDProperty *properties;
+ IDOverrideStatic *override_static; /* Reference linked ID which this one overrides. */
+
+ /* Only set for datablocks which are coming from copy-on-write, points to
+ * the original version of it.
+ */
+ void *orig_id;
+
void *py_instance;
} ID;
@@ -257,6 +354,8 @@ typedef enum ID_Type {
ID_PAL = MAKE_ID2('P', 'L'), /* Palette */
ID_PC = MAKE_ID2('P', 'C'), /* PaintCurve */
ID_CF = MAKE_ID2('C', 'F'), /* CacheFile */
+ ID_WS = MAKE_ID2('W', 'S'), /* WorkSpace */
+ ID_LP = MAKE_ID2('L', 'P'), /* LightProbe */
} ID_Type;
/* Only used as 'placeholder' in .blend files for directly linked datablocks. */
@@ -280,7 +379,7 @@ typedef enum ID_Type {
#define ID_REAL_USERS(id) (((ID *)id)->us - ID_FAKE_USERS(id))
#define ID_EXTRA_USERS(id) (((ID *)id)->tag & LIB_TAG_EXTRAUSER ? 1 : 0)
-#define ID_CHECK_UNDO(id) ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM))
+#define ID_CHECK_UNDO(id) ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM) && (GS((id)->name) != ID_WS))
#define ID_BLEND_PATH(_bmain, _id) ((_id)->lib ? (_id)->lib->filepath : (_bmain)->name)
@@ -288,6 +387,20 @@ typedef enum ID_Type {
#define ID_IS_LINKED(_id) (((ID *)(_id))->lib != NULL)
+#define ID_IS_STATIC_OVERRIDE(_id) (((ID *)(_id))->override_static != NULL && \
+ ((ID *)(_id))->override_static->reference != NULL)
+
+#define ID_IS_STATIC_OVERRIDE_TEMPLATE(_id) (((ID *)(_id))->override_static != NULL && \
+ ((ID *)(_id))->override_static->reference == NULL)
+
+#define ID_IS_STATIC_OVERRIDE_AUTO(_id) (!ID_IS_LINKED((_id)) && \
+ ID_IS_STATIC_OVERRIDE((_id)) && \
+ (((ID *)(_id))->override_static->flag & STATICOVERRIDE_AUTO))
+
+/* No copy-on-write for these types. */
+#define ID_TYPE_IS_COW(_id_type) \
+ (!ELEM(_id_type, ID_WM, ID_SCR, ID_SCRN, ID_IM, ID_MC, ID_LI))
+
#ifdef GS
# undef GS
#endif
@@ -299,7 +412,7 @@ typedef enum ID_Type {
/* id->flag (persitent). */
enum {
- LIB_FAKEUSER = 1 << 9,
+ LIB_FAKEUSER = 1 << 9,
};
/**
@@ -334,6 +447,11 @@ enum {
/* RESET_NEVER tag datablock as a place-holder (because the real one could not be linked from its library e.g.). */
LIB_TAG_MISSING = 1 << 6,
+ /* RESET_NEVER tag datablock as being up-to-date regarding its reference. */
+ LIB_TAG_OVERRIDESTATIC_REFOK = 1 << 9,
+ /* RESET_NEVER tag datablock as needing an auto-override execution, if enabled. */
+ LIB_TAG_OVERRIDESTATIC_AUTOREFRESH = 1 << 17,
+
/* tag datablock has having an extra user. */
LIB_TAG_EXTRAUSER = 1 << 2,
/* tag datablock has having actually increased usercount for the extra virtual user. */
@@ -348,21 +466,36 @@ enum {
/* RESET_AFTER_USE tag existing data before linking so we know what is new. */
LIB_TAG_PRE_EXISTING = 1 << 11,
+ /* The datablock is a copy-on-write/localized version. */
+ LIB_TAG_COPY_ON_WRITE = 1 << 12,
+ LIB_TAG_COPY_ON_WRITE_EVAL = 1 << 13,
+ LIB_TAG_LOCALIZED = 1 << 14,
+
/* RESET_NEVER tag datablock for freeing etc. behavior (usually set when copying real one into temp/runtime one). */
- LIB_TAG_NO_MAIN = 1 << 12, /* Datablock is not listed in Main database. */
- LIB_TAG_NO_USER_REFCOUNT = 1 << 13, /* Datablock does not refcount usages of other IDs. */
+ LIB_TAG_NO_MAIN = 1 << 15, /* Datablock is not listed in Main database. */
+ LIB_TAG_NO_USER_REFCOUNT = 1 << 16, /* Datablock does not refcount usages of other IDs. */
/* Datablock was not allocated by standard system (BKE_libblock_alloc), do not free its memory
* (usual type-specific freeing is called though). */
- LIB_TAG_NOT_ALLOCATED = 1 << 14,
+ LIB_TAG_NOT_ALLOCATED = 1 << 17,
};
+/* WARNING - when adding flags check on PSYS_RECALC */
enum {
/* RESET_AFTER_USE, used by update code (depsgraph). */
ID_RECALC_NONE = 0,
+ /* Generic recalc flag, when nothing else matches. */
ID_RECALC = 1 << 0,
- ID_RECALC_DATA = 1 << 1,
- ID_RECALC_SKIP_ANIM_TAG = 1 << 2,
- ID_RECALC_ALL = (ID_RECALC | ID_RECALC_DATA),
+ /* Per-component update flags. */
+ ID_RECALC_ANIMATION = 1 << 1,
+ ID_RECALC_DRAW = 1 << 2,
+ ID_RECALC_DRAW_CACHE = 1 << 3,
+ ID_RECALC_GEOMETRY = 1 << 4,
+ ID_RECALC_TRANSFORM = 1 << 5,
+ ID_RECALC_COLLECTIONS = 1 << 6,
+ ID_RECALC_COPY_ON_WRITE = 1 << 7,
+ ID_RECALC_TIME = 1 << 8,
+ /* Special flag to check if SOMETHING was changed. */
+ ID_RECALC_ALL = (~(int)0),
};
/* To filter ID types (filter_id) */
@@ -400,9 +533,11 @@ enum {
FILTER_ID_WO = (1 << 26),
FILTER_ID_PA = (1 << 27),
FILTER_ID_CF = (1 << 28),
+ FILTER_ID_WS = (1 << 29),
+ FILTER_ID_LP = (1u << 31),
};
-/* IMPORTANT: this enum matches the order currently use in set_lisbasepointers,
+/* IMPORTANT: this enum matches the order currently use in set_listbasepointers,
* keep them in sync! */
enum {
INDEX_ID_LI = 0,
@@ -431,12 +566,14 @@ enum {
INDEX_ID_BR,
INDEX_ID_PA,
INDEX_ID_SPK,
+ INDEX_ID_LP,
INDEX_ID_WO,
INDEX_ID_MC,
INDEX_ID_SCR,
INDEX_ID_OB,
INDEX_ID_LS,
INDEX_ID_SCE,
+ INDEX_ID_WS,
INDEX_ID_WM,
INDEX_ID_MSK,
INDEX_ID_NULL,
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 1691038e13c..2e73f5754d3 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -43,7 +43,7 @@
struct SpaceLink;
struct Object;
-struct Group;
+struct Collection;
struct GHash;
/* ************************************************ */
@@ -180,6 +180,18 @@ typedef enum eMotionPaths_BakeFlag {
MOTIONPATH_BAKE_HAS_PATHS = (1 << 2)
} eMotionPath_BakeFlag;
+/* runtime */
+#
+#
+typedef struct bPoseChannelDrawData {
+ float solid_color[4];
+ float wire_color[4];
+
+ int bbone_matrix_len;
+ /* keep last */
+ float bbone_matrix[0][4][4];
+} bPoseChannelDrawData;
+
/* ************************************************ */
/* Poses */
@@ -238,6 +250,8 @@ typedef struct bPoseChannel {
float chan_mat[4][4]; /* matrix result of loc/quat/size, and where we put deform in, see next line */
float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat
* this matrix is object space */
+ float disp_mat[4][4]; /* for display, pose_mat with bone length applied */
+ float disp_tail_mat[4][4]; /* for display, pose_mat with bone length applied and translated to tail*/
float constinv[4][4]; /* inverse result of constraints.
* doesn't include effect of restposition, parent, and local transform*/
@@ -259,8 +273,10 @@ typedef struct bPoseChannel {
struct bPoseChannel *bbone_prev; /* next/prev bones to use as handle references when calculating bbones (optional) */
struct bPoseChannel *bbone_next;
-
+
void *temp; /* use for outliner */
+ /* Runtime data for color and bbone segment matrix. */
+ bPoseChannelDrawData *draw_data;
} bPoseChannel;
@@ -418,8 +434,7 @@ typedef enum ePose_Flags {
POSE_RECALCPATHS = (1 << 4),
/* set by BKE_pose_rebuild to give a chance to the IK solver to rebuild IK tree */
POSE_WAS_REBUILT = (1 << 5),
- /* set by game_copy_pose to indicate that this pose is used in the game engine */
- POSE_GAME_ENGINE = (1 << 6),
+ POSE_FLAG_DEPRECATED = (1 << 6), /* deprecated. */
/* pose constraint flags needs to be updated */
POSE_CONSTRAINTS_NEED_UPDATE_FLAGS = (1 << 7),
} ePose_Flags;
@@ -573,7 +588,7 @@ typedef struct bDopeSheet {
ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */
ListBase chanbase; /* cache for channels (only initialized when pinned) */ // XXX not used!
- struct Group *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */
+ struct Collection *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */
char searchstr[64]; /* string to search for in displayed names of F-Curves for ADS_FILTER_BY_FCU_NAME filtering option */
int filterflag; /* flags to use for filtering data */
@@ -665,6 +680,9 @@ typedef struct SpaceAction {
char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */
short flag; /* flag: bitmapped settings; */
float timeslide; /* for Time-Slide transform mode drawing - current frame? */
+
+ int cache_display; /* (eTimeline_Cache_Flag) */
+ int pad;
} SpaceAction;
/* SpaceAction flag */
@@ -709,6 +727,8 @@ typedef enum eAnimEdit_Context {
SACTCONT_MASK = 4,
/* cache file */
SACTCONT_CACHEFILE = 5,
+ /* timeline - replacement for the standalone "timeline editor" */
+ SACTCONT_TIMELINE = 6,
} eAnimEdit_Context;
/* SpaceAction AutoSnap Settings (also used by other Animation Editors) */
@@ -727,6 +747,17 @@ typedef enum eAnimEdit_AutoSnap {
SACTSNAP_TSTEP = 5
} eAnimEdit_AutoSnap;
+/* SAction->cache_display */
+typedef enum eTimeline_Cache_Flag {
+ TIME_CACHE_DISPLAY = (1 << 0),
+ TIME_CACHE_SOFTBODY = (1 << 1),
+ TIME_CACHE_PARTICLES = (1 << 2),
+ TIME_CACHE_CLOTH = (1 << 3),
+ TIME_CACHE_SMOKE = (1 << 4),
+ TIME_CACHE_DYNAMICPAINT = (1 << 5),
+ TIME_CACHE_RIGIDBODY = (1 << 6),
+} eTimeline_Cache_Flag;
+
/* ************************************************ */
/* Legacy Data */
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
deleted file mode 100644
index 6bdea21da1e..00000000000
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file DNA_actuator_types.h
- * \ingroup DNA
- *
- * #bActuator type is specifically for use by Object logic-bricks in the game-engine.
- */
-
-#ifndef __DNA_ACTUATOR_TYPES_H__
-#define __DNA_ACTUATOR_TYPES_H__
-
-struct Object;
-struct Mesh;
-struct Scene;
-struct Group;
-struct Text;
-
-/* ****************** ACTUATORS ********************* */
-
-/* unused now, moved to editobjectactuator in 2.02. Still needed for dna */
-typedef struct bAddObjectActuator {
- int time, pad;
- struct Object *ob;
-} bAddObjectActuator;
-
-typedef struct bActionActuator {
- struct bAction *act; /* Pointer to action */
- short type, flag; /* Playback type */ // not in use
- float sta, end; /* Start & End frames */
- char name[64]; /* For property-driven playback, MAX_NAME */
- char frameProp[64]; /* Set this property to the actions current frame, MAX_NAME */
- short blendin; /* Number of frames of blending */
- short priority; /* Execution priority */
- short layer; /* Animation layer */
- short end_reset; /* Ending the actuator (negative pulse) wont reset the action to its starting frame */
- short strideaxis; /* Displacement axis */
- short blend_mode; /* Layer blending mode */
- float stridelength; /* Displacement incurred by cycle */ // not in use
- float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */
-} bActionActuator;
-
-typedef struct Sound3D {
- float min_gain;
- float max_gain;
- float reference_distance;
- float max_distance;
- float rolloff_factor;
- float cone_inner_angle;
- float cone_outer_angle;
- float cone_outer_gain;
-} Sound3D;
-
-typedef struct bSoundActuator {
- short flag, sndnr;
- int pad1, pad2;
- short pad3[2];
- float volume, pitch;
- struct bSound *sound;
- struct Sound3D sound3D;
- short type, pad4;
- short pad5, pad6[1];
-} bSoundActuator;
-
-typedef struct bEditObjectActuator {
- int time;
- short type, flag;
- struct Object *ob;
- struct Mesh *me;
- char name[64]; /* MAX_NAME */
- float linVelocity[3]; /* initial lin. velocity on creation */
- float angVelocity[3]; /* initial ang. velocity on creation */
- float mass;
- short localflag; /* flag for the lin & ang. vel: apply locally */
- short dyn_operation;
- short upflag, trackflag; /* flag for up axis and track axis */
- int pad;
-} bEditObjectActuator;
-
-typedef struct bSceneActuator {
- short type, pad1;
- int pad;
- struct Scene *scene;
- struct Object *camera;
-} bSceneActuator;
-
-typedef struct bPropertyActuator {
- int pad, type;
- char name[64], value[64]; /* MAX_NAME */
- struct Object *ob;
-} bPropertyActuator;
-
-typedef struct bObjectActuator {
- short flag, type, otype;
- short damping;
- float forceloc[3], forcerot[3];
- float pad[3], pad1[3];
- float dloc[3], drot[3]; /* angle in radians */
- float linearvelocity[3], angularvelocity[3];
- struct Object *reference;
-} bObjectActuator;
-
-/* deprecated, handled by bActionActuator now */
-typedef struct bIpoActuator {
- short flag, type;
- float sta, end;
- char name[64]; /* MAX_NAME */
- char frameProp[64]; /* Set this property to the actions current frame, MAX_NAME */
-
- short pad1, pad2, pad3, pad4;
-
-} bIpoActuator;
-
-typedef struct bCameraActuator {
- struct Object *ob;
- float height, min, max;
- float damping;
- short pad1, axis;
- float pad2;
-} bCameraActuator;
-
-typedef struct bConstraintActuator {
- short type, mode;
- short flag, damp;
- short time, rotdamp;
- int pad;
- float minloc[3], maxloc[3];
- float minrot[3], maxrot[3];
- char matprop[64]; /* MAX_NAME */
-} bConstraintActuator;
-
-typedef struct bGroupActuator {
- short flag, type;
- int sta, end;
- char name[64]; /* property or groupkey, MAX_NAME */
-
- short pad[3], cur, butsta, butend;/* not referenced, can remove? */
- /* struct Group *group; not used, remove */
-
-} bGroupActuator;
-
-/* I added a few extra fields here, to facilitate conversions */
-typedef struct bRandomActuator {
- int seed;
- int distribution;
- int int_arg_1;
- int int_arg_2;
- float float_arg_1;
- float float_arg_2;
- char propname[64]; /* MAX_NAME */
-} bRandomActuator;
-
-typedef struct bMessageActuator {
- char toPropName[64]; /* Send to all objects with this propertyname. Empty to broadcast. MAX_NAME. */
- struct Object *toObject;/* (Possible future use) pointer to a single destination object. */
- char subject[64]; /* Message Subject to send. MAX_NAME. */
- short bodyType, pad1; /* bodyType is either 'User defined text' or PropName */
- int pad2;
- char body[64]; /* Either User Defined Text or our PropName to send value of, MAX_NAME */
-} bMessageActuator;
-
-typedef struct bGameActuator {
- short flag, type;
- int sta, end;
- char filename[64];
- char loadaniname[64];
-} bGameActuator;
-
-typedef struct bVisibilityActuator {
- /** bit 0: Is this object visible?
- ** bit 1: Apply recursively
- ** bit 2: Is this object an occluder? */
- int flag;
-} bVisibilityActuator;
-
-typedef struct bTwoDFilterActuator {
- char pad[4];
- /* Tells what type of 2D Filter */
- short type;
- /* (flag == 0) means 2D filter is activate and
- * (flag != 0) means 2D filter is inactive */
- short flag;
- int int_arg;
- /* a float argument */
- float float_arg;
- struct Text *text;
-} bTwoDFilterActuator;
-
-typedef struct bParentActuator {
- char pad[2];
- short flag;
- int type;
- struct Object *ob;
-} bParentActuator;
-
-typedef struct bStateActuator {
- int type; /* 0=Set, 1=Add, 2=Rem, 3=Chg */
- unsigned int mask; /* the bits to change */
-} bStateActuator;
-
-typedef struct bArmatureActuator {
- char posechannel[64]; /* MAX_NAME */
- char constraint[64]; /* MAX_NAME */
- int type; /* 0=run, 1=enable, 2=disable, 3=set target, 4=set weight */
- float weight;
- float influence;
- float pad;
- struct Object *target;
- struct Object *subtarget;
-} bArmatureActuator;
-
-typedef struct bSteeringActuator {
- char pad[5];
- char flag;
- short facingaxis;
- int type; /* 0=seek, 1=flee, 2=path following */
- float dist;
- float velocity;
- float acceleration;
- float turnspeed;
- int updateTime;
- struct Object *target;
- struct Object *navmesh;
-} bSteeringActuator;
-
-typedef struct bMouseActuator {
- short type; /* 0=Visibility, 1=Look */
- short flag;
-
- int object_axis[2];
- float threshold[2];
- float sensitivity[2];
- float limit_x[2];
- float limit_y[2];
-} bMouseActuator;
-
-
-typedef struct bActuator {
- struct bActuator *next, *prev, *mynew;
- short type;
- /**
- * Tells what type of actuator data \ref data holds.
- */
- short flag;
- short otype, go;
- char name[64]; /* MAX_NAME */
-
- /**
- * data must point to an object actuator type struct.
- */
- void *data;
-
- /**
- * For ipo's and props: to find out which object the actuator
- * belongs to */
- struct Object *ob;
-
-} bActuator;
-
-/* objectactuator->flag */
-#define ACT_FORCE_LOCAL 1
-#define ACT_TORQUE_LOCAL 2
-#define ACT_SERVO_LIMIT_X 2
-#define ACT_DLOC_LOCAL 4
-#define ACT_SERVO_LIMIT_Y 4
-#define ACT_DROT_LOCAL 8
-#define ACT_SERVO_LIMIT_Z 8
-#define ACT_LIN_VEL_LOCAL 16
-#define ACT_ANG_VEL_LOCAL 32
-//#define ACT_ADD_LIN_VEL_LOCAL 64
-#define ACT_ADD_LIN_VEL 64
-#define ACT_ADD_CHAR_LOC 128
-#define ACT_CHAR_JUMP 256
-
-/* objectactuator->type */
-#define ACT_OBJECT_NORMAL 0
-#define ACT_OBJECT_SERVO 1
-#define ACT_OBJECT_CHARACTER 2
-
-/* actuator->type */
-#define ACT_OBJECT 0
-#define ACT_IPO 1
-#define ACT_LAMP 2
-#define ACT_CAMERA 3
-#define ACT_MATERIAL 4
-#define ACT_SOUND 5
-#define ACT_PROPERTY 6
- /* these two obsolete since 2.02 */
-#define ACT_ADD_OBJECT 7
-#define ACT_END_OBJECT 8
-
-#define ACT_CONSTRAINT 9
-#define ACT_EDIT_OBJECT 10
-#define ACT_SCENE 11
-#define ACT_GROUP 12
-#define ACT_RANDOM 13
-#define ACT_MESSAGE 14
-#define ACT_ACTION 15 /* __ NLA */
-#define ACT_GAME 17
-#define ACT_VISIBILITY 18
-#define ACT_2DFILTER 19
-#define ACT_PARENT 20
-#define ACT_SHAPEACTION 21
-#define ACT_STATE 22
-#define ACT_ARMATURE 23
-#define ACT_STEERING 24
-#define ACT_MOUSE 25
-
-/* actuator flag */
-#define ACT_SHOW 1
-#define ACT_DEL 2
-#define ACT_NEW 4
-#define ACT_LINKED 8
-#define ACT_VISIBLE 16
-#define ACT_PIN 32
-#define ACT_DEACTIVATE 64
-
-/* link codes */
-#define LINK_SENSOR 0
-#define LINK_CONTROLLER 1
-#define LINK_ACTUATOR 2
-
-/* keyboardsensor->type */
-#define SENS_ALL_KEYS 1
-
-/* actionactuator->type */
-#define ACT_ACTION_PLAY 0
-#define ACT_ACTION_PINGPONG 1
-#define ACT_ACTION_FLIPPER 2
-#define ACT_ACTION_LOOP_STOP 3
-#define ACT_ACTION_LOOP_END 4
-#define ACT_ACTION_KEY2KEY 5
-#define ACT_ACTION_FROM_PROP 6
-#define ACT_ACTION_MOTION 7
-
-/* actionactuator->blend_mode */
-#define ACT_ACTION_BLEND 0
-#define ACT_ACTION_ADD 1
-
-/* ipoactuator->type */
-/* used for conversion from 2.01 */
-#define ACT_IPO_FROM_PROP 6
-
-/* groupactuator->type */
-#define ACT_GROUP_PLAY 0
-#define ACT_GROUP_PINGPONG 1
-#define ACT_GROUP_FLIPPER 2
-#define ACT_GROUP_LOOP_STOP 3
-#define ACT_GROUP_LOOP_END 4
-#define ACT_GROUP_FROM_PROP 5
-#define ACT_GROUP_SET 6
-
-/* ipoactuator->flag */
-#define ACT_IPOFORCE (1 << 0)
-#define ACT_IPOEND (1 << 1)
-#define ACT_IPOLOCAL (1 << 2)
-#define ACT_IPOCHILD (1 << 4)
-#define ACT_IPOADD (1 << 5)
-
-/* property actuator->type */
-#define ACT_PROP_ASSIGN 0
-#define ACT_PROP_ADD 1
-#define ACT_PROP_COPY 2
-#define ACT_PROP_TOGGLE 3
-#define ACT_PROP_LEVEL 4
-
-/* constraint flag */
-#define ACT_CONST_NONE 0
-#define ACT_CONST_LOCX 1
-#define ACT_CONST_LOCY 2
-#define ACT_CONST_LOCZ 4
-#define ACT_CONST_ROTX 8
-#define ACT_CONST_ROTY 16
-#define ACT_CONST_ROTZ 32
-#define ACT_CONST_NORMAL 64
-#define ACT_CONST_MATERIAL 128
-#define ACT_CONST_PERMANENT 256
-#define ACT_CONST_DISTANCE 512
-#define ACT_CONST_LOCAL 1024
-#define ACT_CONST_DOROTFH 2048
-
-/* constraint mode */
-#define ACT_CONST_DIRPX 1
-#define ACT_CONST_DIRPY 2
-#define ACT_CONST_DIRPZ 4
-#define ACT_CONST_DIRNX 8
-#define ACT_CONST_DIRNY 16
-#define ACT_CONST_DIRNZ 32
-
-/* constraint type */
-#define ACT_CONST_TYPE_LOC 0
-#define ACT_CONST_TYPE_DIST 1
-#define ACT_CONST_TYPE_ORI 2
-#define ACT_CONST_TYPE_FH 3
-
-/* editObjectActuator->type */
-#define ACT_EDOB_ADD_OBJECT 0
-#define ACT_EDOB_END_OBJECT 1
-#define ACT_EDOB_REPLACE_MESH 2
-#define ACT_EDOB_TRACK_TO 3
-#define ACT_EDOB_DYNAMICS 4
-
-/* editObjectActuator->localflag */
-#define ACT_EDOB_LOCAL_LINV 2
-#define ACT_EDOB_LOCAL_ANGV 4
-
-/* editObjectActuator->flag */
-#define ACT_TRACK_3D 1
-
-/* editObjectActuator->upflag */
-#define ACT_TRACK_UP_X 0
-#define ACT_TRACK_UP_Y 1
-#define ACT_TRACK_UP_Z 2
-
-/* editObjectActuator->trackflag */
-#define ACT_TRACK_TRAXIS_X 0
-#define ACT_TRACK_TRAXIS_Y 1
-#define ACT_TRACK_TRAXIS_Z 2
-#define ACT_TRACK_TRAXIS_NEGX 3
-#define ACT_TRACK_TRAXIS_NEGY 4
-#define ACT_TRACK_TRAXIS_NEGZ 5
-
-/* editObjectActuator->flag for replace mesh actuator */
-#define ACT_EDOB_REPLACE_MESH_NOGFX 2 /* use for replace mesh actuator */
-#define ACT_EDOB_REPLACE_MESH_PHYS 4
-
-/* editObjectActuator->dyn_operation */
-#define ACT_EDOB_RESTORE_DYN 0
-#define ACT_EDOB_SUSPEND_DYN 1
-#define ACT_EDOB_ENABLE_RB 2
-#define ACT_EDOB_DISABLE_RB 3
-#define ACT_EDOB_SET_MASS 4
-
-
-/* SceneActuator->type */
-#define ACT_SCENE_RESTART 0
-#define ACT_SCENE_SET 1
-#define ACT_SCENE_CAMERA 2
-#define ACT_SCENE_ADD_FRONT 3
-#define ACT_SCENE_ADD_BACK 4
-#define ACT_SCENE_REMOVE 5
-#define ACT_SCENE_SUSPEND 6
-#define ACT_SCENE_RESUME 7
-
-
-/* randomAct->distribution */
-#define ACT_RANDOM_BOOL_CONST 0
-#define ACT_RANDOM_BOOL_UNIFORM 1
-#define ACT_RANDOM_BOOL_BERNOUILLI 2
-#define ACT_RANDOM_INT_CONST 3
-#define ACT_RANDOM_INT_UNIFORM 4
-#define ACT_RANDOM_INT_POISSON 5
-#define ACT_RANDOM_FLOAT_CONST 6
-#define ACT_RANDOM_FLOAT_UNIFORM 7
-#define ACT_RANDOM_FLOAT_NORMAL 8
-#define ACT_RANDOM_FLOAT_NEGATIVE_EXPONENTIAL 9
-
-/* SoundActuator->flag */
-#define ACT_SND_3D_SOUND 1
-
-/* SoundActuator->type */
-#define ACT_SND_PLAY_STOP_SOUND 0
-#define ACT_SND_PLAY_END_SOUND 1
-#define ACT_SND_LOOP_STOP_SOUND 2
-#define ACT_SND_LOOP_END_SOUND 3
-#define ACT_SND_LOOP_BIDIRECTIONAL_SOUND 4
-#define ACT_SND_LOOP_BIDIRECTIONAL_STOP_SOUND 5
-
-/* messageactuator->type */
-#define ACT_MESG_MESG 0
-#define ACT_MESG_PROP 1
-
-/* gameactuator->type */
-#define ACT_GAME_LOAD 0
-#define ACT_GAME_START 1
-#define ACT_GAME_RESTART 2
-#define ACT_GAME_QUIT 3
-#define ACT_GAME_SAVECFG 4
-#define ACT_GAME_LOADCFG 5
-#define ACT_GAME_SCREENSHOT 6
-
-/* visibilityact->flag */
-/* Set means the object will become invisible */
-#define ACT_VISIBILITY_INVISIBLE (1 << 0)
-#define ACT_VISIBILITY_RECURSIVE (1 << 1)
-#define ACT_VISIBILITY_OCCLUSION (1 << 2)
-
-/* twodfilter->type */
-#define ACT_2DFILTER_ENABLED -2
-#define ACT_2DFILTER_DISABLED -1
-#define ACT_2DFILTER_NOFILTER 0
-#define ACT_2DFILTER_MOTIONBLUR 1
-#define ACT_2DFILTER_BLUR 2
-#define ACT_2DFILTER_SHARPEN 3
-#define ACT_2DFILTER_DILATION 4
-#define ACT_2DFILTER_EROSION 5
-#define ACT_2DFILTER_LAPLACIAN 6
-#define ACT_2DFILTER_SOBEL 7
-#define ACT_2DFILTER_PREWITT 8
-#define ACT_2DFILTER_GRAYSCALE 9
-#define ACT_2DFILTER_SEPIA 10
-#define ACT_2DFILTER_INVERT 11
-#define ACT_2DFILTER_CUSTOMFILTER 12
-#define ACT_2DFILTER_NUMBER_OF_FILTERS 13
-
-/* parentactuator->type */
-#define ACT_PARENT_SET 0
-#define ACT_PARENT_REMOVE 1
-
-/* parentactuator->flag */
-#define ACT_PARENT_COMPOUND 1
-#define ACT_PARENT_GHOST 2
-
-/* armatureactuator->type */
-#define ACT_ARM_RUN 0
-#define ACT_ARM_ENABLE 1
-#define ACT_ARM_DISABLE 2
-#define ACT_ARM_SETTARGET 3
-#define ACT_ARM_SETWEIGHT 4
-#define ACT_ARM_SETINFLUENCE 5
-/* update this define if more types are added */
-#define ACT_ARM_MAXTYPE 5
-
-/* stateactuator->type */
-#define ACT_STATE_SET 0
-#define ACT_STATE_ADD 1
-#define ACT_STATE_REMOVE 2
-#define ACT_STATE_CHANGE 3
-
-/* steeringactuator->type */
-#define ACT_STEERING_SEEK 0
-#define ACT_STEERING_FLEE 1
-#define ACT_STEERING_PATHFOLLOWING 2
-/* steeringactuator->flag */
-#define ACT_STEERING_SELFTERMINATED 1
-#define ACT_STEERING_ENABLEVISUALIZATION 2
-#define ACT_STEERING_AUTOMATICFACING 4
-#define ACT_STEERING_NORMALUP 8
-#define ACT_STEERING_LOCKZVEL 16
-
-/* mouseactuator->type */
-#define ACT_MOUSE_VISIBILITY 0
-#define ACT_MOUSE_LOOK 1
-
-/* mouseactuator->flag */
-#define ACT_MOUSE_VISIBLE (1 << 0)
-#define ACT_MOUSE_USE_AXIS_X (1 << 1)
-#define ACT_MOUSE_USE_AXIS_Y (1 << 2)
-#define ACT_MOUSE_RESET_X (1 << 3)
-#define ACT_MOUSE_RESET_Y (1 << 4)
-#define ACT_MOUSE_LOCAL_X (1 << 5)
-#define ACT_MOUSE_LOCAL_Y (1 << 6)
-
-/* mouseactuator->object_axis */
-#define ACT_MOUSE_OBJECT_AXIS_X 0
-#define ACT_MOUSE_OBJECT_AXIS_Y 1
-#define ACT_MOUSE_OBJECT_AXIS_Z 2
-
-#endif /* __DNA_ACTUATOR_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index cea1a1cf40f..c2248778c46 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -438,6 +438,7 @@ typedef enum eDriver_Types {
} eDriver_Types;
/* driver flags */
+/* note: (1<<5) is deprecated; was "DRIVER_FLAG_SHOWDEBUG" */
typedef enum eDriver_Flags {
/* driver has invalid settings (internal flag) */
DRIVER_FLAG_INVALID = (1<<0),
@@ -450,8 +451,6 @@ typedef enum eDriver_Flags {
DRIVER_FLAG_RECOMPILE = (1<<3),
/* the names are cached so they don't need have python unicode versions created each time */
DRIVER_FLAG_RENAMEVAR = (1<<4),
- /* intermediate values of driver should be shown in the UI for debugging purposes */
- DRIVER_FLAG_SHOWDEBUG = (1<<5),
/* include 'self' in the drivers namespace. */
DRIVER_FLAG_USE_SELF = (1<<6),
} eDriver_Flags;
@@ -488,11 +487,13 @@ typedef struct FCurve {
/* value cache + settings */
float curval; /* value stored from last time curve was evaluated (not threadsafe, debug display only!) */
+ /* Value which comes from original DNA ddatablock at a time f-curve was evaluated. */
+ float orig_dna_val;
short flag; /* user-editable settings for this curve */
short extend; /* value-extending mode for this curve (does not cover */
char auto_smoothing; /* auto-handle smoothing mode */
- char pad[7];
+ char pad[3];
/* RNA - data link */
int array_index; /* if applicable, the index of the RNA-array item to get */
@@ -960,6 +961,8 @@ typedef enum eAnimData_Flag {
typedef enum eAnimData_Recalc {
ADT_RECALC_DRIVERS = (1 << 0),
ADT_RECALC_ANIM = (1 << 1),
+ /* Only apply f-curve value if its original DNA value matches current DNA value. */
+ ADT_RECALC_CHECK_ORIG_DNA = (1 << 2),
ADT_RECALC_ALL = (ADT_RECALC_DRIVERS | ADT_RECALC_ANIM)
} eAnimData_Recalc;
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 757c0eb8394..9e278c63904 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -99,8 +99,6 @@ typedef struct bArmature {
Bone *act_bone; /* active bone */
struct EditBone *act_edbone; /* active editbone (in editmode) */
- void *sketch; /* sketch struct for etch-a-ton */
-
int flag;
int drawtype;
int gevertdeformer; /* how vertex deformation is handled in the ge */
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 52e40cbc098..b3c568fab98 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -34,6 +34,8 @@
#include "DNA_defs.h"
#include "DNA_gpu_types.h"
+#include "DNA_movieclip_types.h"
+#include "DNA_image_types.h"
#include "DNA_ID.h"
#ifdef __cplusplus
@@ -59,6 +61,20 @@ typedef struct CameraStereoSettings {
float pole_merge_angle_to;
} CameraStereoSettings;
+/* Background Picture */
+typedef struct CameraBGImage {
+ struct CameraBGImage *next, *prev;
+
+ struct Image *ima;
+ struct ImageUser iuser;
+ struct MovieClip *clip;
+ struct MovieClipUser cuser;
+ float offset[2], scale, rotation;
+ float alpha;
+ short flag;
+ short source;
+} CameraBGImage;
+
typedef struct Camera {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -82,9 +98,19 @@ typedef struct Camera {
struct Object *dof_ob;
struct GPUDOFSettings gpu_dof;
+ /* CameraBGImage reference images */
+ struct ListBase bg_images;
+
char sensor_fit;
char pad[7];
+ /* runtime only, used for drawing */
+ float drwcorners[4][2];
+ float drwtria[2][2];
+ float drwdepth, pad1;
+ float drwfocusmat[4][4];
+ float drwnormalmat[4][4];
+
/* Stereo settings */
struct CameraStereoSettings stereo;
} Camera;
@@ -124,6 +150,7 @@ enum {
#endif
CAM_SHOWSENSOR = (1 << 8),
CAM_SHOW_SAFE_CENTER = (1 << 9),
+ CAM_SHOW_BG_IMAGE = (1 << 10),
};
/* yafray: dof sampling switch */
@@ -136,8 +163,8 @@ enum {
CAMERA_SENSOR_FIT_VERT = 2,
};
-#define DEFAULT_SENSOR_WIDTH 32.0f
-#define DEFAULT_SENSOR_HEIGHT 18.0f
+#define DEFAULT_SENSOR_WIDTH 36.0f
+#define DEFAULT_SENSOR_HEIGHT 24.0f
/* stereo->convergence_mode */
enum {
@@ -159,6 +186,32 @@ enum {
CAM_S3D_POLE_MERGE = (1 << 1),
};
+/* CameraBGImage->flag */
+/* may want to use 1 for select ? */
+enum {
+ CAM_BGIMG_FLAG_EXPANDED = (1 << 1),
+ CAM_BGIMG_FLAG_CAMERACLIP = (1 << 2),
+ CAM_BGIMG_FLAG_DISABLED = (1 << 3),
+ CAM_BGIMG_FLAG_FOREGROUND = (1 << 4),
+
+ /* Camera framing options */
+ CAM_BGIMG_FLAG_CAMERA_ASPECT = (1 << 5), /* don't stretch to fit the camera view */
+ CAM_BGIMG_FLAG_CAMERA_CROP = (1 << 6), /* crop out the image */
+
+ /* Axis flip options */
+ CAM_BGIMG_FLAG_FLIP_X = (1 << 7),
+ CAM_BGIMG_FLAG_FLIP_Y = (1 << 8),
+};
+
+#define CAM_BGIMG_FLAG_EXPANDED (CAM_BGIMG_FLAG_EXPANDED | CAM_BGIMG_FLAG_CAMERACLIP)
+
+/* CameraBGImage->source */
+/* may want to use 1 for select ?*/
+enum {
+ CAM_BGIMG_SOURCE_IMAGE = 0,
+ CAM_BGIMG_SOURCE_MOVIE = 1,
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h
index ee147da8dae..00995bcf290 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -116,7 +116,7 @@ typedef struct ClothCollSettings {
short self_loop_count; /* How many iterations for the selfcollision loop */
short loop_count; /* How many iterations for the collision loop. */
int pad;
- struct Group *group; /* Only use colliders from this group of objects */
+ struct Collection *group; /* Only use colliders from this group of objects */
short vgroup_selfcol; /* vgroup to paint which vertices are used for self collisions */
short pad2[3];
} ClothCollSettings;
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 4c4440ad573..f0f8c3fe2bd 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -488,7 +488,7 @@ typedef enum eBConstraint_Types {
CONSTRAINT_TYPE_DISTLIMIT = 14, /* limit distance */
CONSTRAINT_TYPE_STRETCHTO = 15, /* claiming this to be mine :) is in tuhopuu bjornmose */
CONSTRAINT_TYPE_MINMAX = 16, /* floor constraint */
- CONSTRAINT_TYPE_RIGIDBODYJOINT = 17, /* rigidbody constraint */
+ /* CONSTRAINT_TYPE_DEPRECATED = 17 */
CONSTRAINT_TYPE_CLAMPTO = 18, /* clampto constraint */
CONSTRAINT_TYPE_TRANSFORM = 19, /* transformation (loc/rot/size -> loc/rot/size) constraint */
CONSTRAINT_TYPE_SHRINKWRAP = 20, /* shrinkwrap (loc/rot) constraint */
@@ -526,6 +526,8 @@ typedef enum eBConstraint_Flags {
CONSTRAINT_OFF = (1<<9),
/* use bbone curve shape when calculating headtail values */
CONSTRAINT_BBONE_SHAPE = (1<<10),
+ /* That constraint has been inserted in local override (i.e. it can be fully edited!). */
+ CONSTRAINT_STATICOVERRIDE_LOCAL = (1 << 11),
} eBConstraint_Flags;
/* bConstraint->ownspace/tarspace */
@@ -841,10 +843,6 @@ typedef enum eObjectSolver_Flags {
OBJECTSOLVER_ACTIVECLIP = (1<<0)
} eObjectSolver_Flags;
-/* Rigid-Body Constraint */
-#define CONSTRAINT_DRAW_PIVOT 0x40
-#define CONSTRAINT_DISABLE_LINKED_COLLISION 0x80
-
/* ObjectSolver Constraint -> flag */
typedef enum eStretchTo_Flags {
STRETCHTOCON_USE_BULGE_MIN = (1 << 0),
diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h
deleted file mode 100644
index 154542d60c5..00000000000
--- a/source/blender/makesdna/DNA_controller_types.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file DNA_controller_types.h
- * \ingroup DNA
- *
- * #bController type is specifically for use by Object logic-bricks in the game-engine.
- */
-
-#ifndef __DNA_CONTROLLER_TYPES_H__
-#define __DNA_CONTROLLER_TYPES_H__
-
-struct bActuator;
-struct Text;
-struct bSensor;
-
-/* ****************** CONTROLLERS ********************* */
-
-typedef struct bExpressionCont {
- char str[128];
-} bExpressionCont;
-
-typedef struct bPythonCont {
- struct Text *text;
- char module[64];
- int mode;
- int flag; /* only used for debug now */
-} bPythonCont;
-
-typedef struct bController {
- struct bController *next, *prev, *mynew;
- short type, flag, inputs, totlinks;
- short otype, totslinks, pad2, pad3;
-
- char name[64];
- void *data;
-
- struct bActuator **links;
-
- struct bSensor **slinks;
- short val, valo;
- unsigned int state_mask;
-
-} bController;
-
-/* controller->type */
-#define CONT_LOGIC_AND 0
-#define CONT_LOGIC_OR 1
-#define CONT_EXPRESSION 2
-#define CONT_PYTHON 3
-#define CONT_LOGIC_NAND 4
-#define CONT_LOGIC_NOR 5
-#define CONT_LOGIC_XOR 6
-#define CONT_LOGIC_XNOR 7
-
-/* controller->flag */
-#define CONT_SHOW 1
-#define CONT_DEL 2
-#define CONT_NEW 4
-#define CONT_MASK 8
-#define CONT_PRIO 16
-#define CONT_DEACTIVATE 32
-
-/* pyctrl->flag */
-#define CONT_PY_DEBUG 1
-
-/* pyctrl->mode */
-#define CONT_PY_SCRIPT 0
-#define CONT_PY_MODULE 1
-
-#endif /* __DNA_CONTROLLER_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 91b64b793c1..fd0170b9766 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -265,6 +265,7 @@ typedef struct Curve {
char pad2[2];
+ void *batch_cache;
} Curve;
#define CURVE_VFONT_ANY(cu) \
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 2d1ffaa53eb..0e0b1d669d9 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -92,13 +92,13 @@ typedef enum CustomDataType {
CD_MCOL = 6,
CD_ORIGINDEX = 7,
CD_NORMAL = 8,
-/* CD_POLYINDEX = 9, */
+ CD_FACEMAP = 9, /* exclusive face group, each face can only be part of one */
CD_PROP_FLT = 10,
CD_PROP_INT = 11,
CD_PROP_STR = 12,
CD_ORIGSPACE = 13, /* for modifier stack face location mapping */
CD_ORCO = 14,
- CD_MTEXPOLY = 15,
+/* CD_MTEXPOLY = 15, */ /* deprecated */
CD_MLOOPUV = 16,
CD_MLOOPCOL = 17,
CD_TANGENT = 18,
@@ -143,13 +143,13 @@ typedef enum CustomDataType {
#define CD_MASK_MCOL (1 << CD_MCOL)
#define CD_MASK_ORIGINDEX (1 << CD_ORIGINDEX)
#define CD_MASK_NORMAL (1 << CD_NORMAL)
-// #define CD_MASK_POLYINDEX (1 << CD_POLYINDEX)
+#define CD_MASK_FACEMAP (1 << CD_FACEMAP)
#define CD_MASK_PROP_FLT (1 << CD_PROP_FLT)
#define CD_MASK_PROP_INT (1 << CD_PROP_INT)
#define CD_MASK_PROP_STR (1 << CD_PROP_STR)
#define CD_MASK_ORIGSPACE (1 << CD_ORIGSPACE)
#define CD_MASK_ORCO (1 << CD_ORCO)
-#define CD_MASK_MTEXPOLY (1 << CD_MTEXPOLY)
+// #define CD_MASK_MTEXPOLY (1 << CD_MTEXPOLY) /* DEPRECATED */
#define CD_MASK_MLOOPUV (1 << CD_MLOOPUV)
#define CD_MASK_MLOOPCOL (1 << CD_MLOOPCOL)
#define CD_MASK_TANGENT (1 << CD_TANGENT)
diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h
index fc9dd8f06a9..bfa8da02707 100644
--- a/source/blender/makesdna/DNA_defs.h
+++ b/source/blender/makesdna/DNA_defs.h
@@ -44,6 +44,12 @@
# endif
#endif
+#ifdef __GNUC__
+# define DNA_PRIVATE_ATTR __attribute__ ((deprecated))
+#else
+# define DNA_PRIVATE_ATTR
+#endif
+
/* poison pragma */
#ifdef DNA_DEPRECATED_ALLOW
diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h
index 17553e98817..b341c2841e2 100644
--- a/source/blender/makesdna/DNA_dynamicpaint_types.h
+++ b/source/blender/makesdna/DNA_dynamicpaint_types.h
@@ -104,7 +104,7 @@ typedef struct DynamicPaintSurface {
struct DynamicPaintCanvasSettings *canvas; /* for fast RNA access */
struct PaintSurfaceData *data;
- struct Group *brush_group;
+ struct Collection *brush_group;
struct EffectorWeights *effector_weights;
/* cache */
@@ -177,7 +177,7 @@ typedef struct DynamicPaintCanvasSettings {
/* flags */
enum {
MOD_DPAINT_PART_RAD = 1 << 0, /* use particle radius */
- MOD_DPAINT_USE_MATERIAL = 1 << 1, /* use object material */
+ //MOD_DPAINT_USE_MATERIAL = 1 << 1, /* DNA_DEPRECATED */
MOD_DPAINT_ABS_ALPHA = 1 << 2, /* don't increase alpha unless paint alpha is higher than existing */
MOD_DPAINT_ERASE = 1 << 3, /* removes paint */
@@ -231,7 +231,6 @@ typedef struct DynamicPaintBrushSettings {
struct DynamicPaintModifierData *pmd; /* for fast RNA access */
struct DerivedMesh *dm;
struct ParticleSystem *psys;
- struct Material *mat;
int flags;
int collision;
diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h
index 7ca3bbe3319..3455feea1a9 100644
--- a/source/blender/makesdna/DNA_effect_types.h
+++ b/source/blender/makesdna/DNA_effect_types.h
@@ -97,7 +97,7 @@ typedef struct Particle {
short mat_nr, rt;
} Particle;
-struct Group;
+struct Collection;
typedef struct PartEff {
struct PartEff *next, *prev;
@@ -122,7 +122,7 @@ typedef struct PartEff {
float imat[4][4]; /* inverse matrix of parent Object */
Particle *keys;
- struct Group *group;
+ struct Collection *group;
} PartEff;
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
index b2ab0d2a08d..ed9640c365f 100644
--- a/source/blender/makesdna/DNA_fileglobal_types.h
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -32,9 +32,6 @@
#ifndef __DNA_FILEGLOBAL_TYPES_H__
#define __DNA_FILEGLOBAL_TYPES_H__
-struct bScreen;
-struct Scene;
-
/**
* FileGlobal stores a part of the current user-interface settings at
* the moment of saving, and the file-specific settings.
@@ -46,6 +43,9 @@ typedef struct FileGlobal {
char pad[6];
struct bScreen *curscreen;
struct Scene *curscene;
+ struct ViewLayer *cur_view_layer;
+ void *pad1;
+
int fileflags;
int globalf;
uint64_t build_commit_timestamp; /* commit timestamp from buildinfo */
diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h
index 2359d1e9738..158bdf573b3 100644
--- a/source/blender/makesdna/DNA_freestyle_types.h
+++ b/source/blender/makesdna/DNA_freestyle_types.h
@@ -40,7 +40,7 @@ extern "C" {
#endif
struct FreestyleLineStyle;
-struct Group;
+struct Collection;
struct Text;
/* FreestyleConfig::flags */
@@ -125,7 +125,7 @@ typedef struct FreestyleLineSet {
int qi_start, qi_end;
int edge_types, exclude_edge_types; /* feature edge types */
int pad2;
- struct Group *group; /* group of target objects */
+ struct Collection *group; /* group of target objects */
struct FreestyleLineStyle *linestyle;
} FreestyleLineSet;
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index a62538d1032..d5a5a1d5d4a 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -128,7 +128,7 @@ typedef enum eGPDpalettecolor_Flag {
PC_COLOR_LOCKED = (1 << 2),
/* do onion skinning */
PC_COLOR_ONIONSKIN = (1 << 3),
- /* "volumetric" strokes (i.e. GLU Quadric discs in 3D) */
+ /* "volumetric" strokes */
PC_COLOR_VOLUMETRIC = (1 << 4),
/* Use High quality fill */
PC_COLOR_HQ_FILL = (1 << 5)
@@ -273,7 +273,7 @@ typedef enum eGPDlayer_Flag {
GP_LAYER_GHOST_PREVCOL = (1 << 8),
/* use custom color for ghosts after current frame */
GP_LAYER_GHOST_NEXTCOL = (1 << 9),
- /* "volumetric" strokes (i.e. GLU Quadric discs in 3D) */
+ /* "volumetric" strokes */
GP_LAYER_VOLUMETRIC = (1 << 10),
/* Use high quality fill (instead of buggy legacy OpenGL Fill) */
GP_LAYER_HQ_FILL = (1 << 11),
@@ -300,6 +300,7 @@ typedef struct bGPdata {
short sbuffer_sflag; /* flags for stroke that cache represents */
void *sbuffer; /* stroke buffer (can hold GP_STROKE_BUFFER_MAX) */
float scolor[4]; /* buffer color using palettes */
+ float sfill[4]; /* buffer fill color */
char pad[6]; /* padding for compiler alignment error */
short sflag; /* settings for palette color */
diff --git a/source/blender/makesdna/DNA_gpu_types.h b/source/blender/makesdna/DNA_gpu_types.h
index 967cb7284dc..be34309572f 100644
--- a/source/blender/makesdna/DNA_gpu_types.h
+++ b/source/blender/makesdna/DNA_gpu_types.h
@@ -38,6 +38,8 @@ typedef struct GPUDOFSettings {
float fstop;
float focal_length;
float sensor;
+ float rotation;
+ float ratio;
int num_blades;
int high_quality;
} GPUDOFSettings;
diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h
index 45dd0cb9ff2..3b947caf59c 100644
--- a/source/blender/makesdna/DNA_group_types.h
+++ b/source/blender/makesdna/DNA_group_types.h
@@ -34,32 +34,61 @@
#ifndef __DNA_GROUP_TYPES_H__
#define __DNA_GROUP_TYPES_H__
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_ID.h"
struct Object;
+struct Collection;
-typedef struct GroupObject {
- struct GroupObject *next, *prev;
+typedef struct CollectionObject {
+ struct CollectionObject *next, *prev;
struct Object *ob;
- void *lampren; /* used while render */
- short recalc; /* copy of ob->recalc, used to set animated groups OK */
- char pad[6];
-} GroupObject;
+} CollectionObject;
-typedef struct Group {
+typedef struct CollectionChild {
+ struct CollectionChild *next, *prev;
+ struct Collection *collection;
+} CollectionChild;
+
+
+typedef struct Collection {
ID id;
- ListBase gobject; /* GroupObject */
+ ListBase gobject; /* CollectionObject */
+ ListBase children; /* CollectionChild */
struct PreviewImage *preview;
- /* Bad design, since layers stored in the scenes 'Base'
- * the objects that show in the group can change depending
- * on the last used scene */
- unsigned int layer;
+ unsigned int layer DNA_DEPRECATED;
float dupli_ofs[3];
-} Group;
+
+ short flag, pad[3];
+
+ /* Runtime. Cache of objects in this collection and all its
+ * children. This is created on demand when e.g. some physics
+ * simulation needs it, we don't want to have it for every
+ * collections due to memory usage reasons. */
+ ListBase object_cache;
+
+ /* Runtime. List of collections that are a parent of this
+ * datablock. */
+ ListBase parents;
+
+ /* Deprecated */
+ struct SceneCollection *collection DNA_DEPRECATED;
+ struct ViewLayer *view_layer DNA_DEPRECATED;
+} Collection;
+
+/* Collection->flag */
+enum {
+ COLLECTION_RESTRICT_VIEW = (1 << 0), /* Hidden in viewport. */
+ COLLECTION_RESTRICT_SELECT = (1 << 1), /* Not selectable in viewport. */
+ COLLECTION_DISABLED_DEPRECATED = (1 << 2), /* Not used anymore */
+ COLLECTION_RESTRICT_RENDER = (1 << 3), /* Hidden in renders. */
+ COLLECTION_HAS_OBJECT_CACHE = (1 << 4), /* Runtime: object_cache is populated. */
+ COLLECTION_IS_MASTER = (1 << 5), /* Is master collection embedded in the scene. */
+};
#endif /* __DNA_GROUP_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index b4bc26f45cd..3d29c5b3833 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -116,23 +116,18 @@ typedef struct Image {
int lastframe;
/* texture page */
- short tpageflag, totbind;
- short xrep, yrep;
- short twsta, twend;
+ short tpageflag;
+ short pad2;
unsigned int bindcode[2]; /* only for current image... 2 = TEXTARGET_COUNT */
- char pad1[4];
- unsigned int *repbind; /* for repeat of parts of images */
-
+ unsigned int pad3;
+
struct PackedFile *packedfile DNA_DEPRECATED; /* deprecated */
struct ListBase packedfiles;
struct PreviewImage *preview;
- /* game engine tile animation */
- float lastupdate;
int lastused;
- short animspeed;
-
short ok;
+ short pad4[3];
/* for generated images */
int gen_x, gen_y;
@@ -168,7 +163,7 @@ enum {
#ifdef DNA_DEPRECATED
IMA_DO_PREMUL = (1 << 2), /* deprecated, should not be used */
#endif
- IMA_REFLECT = (1 << 4),
+ //IMA_REFLECT = (1 << 4), /* deprecated */
IMA_NOCOLLECT = (1 << 5),
//IMA_DONE_TAG = (1 << 6), // UNUSED
IMA_OLD_PREMUL = (1 << 7),
@@ -184,12 +179,12 @@ enum {
};
/* Image.tpageflag */
-#define IMA_TILES 1
-#define IMA_TWINANIM 2
-#define IMA_COLCYCLE 4 /* Depreciated */
+//#define IMA_TILES 1 /* Deprecated */
+//#define IMA_TWINANIM 2 /* Deprecated */
+#define IMA_COLCYCLE 4 /* Deprecated */
#define IMA_MIPMAP_COMPLETE 8 /* all mipmap levels in OpenGL texture set? */
-#define IMA_CLAMP_U 16
-#define IMA_CLAMP_V 32
+//#define IMA_CLAMP_U 16 /* Deprecated */
+//#define IMA_CLAMP_V 32 /* Deprecated */
#define IMA_TPAGE_REFRESH 64
#define IMA_GLBIND_IS_DATA 128 /* opengl image texture bound as non-color data */
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index a2e39f93875..3a4b07cc791 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -51,15 +51,12 @@ typedef struct Lamp {
short type, flag;
int mode;
-
- short colormodel, totex;
+
float r, g, b, k;
float shdwr, shdwg, shdwb, shdwpad;
float energy, dist, spotsize, spotblend;
- float haint;
-
-
+
float att1, att2; /* Quad1 and Quad2 attenuation */
float coeff_const, coeff_lin, coeff_quad, coeff_pad;
struct CurveMapping *curfalloff;
@@ -67,45 +64,30 @@ typedef struct Lamp {
short pad2;
float clipsta, clipend;
- float bias, soft, compressthresh, bleedbias, pad5;
+ float bias, soft, bleedbias, bleedexp;
short bufsize, samp, buffers, filtertype;
char bufflag, buftype;
- short ray_samp, ray_sampy, ray_sampz;
- short ray_samp_type;
short area_shape;
float area_size, area_sizey, area_sizez;
- float adapt_thresh;
- short ray_samp_method;
- short shadowmap_type;
/* texact is for buttons */
short texact, shadhalostep;
- /* sun/sky */
- short sun_effect_type;
- short skyblendtype;
- float horizon_brightness;
- float spread;
- float sun_brightness;
- float sun_size;
- float backscattered_light;
- float sun_intensity;
- float atm_turbidity;
- float atm_inscattering_factor;
- float atm_extinction_factor;
- float atm_distance_factor;
- float skyblendfac;
- float sky_exposure;
- float shadow_frustum_size; /* BGE Only */
- short sky_colorspace;
- char pad4[2];
-
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
- struct MTex *mtex[18]; /* MAX_MTEX */
short pr_texture, use_nodes;
char pad6[4];
+ /* Eevee */
+ float cascade_max_dist;
+ float cascade_exponent;
+ float cascade_fade;
+ int cascade_count;
+
+ float contact_dist, contact_bias, contact_spread, contact_thickness;
+
+ float spec_fac, pad;
+
/* preview */
struct PreviewImage *preview;
@@ -130,36 +112,28 @@ typedef struct Lamp {
#define LA_AREA 4
/* mode */
-#define LA_SHAD_BUF (1 << 0)
-#define LA_HALO (1 << 1)
-#define LA_LAYER (1 << 2)
-#define LA_QUAD (1 << 3) /* no longer used */
-#define LA_NEG (1 << 4)
-#define LA_ONLYSHADOW (1 << 5)
-#define LA_SPHERE (1 << 6)
+#define LA_SHADOW (1 << 0)
+/* #define LA_HALO (1 << 1) */ /* not used anymore */
+/* #define LA_LAYER (1 << 2) */ /* not used anymore */
+/* #define LA_QUAD (1 << 3) */ /* not used anymore */
+/* #define LA_NEG (1 << 4) */ /* not used anymore */
+/* #define LA_ONLYSHADOW(1 << 5) */ /* not used anymore */
+/* #define LA_SPHERE (1 << 6) */ /* not used anymore */
#define LA_SQUARE (1 << 7)
-#define LA_TEXTURE (1 << 8)
-#define LA_OSATEX (1 << 9)
+/* #define LA_TEXTURE (1 << 8) */ /* not used anymore */
+/* #define LA_OSATEX (1 << 9) */ /* not used anymore */
/* #define LA_DEEP_SHADOW (1 << 10) */ /* not used anywhere */
-#define LA_NO_DIFF (1 << 11)
-#define LA_NO_SPEC (1 << 12)
-#define LA_SHAD_RAY (1 << 13)
+/* #define LA_NO_DIFF (1 << 11) */ /* not used anywhere */
+/* #define LA_NO_SPEC (1 << 12) */ /* not used anywhere */
+/* #define LA_SHAD_RAY (1 << 13) */ /* not used anywhere - cleaned */
/* yafray: lamp shadowbuffer flag, softlight */
/* Since it is used with LOCAL lamp, can't use LA_SHAD */
-/* #define LA_YF_SOFT (1 << 14) */ /* no longer used */
-#define LA_LAYER_SHADOW (1 << 15)
-#define LA_SHAD_TEX (1 << 16)
+/* #define LA_YF_SOFT (1 << 14) */ /* not used anymore */
+/* #define LA_LAYER_SHADOW (1 << 15) */ /* not used anymore */
+/* #define LA_SHAD_TEX (1 << 16) */ /* not used anymore */
#define LA_SHOW_CONE (1 << 17)
-#define LA_SHOW_SHADOW_BOX (1 << 18)
-
-/* layer_shadow */
-#define LA_LAYER_SHADOW_BOTH 0
-#define LA_LAYER_SHADOW_CAST 1
-#define LA_LAYER_SHADOW_RECEIVE 2
-
-/* sun effect type*/
-#define LA_SUN_EFFECT_SKY 1
-#define LA_SUN_EFFECT_AP 2
+/* #define LA_SHOW_SHADOW_BOX (1 << 18) */
+#define LA_SHAD_CONTACT (1 << 19)
/* falloff_type */
#define LA_FALLOFF_CONSTANT 0
@@ -169,47 +143,13 @@ typedef struct Lamp {
#define LA_FALLOFF_SLIDERS 4
#define LA_FALLOFF_INVCOEFFICIENTS 5
-
-/* buftype, no flag */
-#define LA_SHADBUF_REGULAR 0
-#define LA_SHADBUF_IRREGULAR 1
-#define LA_SHADBUF_HALFWAY 2
-#define LA_SHADBUF_DEEP 3
-
-/* bufflag, auto clipping */
-#define LA_SHADBUF_AUTO_START 1
-#define LA_SHADBUF_AUTO_END 2
-
-/* filtertype */
-#define LA_SHADBUF_BOX 0
-#define LA_SHADBUF_TENT 1
-#define LA_SHADBUF_GAUSS 2
-
/* area shape */
#define LA_AREA_SQUARE 0
#define LA_AREA_RECT 1
#define LA_AREA_CUBE 2
#define LA_AREA_BOX 3
-
-/* ray_samp_method */
-#define LA_SAMP_CONSTANT 0
-#define LA_SAMP_HALTON 1
-#define LA_SAMP_HAMMERSLEY 2
-
-
-/* ray_samp_type */
-// #define LA_SAMP_ROUND 1 // UNUSED
-#define LA_SAMP_UMBRA 2
-#define LA_SAMP_DITHER 4
-#define LA_SAMP_JITTER 8
-
-/* mapto */
-#define LAMAP_COL 1
-#define LAMAP_SHAD 2
-
-/* shadowmap_type */
-#define LA_SHADMAP_SIMPLE 0
-#define LA_SHADMAP_VARIANCE 1
+#define LA_AREA_DISK 4
+#define LA_AREA_ELLIPSE 5
#endif /* __DNA_LAMP_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
index 242d6f0feeb..28a401676fc 100644
--- a/source/blender/makesdna/DNA_lattice_types.h
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -69,6 +69,7 @@ typedef struct Lattice {
char vgroup[64]; /* multiply the influence, MAX_VGROUP_NAME */
struct EditLatt *editlatt;
+ void *batch_cache;
} Lattice;
/* ***************** LATTICE ********************* */
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h
new file mode 100644
index 00000000000..66a8c3e236d
--- /dev/null
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -0,0 +1,140 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Dalai Felinto
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file DNA_layer_types.h
+ * \ingroup DNA
+ */
+
+#ifndef __DNA_LAYER_TYPES_H__
+#define __DNA_LAYER_TYPES_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "DNA_freestyle_types.h"
+#include "DNA_listBase.h"
+
+typedef struct Base {
+ struct Base *next, *prev;
+ short flag;
+ short pad;
+ short sx, sy;
+ struct Object *object;
+ unsigned int lay;
+ int flag_legacy;
+} Base;
+
+typedef struct ViewLayerEngineData {
+ struct ViewLayerEngineData *next, *prev;
+ struct DrawEngineType *engine_type;
+ void *storage;
+ void (*free)(void *storage);
+} ViewLayerEngineData;
+
+typedef struct LayerCollection {
+ struct LayerCollection *next, *prev;
+ struct Collection *collection;
+ struct SceneCollection *scene_collection DNA_DEPRECATED;
+ short flag;
+ short pad[3];
+ ListBase layer_collections; /* synced with collection->children */
+} LayerCollection;
+
+typedef struct ViewLayer {
+ struct ViewLayer *next, *prev;
+ char name[64]; /* MAX_NAME */
+ short flag;
+ short pad[3];
+ ListBase object_bases; /* ObjectBase */
+ struct SceneStats *stats; /* default allocated now */
+ struct Base *basact;
+ ListBase layer_collections; /* LayerCollection */
+ LayerCollection *active_collection;
+
+ /* Old SceneRenderLayer data. */
+ int layflag;
+ int passflag; /* pass_xor has to be after passflag */
+ int pass_xor;
+ float pass_alpha_threshold;
+
+ struct IDProperty *id_properties; /* Equivalent to datablocks ID properties. */
+
+ struct FreestyleConfig freestyle_config;
+
+ /* Runtime data */
+ ListBase drawdata; /* ViewLayerEngineData */
+ struct Base **object_bases_array;
+ struct GHash *object_bases_hash;
+} ViewLayer;
+
+/* Base->flag */
+enum {
+ BASE_SELECTED = (1 << 0),
+ BASE_VISIBLED = (1 << 1),
+ BASE_SELECTABLED = (1 << 2),
+ BASE_FROMDUPLI = (1 << 3),
+ BASE_DIRTY_ENGINE_SETTINGS = (1 << 4),
+ BASE_FROM_SET = (1 << 5), /* To be set only by the depsgraph */
+ BASE_VISIBLE_VIEWPORT = (1 << 6),
+ BASE_VISIBLE_RENDER = (1 << 7),
+};
+
+/* LayerCollection->flag */
+enum {
+ /* LAYER_COLLECTION_DEPRECATED0 = (1 << 0), */
+ /* LAYER_COLLECTION_DEPRECATED1 = (1 << 1), */
+ /* LAYER_COLLECTION_DEPRECATED2 = (1 << 2), */
+ /* LAYER_COLLECTION_DEPRECATED3 = (1 << 3), */
+ LAYER_COLLECTION_EXCLUDE = (1 << 4),
+};
+
+/* ViewLayer->flag */
+enum {
+ VIEW_LAYER_RENDER = (1 << 0),
+ VIEW_LAYER_ENGINE_DIRTY = (1 << 1),
+ VIEW_LAYER_FREESTYLE = (1 << 2),
+};
+
+/****************************** Deprecated ******************************/
+
+/* Compatibility with collections saved in early 2.8 versions,
+ * used in file reading and versioning code. */
+#define USE_COLLECTION_COMPAT_28
+
+typedef struct SceneCollection {
+ struct SceneCollection *next, *prev;
+ char name[64]; /* MAX_NAME */
+ int active_object_index; /* for UI */
+ short flag;
+ char type;
+ char pad;
+ ListBase objects; /* (Object *)LinkData->data */
+ ListBase scene_collections; /* nested collections */
+} SceneCollection;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DNA_LAYER_TYPES_H__ */
+
diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h
new file mode 100644
index 00000000000..86d4645ecf5
--- /dev/null
+++ b/source/blender/makesdna/DNA_lightprobe_types.h
@@ -0,0 +1,113 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/** \file DNA_lightprobe_types.h
+ * \ingroup DNA
+ */
+
+#ifndef __DNA_LIGHTPROBE_TYPES_H__
+#define __DNA_LIGHTPROBE_TYPES_H__
+
+#include "DNA_defs.h"
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct Object;
+struct AnimData;
+
+typedef struct LightProbe {
+ ID id;
+ struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
+
+ char type; /* For realtime probe objects */
+ char flag; /* General purpose flags for probes */
+ char attenuation_type; /* Attenuation type */
+ char parallax_type; /* Parallax type */
+
+ float distinf; /* Influence Radius */
+ float distpar; /* Parallax Radius */
+ float falloff; /* Influence falloff */
+
+ float clipsta, clipend;
+
+ float vis_bias, vis_bleedbias; /* VSM visibility biases */
+ float vis_blur;
+
+ float intensity; /* Intensity multiplier */
+
+ int grid_resolution_x; /* Irradiance grid resolution */
+ int grid_resolution_y;
+ int grid_resolution_z;
+ int pad1;
+
+ struct Object *parallax_ob; /* Object to use as a parallax origin */
+ struct Image *image; /* Image to use on as lighting data */
+ struct Collection *visibility_grp; /* Object visibility group, inclusive or exclusive */
+
+ float data_draw_size;
+
+ /* Runtime display data */
+ float distfalloff, distgridinf;
+ float pad;
+} LightProbe;
+
+/* Probe->type */
+enum {
+ LIGHTPROBE_TYPE_CUBE = 0,
+ LIGHTPROBE_TYPE_PLANAR = 1,
+ LIGHTPROBE_TYPE_GRID = 2,
+};
+
+/* Probe->flag */
+enum {
+ LIGHTPROBE_FLAG_CUSTOM_PARALLAX = (1 << 0),
+ LIGHTPROBE_FLAG_SHOW_INFLUENCE = (1 << 1),
+ LIGHTPROBE_FLAG_SHOW_PARALLAX = (1 << 2),
+ LIGHTPROBE_FLAG_SHOW_CLIP_DIST = (1 << 3),
+ LIGHTPROBE_FLAG_SHOW_DATA = (1 << 4),
+ LIGHTPROBE_FLAG_INVERT_GROUP = (1 << 5),
+};
+
+/* Probe->display */
+enum {
+ LIGHTPROBE_DISP_WIRE = 0,
+ LIGHTPROBE_DISP_SHADED = 1,
+ LIGHTPROBE_DISP_DIFFUSE = 2,
+ LIGHTPROBE_DISP_REFLECTIVE = 3,
+};
+
+/* Probe->parallax && Probe->attenuation_type*/
+enum {
+ LIGHTPROBE_SHAPE_ELIPSOID = 0,
+ LIGHTPROBE_SHAPE_BOX = 1,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __DNA_LIGHTPROBE_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 0c500e366a7..564e6aee3fc 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -40,199 +40,79 @@
#define MAX_MTEX 18
#endif
-struct MTex;
struct Image;
-struct ColorBand;
-struct Group;
struct bNodeTree;
struct AnimData;
struct Ipo;
/* WATCH IT: change type? also make changes in ipo.h */
-typedef struct VolumeSettings {
- float density;
- float emission;
- float scattering;
- float reflection;
-
- float emission_col[3];
- float transmission_col[3];
- float reflection_col[3];
-
- float density_scale;
- float depth_cutoff;
- float asymmetry;
-
- short stepsize_type;
- short shadeflag;
- short shade_type;
- short precache_resolution;
-
- float stepsize;
- float ms_diff;
- float ms_intensity;
- float ms_spread;
-} VolumeSettings;
-
-/* Game Engine Options (old Texface mode, transp and flag) */
-typedef struct GameSettings {
- int flag;
- int alpha_blend;
- int face_orientation;
- int pad1;
-} GameSettings;
-
typedef struct TexPaintSlot {
struct Image *ima; /* image to be painted on */
char *uvname; /* customdata index for uv layer, MAX_NAME*/
- int index; /* index for mtex slot in material for blender internal */
+ int valid; /* do we have a valid image and UV map */
int pad;
} TexPaintSlot;
+/* Clay engine */
+
+/* MaterialRuntimeClay.flag */
+#define CLAY_OUTDATED 1
+
+/* MaterialEngineSettingsClay.type */
+#define CLAY_MATCAP_NONE 0
+#define CLAY_MATCAP_SIMPLE 1
+#define CLAY_MATCAP_COMPLETE 2
+
typedef struct Material {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
- short material_type, flag;
- /* note, keep this below synced with render_types.h */
+ short flag, pad1[7];
+
+ /* Colors from Blender Internal that we are still using. */
float r, g, b;
float specr, specg, specb;
- float mirr, mirg, mirb;
- float ambr, ambb, ambg;
- float amb, emit, ang, spectra, ray_mirror;
- float alpha, ref, spec, zoffs, add;
- float translucency;
- /* end synced with render_types.h */
-
- struct VolumeSettings vol;
- struct GameSettings game;
-
- float fresnel_mir, fresnel_mir_i;
- float fresnel_tra, fresnel_tra_i;
- float filter; /* filter added, for raytrace transparency and transmissivity */
- float tx_limit, tx_falloff;
- short ray_depth, ray_depth_tra;
- short har;
- char seed1, seed2;
-
- float gloss_mir, gloss_tra;
- short samp_gloss_mir, samp_gloss_tra;
- float adapt_thresh_mir, adapt_thresh_tra;
- float aniso_gloss_mir;
- float dist_mir;
- short fadeto_mir;
- short shade_flag; /* like Cubic interpolation */
-
- int mode, mode_l; /* mode_l is the or-ed result of all layer modes */
- int mode2, mode2_l; /* additional mode flags */
- short flarec, starc, linec, ringc;
- float hasize, flaresize, subsize, flareboost;
- float strand_sta, strand_end, strand_ease, strand_surfnor;
- float strand_min, strand_widthfade;
- char strand_uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
-
- float sbias; /* shadow bias to prevent terminator prob */
- float lbias; /* factor to multiply lampbias with (0.0 = no mult) */
- float shad_alpha; /* in use for irregular shadowbuffer */
- int septex;
-
- /* for buttons and render*/
- char rgbsel, texact, pr_type, use_nodes;
- short pr_lamp, pr_texture, ml_flag; /* ml_flag is for disable base material */
-
- /* mapping */
- char mapflag, pad;
-
- /* shaders */
- short diff_shader, spec_shader;
- float roughness, refrac;
- /* XXX param[4] needs review and improvement (shader system as whole anyway)
- * This is nasty reused variable for different goals and not easy to RNAify nicely. -jesterKing */
- float param[4]; /* size, smooth, size, smooth, for toonshader, 0 (fac) and 1 (fresnel) also for fresnel shader */
- float rms;
- float darkness;
-
- /* runtime - OR'd from 'mtex' */
- short texco, mapto;
-
- /* ramp colors */
- struct ColorBand *ramp_col;
- struct ColorBand *ramp_spec;
- char rampin_col, rampin_spec;
- char rampblend_col, rampblend_spec;
- short ramp_show, pad3;
- float rampfac_col, rampfac_spec;
-
- struct MTex *mtex[18]; /* MAX_MTEX */
- struct bNodeTree *nodetree;
- struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
- struct Group *group; /* light group */
- struct PreviewImage *preview;
+ float alpha, ray_mirror, spec, gloss_mir;
- /* dynamic properties */
- float friction, fh, reflect;
- float fhdist, xyfrict;
- short dynamode, pad2;
+ /* Ror buttons and render. */
+ char pr_type, use_nodes;
+ short pr_lamp, pr_texture;
- /* subsurface scattering */
- float sss_radius[3], sss_col[3];
- float sss_error, sss_scale, sss_ior;
- float sss_colfac, sss_texfac;
- float sss_front, sss_back;
- short sss_flag, sss_preset;
+ /* Index for render passes. */
+ short index;
- int mapto_textured; /* render-time cache to optimize texture lookups */
- short shadowonly_flag; /* "shadowsonly" type */
- short index; /* custom index for render passes */
+ struct bNodeTree *nodetree;
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
+ struct PreviewImage *preview;
- /* Freestyle line settings */
+ /* Freestyle line settings. */
float line_col[4];
short line_priority;
short vcol_alpha;
- /* texture painting */
+ /* Texture painting slots. */
short paint_active_slot;
short paint_clone_slot;
short tot_slots;
- short pad4[3];
-
- /* multiple tangent (Normal Map node) */
- char nmap_tangent_names[9][64]; /* [MAX_MTFACE+1][MAX_NAME]; +1 for empty name */
- int nmap_tangent_names_count, pad5;
-
- struct TexPaintSlot *texpaintslot; /* cached slot for painting. Make sure to recalculate before use
- * with refresh_texpaint_image_cache */
- ListBase gpumaterial; /* runtime */
+ short pad2[3];
+
+ /* Transparency. */
+ float alpha_threshold;
+ float refract_depth;
+ char blend_method;
+ char blend_shadow;
+ char blend_flag;
+ char pad3[5];
+
+ /* Cached slots for texture painting, must be refreshed in
+ * refresh_texpaint_image_cache before using. */
+ struct TexPaintSlot *texpaintslot;
+
+ /* Runtime cache for GLSL materials. */
+ ListBase gpumaterial;
} Material;
-
-/* **************** GAME PROPERTIES ********************* */
-// Blend Transparency Options - alpha_blend /* match GPU_material::GPUBlendMode */
-#define GEMAT_SOLID 0 /* GPU_BLEND_SOLID */
-#define GEMAT_ADD 1 /* GPU_BLEND_ADD */
-#define GEMAT_ALPHA 2 /* GPU_BLEND_ALPHA */
-#define GEMAT_CLIP 4 /* GPU_BLEND_CLIP */
-#define GEMAT_ALPHA_SORT 8 /* GPU_BLEND_ALPHA_SORT */
-#define GEMAT_ALPHA_TO_COVERAGE 16 /* GPU_BLEND_ALPHA_TO_COVERAGE */
-
-// Game Options - flag
-#define GEMAT_BACKCULL 16 /* KX_BACKCULL */
-#define GEMAT_SHADED 32 /* KX_LIGHT */
-#define GEMAT_TEXT 64 /* RAS_RENDER_3DPOLYGON_TEXT */
-#define GEMAT_NOPHYSICS 128
-#define GEMAT_INVISIBLE 256
-
-// Face Orientation Options - face_orientation
-#define GEMAT_NORMAL 0
-#define GEMAT_HALO 512 /* BILLBOARD_SCREENALIGNED */
-#define GEMAT_BILLBOARD 1024 /* BILLBOARD_AXISALIGNED */
-#define GEMAT_SHADOW 2048 /* SHADOW */
-
-// Use Textures - not defined directly in the UI
-#define GEMAT_TEX 4096 /* KX_TEX */
-
-
/* **************** MATERIAL ********************* */
/* maximum number of materials per material array.
@@ -241,12 +121,6 @@ typedef struct Material {
* -1 because for active material we store the index + 1 */
#define MAXMAT (32767-1)
-/* material_type */
-#define MA_TYPE_SURFACE 0
-#define MA_TYPE_HALO 1
-#define MA_TYPE_VOLUME 2
-#define MA_TYPE_WIRE 3
-
/* flag */
/* for render */
#define MA_IS_USED 1
@@ -258,101 +132,7 @@ typedef struct Material {
*/
#define MA_DS_SHOW_TEXS 4
-/* mode (is int) */
-#define MA_TRACEBLE 1
-#define MA_SHADOW 2
-#define MA_SHLESS 4
-#define MA_WIRE 8 /* deprecated */
-#define MA_VERTEXCOL 16
-#define MA_HALO_SOFT 16
-#define MA_HALO 32 /* deprecated */
-#define MA_ZTRANSP 64
-#define MA_VERTEXCOLP 128
-#define MA_ZINV 256
-#define MA_HALO_RINGS 256
-#define MA_ENV 512
-#define MA_HALO_LINES 512
-#define MA_ONLYSHADOW 1024
-#define MA_HALO_XALPHA 1024
-#define MA_STAR 0x800
-#define MA_FACETEXTURE 0x800
-#define MA_HALOTEX 0x1000
-#define MA_HALOPUNO 0x2000
-#define MA_ONLYCAST 0x2000
-#define MA_NOMIST 0x4000
-#define MA_HALO_SHADE 0x4000
-#define MA_HALO_FLARE 0x8000
-#define MA_TRANSP 0x10000
-#define MA_RAYTRANSP 0x20000
-#define MA_RAYMIRROR 0x40000
-#define MA_SHADOW_TRA 0x80000
-#define MA_RAMP_COL 0x100000
-#define MA_RAMP_SPEC 0x200000
-#define MA_RAYBIAS 0x400000
-#define MA_FULL_OSA 0x800000
-#define MA_TANGENT_STR 0x1000000
-#define MA_SHADBUF 0x2000000
- /* note; we drop MA_TANGENT_STR later to become tangent_u */
-#define MA_TANGENT_V 0x4000000
-/* qdn: a bit clumsy this, tangents needed for normal maps separated from shading */
-#define MA_NORMAP_TANG 0x8000000
-#define MA_GROUP_NOLAY 0x10000000
-#define MA_FACETEXTURE_ALPHA 0x20000000
-#define MA_STR_B_UNITS 0x40000000
-#define MA_STR_SURFDIFF 0x80000000
-
-#define MA_MODE_MASK 0x6fffffff /* all valid mode bits */
-#define MA_MODE_PIPELINE (MA_TRANSP | MA_ZTRANSP | MA_RAYTRANSP \
- | MA_TRACEBLE | MA_FULL_OSA | MA_ENV | MA_ZINV \
- | MA_ONLYCAST | MA_SHADBUF)
-
-/* mode2 (is int) */
-#define MA_CASTSHADOW (1 << 0)
-#define MA_MODE2_PIPELINE (MA_CASTSHADOW)
-#define MA_TANGENT_CONCRETE (1 << 1)
-
-/* mapflag */
-#define MA_MAPFLAG_UVPROJECT (1 << 0)
-
-/* ray mirror fadeout */
-#define MA_RAYMIR_FADETOSKY 0
-#define MA_RAYMIR_FADETOMAT 1
-
-/* shadowonly_flag */
-#define MA_SO_OLD 0
-#define MA_SO_SHADOW 1
-#define MA_SO_SHADED 2
-
-/* shade_flag */
-#define MA_CUBIC 1
-#define MA_OBCOLOR 2
-#define MA_APPROX_OCCLUSION 4
-#define MA_GROUP_LOCAL 8
-
-/* diff_shader */
-#define MA_DIFF_LAMBERT 0
-#define MA_DIFF_ORENNAYAR 1
-#define MA_DIFF_TOON 2
-#define MA_DIFF_MINNAERT 3
-#define MA_DIFF_FRESNEL 4
-
-/* spec_shader */
-#define MA_SPEC_COOKTORR 0
-#define MA_SPEC_PHONG 1
-#define MA_SPEC_BLINN 2
-#define MA_SPEC_TOON 3
-#define MA_SPEC_WARDISO 4
-
-/* dynamode */
-// #define MA_DRAW_DYNABUTS 1 /* deprecated */
-#define MA_FH_NOR 2
-
/* ramps */
-#define MA_RAMP_IN_SHADER 0
-#define MA_RAMP_IN_ENERGY 1
-#define MA_RAMP_IN_NOR 2
-#define MA_RAMP_IN_RESULT 3
-
#define MA_RAMP_BLEND 0
#define MA_RAMP_ADD 1
#define MA_RAMP_MULT 2
@@ -394,38 +174,7 @@ typedef struct Material {
/* mapto */
#define MAP_COL 1
-#define MAP_NORM 2
-#define MAP_COLSPEC 4
-#define MAP_COLMIR 8
-#define MAP_VARS (0xFFF0)
-#define MAP_REF 16
-#define MAP_SPEC 32
-#define MAP_EMIT 64
#define MAP_ALPHA 128
-#define MAP_HAR 256
-#define MAP_RAYMIRR 512
-#define MAP_TRANSLU 1024
-#define MAP_AMB 2048
-#define MAP_DISPLACE 4096
-#define MAP_WARP 8192
-// #define MAP_LAYER 16384 /* unused */
-
-/* volume mapto - reuse definitions for now - a bit naughty! */
-#define MAP_DENSITY 128
-#define MAP_EMISSION 64
-#define MAP_EMISSION_COL 1
-#define MAP_SCATTERING 16
-#define MAP_TRANSMISSION_COL 8
-#define MAP_REFLECTION_COL 4
-#define MAP_REFLECTION 32
-
-
-/* mapto for halo */
-//#define MAP_HA_COL 1
-//#define MAP_HA_ALPHA 128
-//#define MAP_HA_HAR 256
-//#define MAP_HA_SIZE 2
-//#define MAP_HA_ADD 64
/* pmapto */
/* init */
@@ -458,24 +207,31 @@ typedef struct Material {
#define MA_HAIR 10
#define MA_ATMOS 11
-/* sss_flag */
-#define MA_DIFF_SSS 1
-
-/* vol_stepsize_type */
-#define MA_VOL_STEP_RANDOMIZED 0
-#define MA_VOL_STEP_CONSTANT 1
-#define MA_VOL_STEP_ADAPTIVE 2
-
-/* vol_shadeflag */
-#define MA_VOL_RECV_EXT_SHADOW 1
-#define MA_VOL_PRECACHESHADING 8
-
-/* vol_shading_type */
-#define MA_VOL_SHADE_SHADELESS 0
-#define MA_VOL_SHADE_SHADOWED 2
-#define MA_VOL_SHADE_SHADED 1
-#define MA_VOL_SHADE_MULTIPLE 3
-#define MA_VOL_SHADE_SHADEDPLUSMULTIPLE 4
+/* blend_method */
+enum {
+ MA_BM_SOLID,
+ MA_BM_ADD,
+ MA_BM_MULTIPLY,
+ MA_BM_CLIP,
+ MA_BM_HASHED,
+ MA_BM_BLEND,
+};
+
+/* blend_flag */
+enum {
+ MA_BL_HIDE_BACKSIDE = (1 << 0),
+ MA_BL_SS_REFRACTION = (1 << 1),
+ MA_BL_SS_SUBSURFACE = (1 << 2),
+ MA_BL_TRANSLUCENCY = (1 << 3),
+};
+
+/* blend_shadow */
+enum {
+ MA_BS_NONE = 0,
+ MA_BS_SOLID,
+ MA_BS_CLIP,
+ MA_BS_HASHED,
+};
#endif
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 39e56925903..48c39d439dd 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -39,11 +39,13 @@
struct AnimData;
struct Ipo;
struct Key;
+struct LinkNode;
struct MCol;
struct MEdge;
struct MFace;
struct MLoop;
struct MLoopCol;
+struct MLoopTri;
struct MLoopUV;
struct MPoly;
struct MTexPoly;
@@ -52,6 +54,50 @@ struct Material;
struct Mesh;
struct Multires;
+#
+#
+typedef struct EditMeshData {
+ /** when set, \a vertexNos, polyNos are lazy initialized */
+ const float (*vertexCos)[3];
+
+ /** lazy initialize (when \a vertexCos is set) */
+ float const (*vertexNos)[3];
+ float const (*polyNos)[3];
+ /** also lazy init but dont depend on \a vertexCos */
+ const float (*polyCos)[3];
+} EditMeshData;
+
+
+/**
+ * \warning Typical access is done via #BKE_mesh_runtime_looptri_ensure, #BKE_mesh_runtime_looptri_len.
+ */
+struct MLoopTri_Store {
+ /* WARNING! swapping between array (ready-to-be-used data) and array_wip (where data is actually computed)
+ * shall always be protected by same lock as one used for looptris computing. */
+ struct MLoopTri *array, *array_wip;
+ int len;
+ int len_alloc;
+};
+
+/* not saved in file! */
+typedef struct Mesh_Runtime {
+ struct EditMeshData *edit_data;
+ void *batch_cache;
+
+ int64_t cd_dirty_vert;
+ int64_t cd_dirty_edge;
+ int64_t cd_dirty_loop;
+ int64_t cd_dirty_poly;
+
+ struct MLoopTri_Store looptris;
+
+ /** 'BVHCache', for 'BKE_bvhutil.c' */
+ struct LinkNode *bvh_cache;
+
+ int deformed_only; /* set by modifier stack if only deformed from original */
+ char padding[4];
+} Mesh_Runtime;
+
typedef struct Mesh {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -66,7 +112,6 @@ typedef struct Mesh {
/* BMESH ONLY */
/*new face structures*/
struct MPoly *mpoly;
- struct MTexPoly *mtpoly;
struct MLoop *mloop;
struct MLoopUV *mloopuv;
struct MLoopCol *mloopcol;
@@ -127,6 +172,8 @@ typedef struct Mesh {
short totcol;
struct Multires *mr DNA_DEPRECATED; /* deprecated multiresolution modeling data, only keep for loading old files */
+
+ Mesh_Runtime runtime;
} Mesh;
/* deprecated by MTFace, only here for file reading */
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 8bb711339f7..6d38fe22ea1 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -186,22 +186,9 @@ typedef struct MVertTri {
unsigned int tri[3];
} MVertTri;
-
-typedef struct MTexPoly {
- struct Image *tpage;
- char flag, transp;
- short mode, tile, pad;
-} MTexPoly;
-
-/* can copy from/to MTexPoly/MTFace */
-#define ME_MTEXFACE_CPY(dst, src) \
-{ \
- (dst)->tpage = (src)->tpage; \
- (dst)->flag = (src)->flag; \
- (dst)->transp = (src)->transp; \
- (dst)->mode = (src)->mode; \
- (dst)->tile = (src)->tile; \
-} (void)0
+//typedef struct MTexPoly {
+// void *pad;
+//} MTexPoly;
typedef struct MLoopUV {
float uv[2];
@@ -256,9 +243,6 @@ typedef struct MSelect {
/*tessellation uv face data*/
typedef struct MTFace {
float uv[4][2];
- struct Image *tpage;
- char flag, transp;
- short mode, tile, unwrap;
} MTFace;
/*Custom Data Properties*/
@@ -463,58 +447,4 @@ enum {
ME_FSEL = 2,
};
-/* mtface->flag */
-enum {
- // TF_SELECT = (1 << 0), /* use MFace hide flag (after 2.43), should be able to reuse after 2.44 */
- // TF_ACTIVE = (1 << 1), /* deprecated! */
- TF_SEL1 = (1 << 2),
- TF_SEL2 = (1 << 3),
- TF_SEL3 = (1 << 4),
- TF_SEL4 = (1 << 5),
-};
-
-/* mtface->mode */
-enum {
- TF_DYNAMIC = (1 << 0),
- TF_ALPHASORT = (1 << 1),
- TF_TEX = (1 << 2),
- TF_SHAREDVERT = (1 << 3),
- TF_LIGHT = (1 << 4),
-
- TF_CONVERTED = (1 << 5), /* tface converted to material */
-
- TF_SHAREDCOL = (1 << 6),
- // TF_TILES = (1 << 7), /* deprecated */
- TF_BILLBOARD = (1 << 8),
- TF_TWOSIDE = (1 << 9),
- TF_INVISIBLE = (1 << 10),
-
- TF_OBCOL = (1 << 11),
- TF_BILLBOARD2 = (1 << 12), /* with Z axis constraint */
- TF_SHADOW = (1 << 13),
- TF_BMFONT = (1 << 14),
-};
-
-/* mtface->transp, values 1-4 are used as flags in the GL, WARNING, TF_SUB cant work with this */
-enum {
- TF_SOLID = 0,
- TF_ADD = (1 << 0),
- TF_ALPHA = (1 << 1),
- TF_CLIP = (1 << 2), /* clipmap alpha/binary alpha all or nothing! */
-
- TF_SUB = 3, /* sub is not available in the user interface anymore */
-};
-
-/* mtface->unwrap */
-enum {
- TF_DEPRECATED1 = (1 << 0),
- TF_DEPRECATED2 = (1 << 1),
- TF_DEPRECATED3 = (1 << 2),
- TF_DEPRECATED4 = (1 << 3),
- TF_PIN1 = (1 << 4),
- TF_PIN2 = (1 << 5),
- TF_PIN3 = (1 << 6),
- TF_PIN4 = (1 << 7),
-};
-
#endif /* __DNA_MESHDATA_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
index 68d16700a73..fade313e29e 100644
--- a/source/blender/makesdna/DNA_meta_types.h
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -59,7 +59,6 @@ typedef struct MetaElem {
float len; /* old, only used for backwards compat. use dimensions now */
float *mat, *imat; /* matrix and inverted matrix */
-
} MetaElem;
typedef struct MetaBall {
@@ -93,6 +92,8 @@ typedef struct MetaBall {
/* used in editmode */
/*ListBase edit_elems;*/
MetaElem *lastelem;
+
+ void *batch_cache;
} MetaBall;
/* **************** METABALL ********************* */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 258acbab31a..4371172f236 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -32,6 +32,8 @@
* (ONLY ADD NEW ITEMS AT THE END)
*/
+struct Mesh;
+
typedef enum ModifierType {
eModifierType_None = 0,
eModifierType_Subsurf = 1,
@@ -105,7 +107,9 @@ typedef struct ModifierData {
struct ModifierData *next, *prev;
int type, mode;
- int stackindex, pad;
+ int stackindex;
+ short flag;
+ short pad;
char name[64]; /* MAX_NAME */
/* XXX for timing info set by caller... solve later? (ton) */
@@ -115,6 +119,11 @@ typedef struct ModifierData {
} ModifierData;
typedef enum {
+ /* This modifier has been inserted in local override, and hence can be fully edited. */
+ eModifierFlag_StaticOverride_Local = (1 << 0),
+} ModifierFlag;
+
+typedef enum {
eSubsurfModifierFlag_Incremental = (1 << 0),
eSubsurfModifierFlag_DebugIncr = (1 << 1),
eSubsurfModifierFlag_ControlEdges = (1 << 2),
@@ -419,8 +428,7 @@ typedef struct UVProjectModifierData {
/* the objects which do the projecting */
struct Object *projectors[10]; /* MOD_UVPROJECT_MAXPROJECTORS */
- struct Image *image; /* the image to project */
- int flags;
+ int pad2;
int num_projectors;
float aspectx, aspecty;
float scalex, scaley;
@@ -599,7 +607,7 @@ typedef struct SoftbodyModifierData {
typedef struct ClothModifierData {
ModifierData modifier;
- struct Scene *scene; /* the context, time etc is here */
+ struct Scene *scene; /* the context is here */
struct Cloth *clothObject; /* The internal data structure for cloth. */
struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
@@ -643,7 +651,7 @@ typedef struct SurfaceModifierData {
struct MVert *x; /* old position */
struct MVert *v; /* velocity */
- struct DerivedMesh *dm;
+ struct Mesh *mesh;
struct BVHTreeFromMesh *bvhtree; /* bounding volume hierarchy of the mesh faces */
@@ -712,7 +720,7 @@ typedef struct MeshDeformModifierData {
float *bindcos; /* deprecated storage of cage coords */
/* runtime */
- void (*bindfunc)(struct Scene *scene, struct MeshDeformModifierData *mmd, struct DerivedMesh *cagedm,
+ void (*bindfunc)(struct Scene *scene, struct MeshDeformModifierData *mmd, struct Mesh *cagemesh,
float *vertexcos, int totvert, float cagemat[4][4]);
} MeshDeformModifierData;
@@ -730,8 +738,8 @@ typedef struct ParticleSystemModifierData {
ModifierData modifier;
struct ParticleSystem *psys;
- struct DerivedMesh *dm_final; /* Final DM - its topology may differ from orig mesh. */
- struct DerivedMesh *dm_deformed; /* Deformed-onle DM - its topology is same as orig mesh one. */
+ struct Mesh *mesh_final; /* Final Mesh - its topology may differ from orig mesh. */
+ struct Mesh *mesh_deformed; /* Deformed-only Mesh - its topology is same as orig mesh one. */
int totdmvert, totdmedge, totdmface;
short flag, pad;
} ParticleSystemModifierData;
@@ -1606,6 +1614,7 @@ typedef struct SDefVert {
typedef struct SurfaceDeformModifierData {
ModifierData modifier;
+ struct Depsgraph *depsgraph;
struct Object *target; /* bind target object */
SDefVert *verts; /* vertex bind data */
float falloff;
@@ -1616,7 +1625,9 @@ typedef struct SurfaceDeformModifierData {
/* Surface Deform modifier flags */
enum {
+ /* This indicates "do bind on next modifier evaluation" as well as "is bound". */
MOD_SDEF_BIND = (1 << 0),
+
MOD_SDEF_USES_LOOPTRI = (1 << 1),
MOD_SDEF_HAS_CONCAVE = (1 << 2),
};
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 8d3ab29a2fb..613830bac8d 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -221,8 +221,11 @@ typedef struct bNode {
* and replacing all uses with per-instance data.
*/
short preview_xsize, preview_ysize; /* reserved size of the preview rect */
- int pad2;
+ short pad2[2];
struct uiBlock *block; /* runtime during drawing */
+
+ float ssr_id; /* XXX: eevee only, id of screen space reflection layer, needs to be a float to feed GPU_uniform. */
+ float sss_id; /* XXX: eevee only, id of screen subsurface scatter layer, needs to be a float to feed GPU_uniform. */
} bNode;
/* node->flag */
@@ -650,11 +653,6 @@ typedef struct NodeTwoFloats {
float x, y;
} NodeTwoFloats;
-typedef struct NodeGeometry {
- char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
- char colname[64];
-} NodeGeometry;
-
typedef struct NodeVertexCol {
char name[64];
} NodeVertexCol;
diff --git a/source/blender/makesdna/DNA_object_enums.h b/source/blender/makesdna/DNA_object_enums.h
index 58f9e29297f..524c85948f3 100644
--- a/source/blender/makesdna/DNA_object_enums.h
+++ b/source/blender/makesdna/DNA_object_enums.h
@@ -46,4 +46,7 @@ typedef enum eObjectMode {
/* Any mode that uses Object.sculpt. */
#define OB_MODE_ALL_SCULPT (OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)
+/* Any mode that has data we need to free when switching modes, see: #ED_object_mode_generic_exit */
+#define OB_MODE_ALL_MODE_DATA (OB_MODE_EDIT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_SCULPT)
+
#endif /* __DNA_OBJECT_ENUMS_H__ */
diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h
index 47467917315..a83517e4eb4 100644
--- a/source/blender/makesdna/DNA_object_force_types.h
+++ b/source/blender/makesdna/DNA_object_force_types.h
@@ -112,11 +112,17 @@ typedef struct PartDeflect {
float f_noise; /* noise of force */
int seed; /* noise random seed */
+ /* Display Size */
+ float drawvec1[4]; /* Runtime only : start of the curve or draw scale */
+ float drawvec2[4]; /* Runtime only : end of the curve */
+ float drawvec_falloff_min[3], pad1; /* Runtime only */
+ float drawvec_falloff_max[3], pad2; /* Runtime only */
+
struct Object *f_source; /* force source object */
} PartDeflect;
typedef struct EffectorWeights {
- struct Group *group; /* only use effectors from this group of objects */
+ struct Collection *group; /* only use effectors from this group of objects */
float weight[14]; /* effector type specific weights */
float global_gravity;
@@ -212,59 +218,6 @@ typedef struct SBVertex {
float vec[4];
} SBVertex;
-typedef struct BulletSoftBody {
- int flag; /* various boolean options */
- float linStiff; /* linear stiffness 0..1 */
- float angStiff; /* angular stiffness 0..1 */
- float volume; /* volume preservation 0..1 */
-
- int viterations; /* Velocities solver iterations */
- int piterations; /* Positions solver iterations */
- int diterations; /* Drift solver iterations */
- int citerations; /* Cluster solver iterations */
-
- float kSRHR_CL; /* Soft vs rigid hardness [0,1] (cluster only) */
- float kSKHR_CL; /* Soft vs kinetic hardness [0,1] (cluster only) */
- float kSSHR_CL; /* Soft vs soft hardness [0,1] (cluster only) */
- float kSR_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */
-
- float kSK_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */
- float kSS_SPLT_CL; /* Soft vs rigid impulse split [0,1] (cluster only) */
- float kVCF; /* Velocities correction factor (Baumgarte) */
- float kDP; /* Damping coefficient [0,1] */
-
- float kDG; /* Drag coefficient [0,+inf] */
- float kLF; /* Lift coefficient [0,+inf] */
- float kPR; /* Pressure coefficient [-inf,+inf] */
- float kVC; /* Volume conversation coefficient [0,+inf] */
-
- float kDF; /* Dynamic friction coefficient [0,1] */
- float kMT; /* Pose matching coefficient [0,1] */
- float kCHR; /* Rigid contacts hardness [0,1] */
- float kKHR; /* Kinetic contacts hardness [0,1] */
-
- float kSHR; /* Soft contacts hardness [0,1] */
- float kAHR; /* Anchors hardness [0,1] */
- int collisionflags; /* Vertex/Face or Signed Distance Field(SDF) or Clusters, Soft versus Soft or Rigid */
- int numclusteriterations; /* number of iterations to refine collision clusters*/
- float welding; /* welding limit to remove duplicate/nearby vertices, 0.0..0.01 */
- float margin; /* margin specific to softbody */
-} BulletSoftBody;
-
-/* BulletSoftBody.flag */
-#define OB_BSB_SHAPE_MATCHING 2
-// #define OB_BSB_UNUSED 4
-#define OB_BSB_BENDING_CONSTRAINTS 8
-#define OB_BSB_AERO_VPOINT 16 /* aero model, Vertex normals are oriented toward velocity*/
-// #define OB_BSB_AERO_VTWOSIDE 32 /* aero model, Vertex normals are flipped to match velocity */
-
-/* BulletSoftBody.collisionflags */
-#define OB_BSB_COL_SDF_RS 2 /* SDF based rigid vs soft */
-#define OB_BSB_COL_CL_RS 4 /* Cluster based rigid vs soft */
-#define OB_BSB_COL_CL_SS 8 /* Cluster based soft vs soft */
-#define OB_BSB_COL_VF_SS 16 /* Vertex/Face based soft vs soft */
-
-
typedef struct SoftBody {
/* dynamic data */
int totpoint, totspring;
@@ -339,7 +292,7 @@ typedef struct SoftBody {
struct PointCache *pointcache;
struct ListBase ptcaches;
- struct Group *collision_group;
+ struct Collection *collision_group;
struct EffectorWeights *effector_weights;
/* reverse esimated obmatrix .. no need to store in blend file .. how ever who cares */
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index e0b4d117bd1..64c67f7d325 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -67,6 +67,31 @@ typedef struct bDeformGroup {
/* need this flag for locking weights */
char flag, pad[7];
} bDeformGroup;
+
+/* Face Maps*/
+typedef struct bFaceMap {
+ struct bFaceMap *next, *prev;
+ char name[64]; /* MAX_VGROUP_NAME */
+ char flag;
+ char pad[7];
+} bFaceMap;
+
+/* Object Runtime display data */
+struct ObjectEngineData;
+typedef void (*ObjectEngineDataInitCb)(struct ObjectEngineData *engine_data);
+typedef void (*ObjectEngineDataFreeCb)(struct ObjectEngineData *engine_data);
+
+#
+#
+typedef struct ObjectEngineData {
+ struct ObjectEngineData *next, *prev;
+ struct DrawEngineType *engine_type;
+ /* Only nested data, NOT the engine data itself. */
+ ObjectEngineDataFreeCb free;
+ /* Accumulated recalc flags, which corresponds to ID->recalc flags. */
+ int recalc;
+} ObjectEngineData;
+
#define MAX_VGROUP_NAME 64
/* bDeformGroup->flag */
@@ -114,6 +139,10 @@ typedef struct LodLevel {
int obhysteresis;
} LodLevel;
+typedef struct ObjectDisplay {
+ int flag;
+} ObjectDisplay;
+
typedef struct Object {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -145,9 +174,10 @@ typedef struct Object {
ListBase effect DNA_DEPRECATED; // XXX deprecated... keep for readfile
ListBase defbase; /* list of bDeformGroup (vertex groups) names and flag only */
ListBase modifiers; /* list of ModifierData structures */
+ ListBase fmaps; /* list of facemaps */
int mode; /* Local object mode */
- int restore_mode; /* Keep track of what mode to return to after toggling a mode */
+ int restore_mode;
/* materials */
struct Material **mat; /* material slots */
@@ -186,47 +216,18 @@ typedef struct Object {
short transflag, protectflag; /* transformation settings and transform locks */
short trackflag, upflag;
short nlaflag; /* used for DopeSheet filtering settings (expanded/collapsed) */
- short scaflag; /* ui state for game logic */
- char scavisflag; /* more display settings for game logic */
- char depsflag;
+ short pad[2];
/* did last modifier stack generation need mapping support? */
char lastNeedMapping; /* bool */
- char pad;
+ char duplicator_visibility_flag;
/* dupli-frame settings */
int dupon, dupoff, dupsta, dupend;
- /* during realtime */
-
- /* note that inertia is only called inertia for historical reasons
- * and is not changed to avoid DNA surgery. It actually reflects the
- * Size value in the GameButtons (= radius) */
-
- float mass, damping, inertia;
- /* The form factor k is introduced to give the user more control
- * and to fix incompatibility problems.
- * For rotational symmetric objects, the inertia value can be
- * expressed as: Theta = k * m * r^2
- * where m = Mass, r = Radius
- * For a Sphere, the form factor is by default = 0.4
- */
-
- float formfactor;
- float rdamping;
- float margin;
- float max_vel; /* clamp the maximum velocity 0.0 is disabled */
- float min_vel; /* clamp the minimum velocity 0.0 is disabled */
- float max_angvel; /* clamp the maximum angular velocity, 0.0 is disabled */
- float min_angvel; /* clamp the minimum angular velocity, 0.0 is disabled */
- float obstacleRad;
-
- /* "Character" physics properties */
- float step_height;
- float jump_speed;
- float fall_speed;
- unsigned char max_jumps;
- char pad2[3];
+ /* Depsgraph */
+ short base_flag; /* used by depsgraph, flushed from base */
+ short pad8;
/** Collision mask settings */
unsigned short col_group, col_mask;
@@ -241,67 +242,71 @@ typedef struct Object {
char empty_drawtype;
float empty_drawsize;
float dupfacesca; /* dupliface scale */
-
- ListBase prop; /* game logic property list (not to be confused with IDProperties) */
- ListBase sensors; /* game logic sensors */
- ListBase controllers; /* game logic controllers */
- ListBase actuators; /* game logic actuators */
float sf; /* sf is time-offset */
short index; /* custom index, for renderpasses */
unsigned short actdef; /* current deformation group, note: index starts at 1 */
+ unsigned short actfmap; /* current face map, note: index starts at 1 */
+ unsigned char pad5[6];
float col[4]; /* object color */
- int gameflag;
- int gameflag2;
-
char restrictflag; /* for restricting view, select, render etc. accessible in outliner */
- char recalc; /* dependency flag */
+ char pad3;
short softflag; /* softbody settings */
- float anisotropicFriction[3];
+ int pad2;
ListBase constraints; /* object constraints */
ListBase nlastrips DNA_DEPRECATED; // XXX deprecated... old animation system
ListBase hooks DNA_DEPRECATED; // XXX deprecated... old animation system
ListBase particlesystem; /* particle systems */
- struct BulletSoftBody *bsoft; /* settings for game engine bullet soft body */
struct PartDeflect *pd; /* particle deflector/attractor/collision data */
struct SoftBody *soft; /* if exists, saved in file */
- struct Group *dup_group; /* object duplicator for group */
+ struct Collection *dup_group; /* object duplicator for group */
+ void *pad10;
- char body_type; /* for now used to temporarily holds the type of collision object */
+ char pad4;
char shapeflag; /* flag for pinning */
short shapenr; /* current shape key for menu or pinned */
float smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */
struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */
- /* Runtime valuated curve-specific data, not stored in the file */
- struct CurveCache *curve_cache;
-
struct DerivedMesh *derivedDeform, *derivedFinal;
+ void *pad7;
uint64_t lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
uint64_t customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */
- unsigned int state; /* bit masks of game controllers that are active */
- unsigned int init_state; /* bit masks of initial state as recorded by the users */
+
+ /* Runtime valuated curve-specific data, not stored in the file */
+ struct CurveCache *curve_cache;
ListBase gpulamp; /* runtime, for glsl lamp display only */
ListBase pc_ids;
- ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */
struct RigidBodyOb *rigidbody_object; /* settings for Bullet rigid body */
struct RigidBodyCon *rigidbody_constraint; /* settings for Bullet constraint */
float ima_ofs[2]; /* offset for image empties */
ImageUser *iuser; /* must be non-null when oject is an empty image */
- void *pad3;
ListBase lodlevels; /* contains data for levels of detail */
LodLevel *currentlod;
struct PreviewImage *preview;
+
+ ListBase drawdata; /* runtime, ObjectEngineData */
+ int pad6;
+ int select_color;
+
+ /* Mesh structure created during object evaluation.
+ * It has all modifiers applied.
+ */
+ struct Mesh *mesh_evaluated;
+
+ /* Object Display */
+ struct ObjectDisplay display;
+ int pad9;
} Object;
/* Warning, this is not used anymore because hooks are now modifiers */
@@ -360,6 +365,7 @@ enum {
OB_CAMERA = 11,
OB_SPEAKER = 12,
+ OB_LIGHTPROBE = 13,
/* OB_WAVE = 21, */
OB_LATTICE = 22,
@@ -368,6 +374,11 @@ enum {
OB_ARMATURE = 25,
};
+/* ObjectDisplay.flag */
+enum {
+ OB_SHOW_SHADOW = (1 << 0),
+};
+
/* check if the object type supports materials */
#define OB_TYPE_SUPPORT_MATERIAL(_type) \
((_type) >= OB_MESH && (_type) <= OB_MBALL)
@@ -380,10 +391,10 @@ enum {
/* is this ID type used as object data */
#define OB_DATA_SUPPORT_ID(_id_type) \
- (ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_CA, ID_LT, ID_AR))
+ (ELEM(_id_type, ID_ME, ID_CU, ID_MB, ID_LA, ID_SPK, ID_LP, ID_CA, ID_LT, ID_AR))
#define OB_DATA_SUPPORT_ID_CASE \
- ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_CA: case ID_LT: case ID_AR
+ ID_ME: case ID_CU: case ID_MB: case ID_LA: case ID_SPK: case ID_LP: case ID_CA: case ID_LT: case ID_AR
/* partype: first 4 bits: type */
enum {
@@ -412,7 +423,7 @@ enum {
OB_DUPLIROT = 1 << 5,
OB_DUPLINOSPEED = 1 << 6,
OB_DUPLICALCDERIVED = 1 << 7, /* runtime, calculate derivedmesh for dupli before it's used */
- OB_DUPLIGROUP = 1 << 8,
+ OB_DUPLICOLLECTION = 1 << 8,
OB_DUPLIFACES = 1 << 9,
OB_DUPLIFACES_SCALE = 1 << 10,
OB_DUPLIPARTS = 1 << 11,
@@ -420,7 +431,7 @@ enum {
OB_NO_CONSTRAINTS = 1 << 13, /* runtime constraints disable */
OB_NO_PSYS_UPDATE = 1 << 14, /* hack to work around particle issue */
- OB_DUPLI = OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLIGROUP | OB_DUPLIFACES | OB_DUPLIPARTS,
+ OB_DUPLI = OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLICOLLECTION | OB_DUPLIFACES | OB_DUPLIPARTS,
};
/* (short) trackflag / upflag */
@@ -433,8 +444,6 @@ enum {
OB_NEGZ = 5,
};
-/* gameflag in game.h */
-
/* dt: no flags */
enum {
OB_BOUNDBOX = 1,
@@ -443,8 +452,6 @@ enum {
OB_MATERIAL = 4,
OB_TEXTURE = 5,
OB_RENDER = 6,
-
- OB_PAINT = 100, /* temporary used in draw code */
};
/* dtx: flags (short) */
@@ -515,16 +522,10 @@ enum {
#define BA_TRANSFORM_CHILD (1 << 8) /* child of a transformed object */
#define BA_TRANSFORM_PARENT (1 << 13) /* parent of a transformed object */
-
-/* an initial attempt as making selection more specific! */
-#define BA_DESELECT 0
-#define BA_SELECT 1
-
-
#define OB_FROMDUPLI (1 << 9)
#define OB_DONE (1 << 10) /* unknown state, clear before use */
/* #define OB_RADIO (1 << 11) */ /* deprecated */
-#define OB_FROMGROUP (1 << 12)
+/* #define OB_FROMGROUP (1 << 12) */ /* deprecated */
/* WARNING - when adding flags check on PSYS_RECALC */
/* ob->recalc (flag bits!) */
@@ -543,90 +544,6 @@ enum {
/* collision masks */
#define OB_MAX_COL_MASKS 16
-/* ob->gameflag */
-enum {
- OB_DYNAMIC = 1 << 0,
- OB_CHILD = 1 << 1,
- OB_ACTOR = 1 << 2,
- OB_INERTIA_LOCK_X = 1 << 3,
- OB_INERTIA_LOCK_Y = 1 << 4,
- OB_INERTIA_LOCK_Z = 1 << 5,
- OB_DO_FH = 1 << 6,
- OB_ROT_FH = 1 << 7,
- OB_ANISOTROPIC_FRICTION = 1 << 8,
- OB_GHOST = 1 << 9,
- OB_RIGID_BODY = 1 << 10,
- OB_BOUNDS = 1 << 11,
-
- OB_COLLISION_RESPONSE = 1 << 12,
- OB_SECTOR = 1 << 13,
- OB_PROP = 1 << 14,
- OB_MAINACTOR = 1 << 15,
-
- OB_COLLISION = 1 << 16,
- OB_SOFT_BODY = 1 << 17,
- OB_OCCLUDER = 1 << 18,
- OB_SENSOR = 1 << 19,
- OB_NAVMESH = 1 << 20,
- OB_HASOBSTACLE = 1 << 21,
- OB_CHARACTER = 1 << 22,
-
- OB_RECORD_ANIMATION = 1 << 23,
-};
-
-/* ob->gameflag2 */
-enum {
- OB_NEVER_DO_ACTIVITY_CULLING = 1 << 0,
- OB_LOCK_RIGID_BODY_X_AXIS = 1 << 2,
- OB_LOCK_RIGID_BODY_Y_AXIS = 1 << 3,
- OB_LOCK_RIGID_BODY_Z_AXIS = 1 << 4,
- OB_LOCK_RIGID_BODY_X_ROT_AXIS = 1 << 5,
- OB_LOCK_RIGID_BODY_Y_ROT_AXIS = 1 << 6,
- OB_LOCK_RIGID_BODY_Z_ROT_AXIS = 1 << 7,
-
-/* OB_LIFE = OB_PROP | OB_DYNAMIC | OB_ACTOR | OB_MAINACTOR | OB_CHILD, */
-};
-
-/* ob->body_type */
-enum {
- OB_BODY_TYPE_NO_COLLISION = 0,
- OB_BODY_TYPE_STATIC = 1,
- OB_BODY_TYPE_DYNAMIC = 2,
- OB_BODY_TYPE_RIGID = 3,
- OB_BODY_TYPE_SOFT = 4,
- OB_BODY_TYPE_OCCLUDER = 5,
- OB_BODY_TYPE_SENSOR = 6,
- OB_BODY_TYPE_NAVMESH = 7,
- OB_BODY_TYPE_CHARACTER = 8,
-};
-
-/* ob->depsflag */
-enum {
- OB_DEPS_EXTRA_OB_RECALC = 1 << 0,
- OB_DEPS_EXTRA_DATA_RECALC = 1 << 1,
-};
-
-/* ob->scavisflag */
-enum {
- OB_VIS_SENS = 1 << 0,
- OB_VIS_CONT = 1 << 1,
- OB_VIS_ACT = 1 << 2,
-};
-
-/* ob->scaflag */
-enum {
- OB_SHOWSENS = 1 << 6,
- OB_SHOWACT = 1 << 7,
- OB_ADDSENS = 1 << 8,
- OB_ADDCONT = 1 << 9,
- OB_ADDACT = 1 << 10,
- OB_SHOWCONT = 1 << 11,
- OB_ALLSTATE = 1 << 12,
- OB_INITSTBIT = 1 << 13,
- OB_DEBUGSTATE = 1 << 14,
- OB_SHOWSTATE = 1 << 15,
-};
-
/* ob->restrictflag */
enum {
OB_RESTRICT_VIEW = 1 << 0,
@@ -673,7 +590,13 @@ enum {
OB_LOCK_ROTW = 1 << 9,
OB_LOCK_ROT4D = 1 << 10,
};
-
+
+/* ob->duplicator_visibility_flag */
+enum {
+ OB_DUPLI_FLAG_VIEWPORT = 1 << 0,
+ OB_DUPLI_FLAG_RENDER = 1 << 1,
+};
+
#define MAX_DUPLI_RECUR 8
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h
index 984e3334414..d775061d85a 100644
--- a/source/blender/makesdna/DNA_outliner_types.h
+++ b/source/blender/makesdna/DNA_outliner_types.h
@@ -38,6 +38,9 @@ struct ID;
typedef struct TreeStoreElem {
short type, nr, flag, used;
+
+ /* XXX We actually also store non-ID data in this pointer for identifying
+ * the TreeStoreElem for a TreeElement when rebuilding the tree. Ugly! */
struct ID *id;
} TreeStoreElem;
@@ -50,11 +53,14 @@ typedef struct TreeStore {
} TreeStore;
/* TreeStoreElem->flag */
-#define TSE_CLOSED 1
-#define TSE_SELECTED 2
-#define TSE_TEXTBUT 4
-#define TSE_CHILDSEARCH 8
-#define TSE_SEARCHMATCH 16
+enum {
+ TSE_CLOSED = (1 << 0),
+ TSE_SELECTED = (1 << 1),
+ TSE_TEXTBUT = (1 << 2),
+ TSE_CHILDSEARCH = (1 << 3),
+ TSE_SEARCHMATCH = (1 << 4),
+ TSE_HIGHLIGHTED = (1 << 5),
+};
/* TreeStoreElem->types */
#define TSE_NLA 1 /* NO ID */
@@ -78,7 +84,7 @@ typedef struct TreeStore {
#define TSE_PROXY 18
#define TSE_R_LAYER_BASE 19
#define TSE_R_LAYER 20
-#define TSE_R_PASS 21
+/* #define TSE_R_PASS 21 */ /* UNUSED */
#define TSE_LINKED_MAT 22
/* NOTE, is used for light group */
#define TSE_LINKED_LAMP 23
@@ -96,6 +102,10 @@ typedef struct TreeStore {
#define TSE_KEYMAP_ITEM 35 /* NO ID */
#define TSE_ID_BASE 36 /* NO ID */
#define TSE_GP_LAYER 37 /* NO ID */
+#define TSE_LAYER_COLLECTION 38
+#define TSE_SCENE_COLLECTION_BASE 39
+#define TSE_VIEW_COLLECTION_BASE 40
+#define TSE_SCENE_OBJECTS_BASE 41
/* Check whether given TreeStoreElem should have a real ID in its ->id member. */
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 9dbd1a18703..583b8504524 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -160,14 +160,15 @@ typedef struct ParticleSettings {
struct SPHFluidSettings *fluid;
struct EffectorWeights *effector_weights;
- struct Group *collision_group;
+ struct Collection *collision_group;
int flag, rt;
short type, from, distr, texact;
/* physics modes */
short phystype, rotmode, avemode, reactevent;
- int draw, pad1;
- short draw_as, draw_size, childtype, pad2;
+ int draw;
+ float draw_size;
+ short draw_as, pad1, childtype, pad2;
short ren_as, subframes, draw_col;
/* number of path segments, power of 2 except */
short draw_step, ren_step;
@@ -187,11 +188,6 @@ typedef struct ParticleSettings {
/* draw color */
float color_vec_max;
- /* simplification */
- short simplify_flag, simplify_refsize;
- float simplify_rate, simplify_transition;
- float simplify_viewport;
-
/* time and emission */
float sta, end, lifetime, randlife;
float timetweak, courant_target;
@@ -248,9 +244,9 @@ typedef struct ParticleSettings {
struct MTex *mtex[18]; /* MAX_MTEX */
- struct Group *dup_group;
+ struct Collection *dup_group;
struct ListBase dupliweights;
- struct Group *eff_group DNA_DEPRECATED; // deprecated
+ struct Collection *eff_group DNA_DEPRECATED; // deprecated
struct Object *dup_ob;
struct Object *bb_ob;
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
@@ -259,7 +255,9 @@ typedef struct ParticleSettings {
/* modified dm support */
short use_modifier_stack;
- short pad5[3];
+
+ short pad5;
+ int pad8;
float twist;
float pad6;
@@ -286,7 +284,7 @@ typedef struct ParticleSystem {
ListBase pathcachebufs, childcachebufs; /* buffers for the above */
struct ClothModifierData *clmd; /* cloth simulation for hair */
- struct DerivedMesh *hair_in_dm, *hair_out_dm; /* input/output for cloth simulation */
+ struct Mesh *hair_in_mesh, *hair_out_mesh; /* input/output for cloth simulation */
struct Object *target_ob;
@@ -310,9 +308,6 @@ typedef struct ParticleSystem {
short vgroup[13], vg_neg, rt3; /* vertex groups, 0==disable, 1==starting index */
char pad[6];
- /* temporary storage during render */
- struct ParticleRenderData *renderdata;
-
/* point cache */
struct PointCache *pointcache;
struct ListBase ptcaches;
@@ -329,6 +324,17 @@ typedef struct ParticleSystem {
float dt_frac; /* current time step, as a fraction of a frame */
float lattice_strength; /* influence of the lattice modifier */
+
+ void *batch_cache;
+
+ /* Set by dependency graph's copy-on-write, allows to quickly go
+ * from evaluated particle system to original one.
+ *
+ * Original system will have this set to NULL.
+ *
+ * Use psys_orig_get() function to access,
+ */
+ struct ParticleSystem *orig_psys;
} ParticleSystem;
typedef enum eParticleDrawFlag {
diff --git a/source/blender/makesdna/DNA_property_types.h b/source/blender/makesdna/DNA_property_types.h
deleted file mode 100644
index 77cd7c3e102..00000000000
--- a/source/blender/makesdna/DNA_property_types.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file DNA_property_types.h
- * \ingroup DNA
- * \since mar-2001
- * \author nzc
- * \attention Renderrecipe and scene decription. The fact that there is a
- * hierarchy here is a bit strange, and not desirable.
- *
- * #bProperty type is specifically for use by Objects game-logic.
- */
-
-#ifndef __DNA_PROPERTY_TYPES_H__
-#define __DNA_PROPERTY_TYPES_H__
-
-/* ********************* PROPERTY ************************ */
-
-typedef struct bProperty {
- struct bProperty *next, *prev;
- char name[64]; /* MAX_NAME */
- short type, flag;
- int data; /* data should be 4 bytes to store int,float stuff */
- void *poin; /* references data unless its a string which is malloc'd */
-
-} bProperty;
-
-/* property->type XXX Game Property, not RNA */
-#define GPROP_BOOL 0
-#define GPROP_INT 1
-#define GPROP_FLOAT 2
-#define GPROP_STRING 3
-// #define GPROP_VECTOR 4 // UNUSED
-#define GPROP_TIME 5
-
-/* property->flag */
-#define PROP_DEBUG 1
-
-#define MAX_PROPSTRING 128
-
-#endif /* __DNA_PROPERTY_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h
index 381ee5d40e5..42286044970 100644
--- a/source/blender/makesdna/DNA_rigidbody_types.h
+++ b/source/blender/makesdna/DNA_rigidbody_types.h
@@ -35,7 +35,7 @@
#include "DNA_listBase.h"
-struct Group;
+struct Collection;
struct EffectorWeights;
@@ -50,10 +50,10 @@ typedef struct RigidBodyWorld {
/* Sim World Settings ------------------------------------------------------------- */
struct EffectorWeights *effector_weights; /* effectors info */
- struct Group *group; /* Group containing objects to use for Rigid Bodies */
+ struct Collection *group; /* Group containing objects to use for Rigid Bodies */
struct Object **objects; /* Array to access group objects by index, only used at runtime */
- struct Group *constraints; /* Group containing objects to use for Rigid Body Constraints*/
+ struct Collection *constraints; /* Group containing objects to use for Rigid Body Constraints*/
int pad;
float ltime; /* last frame world was evaluated for (internal) */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index d2b71c727c5..96876e0d0bc 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -47,7 +47,11 @@ extern "C" {
#include "DNA_ID.h"
#include "DNA_freestyle_types.h"
#include "DNA_gpu_types.h"
+#include "DNA_group_types.h"
+#include "DNA_layer_types.h"
+#include "DNA_material_types.h"
#include "DNA_userdef_types.h"
+#include "DNA_view3d_types.h"
struct CurveMapping;
struct Object;
@@ -55,7 +59,7 @@ struct Brush;
struct World;
struct Scene;
struct Image;
-struct Group;
+struct Collection;
struct Text;
struct bNodeTree;
struct AnimData;
@@ -65,19 +69,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 */
@@ -189,27 +185,25 @@ 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. */
/* pass_xor has to be after passflag */
- /* note, this is treestore element 'nr' in outliner, short still... */
- int 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;
/* SceneRenderLayer.layflag */
@@ -439,7 +433,7 @@ typedef struct ImageFormatData {
#define R_IMF_IMTYPE_TIFF 22
#define R_IMF_IMTYPE_OPENEXR 23
#define R_IMF_IMTYPE_FFMPEG 24
-#define R_IMF_IMTYPE_FRAMESERVER 25
+/* #define R_IMF_IMTYPE_FRAMESERVER 25 */ /* frame server is nomore */
#define R_IMF_IMTYPE_CINEON 26
#define R_IMF_IMTYPE_DPX 27
#define R_IMF_IMTYPE_MULTILAYER 28
@@ -555,6 +549,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 */
@@ -573,29 +573,14 @@ typedef struct RenderData {
float framelen, blurfac;
- /** For UR edge rendering: give the edges this color */
- float edgeR, edgeG, edgeB;
-
-
- /* standalone player */ // XXX deprecated since 2.5
- short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED;
- short freqplay DNA_DEPRECATED;
- /* standalone player */ // XXX deprecated since 2.5
- short depth DNA_DEPRECATED, attrib DNA_DEPRECATED;
-
-
int frame_step; /* frames to jump during render/playback */
short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5
short dimensionspreset; /* for the dimensions presets menu */
- short filtertype; /* filter is box, tent, gauss, mitch, etc */
-
short size; /* size in % */
- short maximsize DNA_DEPRECATED; /* max in Kb */
-
short pad6;
/* from buttons: */
@@ -609,15 +594,6 @@ typedef struct RenderData {
int ysch;
/**
- * The number of part to use in the x direction
- */
- short xparts DNA_DEPRECATED;
- /**
- * The number of part to use in the y direction
- */
- short yparts DNA_DEPRECATED;
-
- /**
* render tile dimensions
*/
int tilex, tiley;
@@ -642,22 +618,6 @@ typedef struct RenderData {
int mode;
/**
- * Flags for raytrace settings. Use bit-masking to access the settings.
- */
- int raytrace_options;
-
- /**
- * Raytrace acceleration structure
- */
- short raytrace_structure;
-
- short pad1;
-
- /* octree resolution */
- short ocres;
- short pad4;
-
- /**
* What to do with the sky/background. Picks sky/premul/key
* blending for the background
*/
@@ -668,7 +628,7 @@ typedef struct RenderData {
*/
short osa;
- short frs_sec, edgeint;
+ short frs_sec, pad[7];
/* safety, border and display rect */
@@ -676,11 +636,9 @@ typedef struct RenderData {
rcti disprect;
/* information on different layers to be rendered */
- ListBase layers;
- short actlay;
-
- /* number of mblur samples */
- short mblur_samples;
+ ListBase layers DNA_DEPRECATED; /* Converted to Scene->view_layers. */
+ short actlay DNA_DEPRECATED; /* Converted to Scene->active_layer. */
+ short pad1;
/**
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
@@ -697,18 +655,13 @@ typedef struct RenderData {
/* color management settings - color profiles, gamma correction, etc */
int color_mgt_flag;
- /** post-production settings. deprecated, but here for upwards compat (initialized to 1) */
- float postgamma, posthue, postsat;
-
/* Dither noise intensity */
float dither_intensity;
/* Bake Render options */
- short bake_osa, bake_filter, bake_mode, bake_flag;
- short bake_normal_space, bake_quad_split;
- float bake_maxdist, bake_biasdist;
- short bake_samples, bake_pad;
- float bake_user_scale, bake_pad1;
+ short bake_mode, bake_flag;
+ short bake_filter, bake_samples;
+ float bake_biasdist, bake_user_scale;
/* path to render output */
char pic[1024]; /* 1024 = FILE_MAX */
@@ -731,28 +684,11 @@ typedef struct RenderData {
char pad5[5];
/* render simplify */
- int simplify_flag;
short simplify_subsurf;
short simplify_subsurf_render;
- short simplify_shadowsamples, pad9;
+ short pad9, pad10;
float simplify_particles;
float simplify_particles_render;
- float simplify_aosss;
-
- /* cineon */
- short cineonwhite DNA_DEPRECATED, cineonblack DNA_DEPRECATED; /*deprecated*/
- float cineongamma DNA_DEPRECATED; /*deprecated*/
-
- /* jpeg2000 */
- short jp2_preset DNA_DEPRECATED, jp2_depth DNA_DEPRECATED; /*deprecated*/
- int rpad3;
-
- /* Dome variables */ // XXX deprecated since 2.5
- short domeres DNA_DEPRECATED, domemode DNA_DEPRECATED; // XXX deprecated since 2.5
- short domeangle DNA_DEPRECATED, dometilt DNA_DEPRECATED; // XXX deprecated since 2.5
- float domeresbuf DNA_DEPRECATED; // XXX deprecated since 2.5
- float pad2;
- struct Text *dometext DNA_DEPRECATED; // XXX deprecated since 2.5
/* Freestyle line thickness options */
int line_thickness_mode;
@@ -760,6 +696,7 @@ typedef struct RenderData {
/* render engine */
char engine[32];
+ int pad2;
/* Cycles baking */
struct BakeData bake;
@@ -799,180 +736,6 @@ typedef struct RenderProfile {
} RenderProfile;
-/* *************************************************************** */
-/* Game Engine - Dome */
-
-typedef struct GameDome {
- short res, mode;
- short angle, tilt;
- float resbuf, pad2;
- struct Text *warptext;
-} GameDome;
-
-/* GameDome.mode */
-#define DOME_FISHEYE 1
-#define DOME_TRUNCATED_FRONT 2
-#define DOME_TRUNCATED_REAR 3
-#define DOME_ENVMAP 4
-#define DOME_PANORAM_SPH 5
-#define DOME_NUM_MODES 6
-
-/* *************************************************************** */
-/* Game Engine */
-
-typedef struct GameFraming {
- float col[3];
- char type, pad1, pad2, pad3;
-} GameFraming;
-
-/* GameFraming.type */
-#define SCE_GAMEFRAMING_BARS 0
-#define SCE_GAMEFRAMING_EXTEND 1
-#define SCE_GAMEFRAMING_SCALE 2
-
-typedef struct RecastData {
- float cellsize;
- float cellheight;
- float agentmaxslope;
- float agentmaxclimb;
- float agentheight;
- float agentradius;
- float edgemaxlen;
- float edgemaxerror;
- float regionminsize;
- float regionmergesize;
- int vertsperpoly;
- float detailsampledist;
- float detailsamplemaxerror;
- char partitioning;
- char pad1;
- short pad2;
-} RecastData;
-
-/* RecastData.partitioning */
-#define RC_PARTITION_WATERSHED 0
-#define RC_PARTITION_MONOTONE 1
-#define RC_PARTITION_LAYERS 2
-
-typedef struct GameData {
-
- /* standalone player */
- struct GameFraming framing;
- short playerflag, xplay, yplay, freqplay;
- short depth, attrib, rt1, rt2;
- short aasamples, pad4[3];
-
- /* stereo/dome mode */
- struct GameDome dome;
- short stereoflag, stereomode;
- float eyeseparation;
- RecastData recastData;
-
-
- /* physics (it was in world)*/
- float gravity; /*Gravitation constant for the game world*/
-
- /*
- * Radius of the activity bubble, in Manhattan length. Objects
- * outside the box are activity-culled. */
- float activityBoxRadius;
-
- /*
- * bit 3: (gameengine): Activity culling is enabled.
- * bit 5: (gameengine) : enable Bullet DBVT tree for view frustum culling
- */
- int flag;
- short mode, matmode;
- short occlusionRes; /* resolution of occlusion Z buffer in pixel */
- short physicsEngine;
- short exitkey;
- short vsync; /* Controls vsync: off, on, or adaptive (if supported) */
- short ticrate, maxlogicstep, physubstep, maxphystep;
- short obstacleSimulation;
- short raster_storage;
- float levelHeight;
- float deactivationtime, lineardeactthreshold, angulardeactthreshold;
-
- /* Scene LoD */
- short lodflag, pad2;
- int scehysteresis, pad5;
-
-} GameData;
-
-/* GameData.stereoflag */
-#define STEREO_NOSTEREO 1
-#define STEREO_ENABLED 2
-#define STEREO_DOME 3
-
-/* GameData.stereomode */
-//#define STEREO_NOSTEREO 1
-#define STEREO_QUADBUFFERED 2
-#define STEREO_ABOVEBELOW 3
-#define STEREO_INTERLACED 4
-#define STEREO_ANAGLYPH 5
-#define STEREO_SIDEBYSIDE 6
-#define STEREO_VINTERLACE 7
-//#define STEREO_DOME 8
-#define STEREO_3DTVTOPBOTTOM 9
-
-/* GameData.physicsEngine */
-#define WOPHY_NONE 0
-#define WOPHY_BULLET 5
-
-/* obstacleSimulation */
-#define OBSTSIMULATION_NONE 0
-#define OBSTSIMULATION_TOI_rays 1
-#define OBSTSIMULATION_TOI_cells 2
-
-/* GameData.raster_storage */
-#define RAS_STORE_AUTO 0
-/* #define RAS_STORE_IMMEDIATE 1 */ /* DEPRECATED */
-#define RAS_STORE_VA 2
-#define RAS_STORE_VBO 3
-
-/* GameData.vsync */
-#define VSYNC_ON 0
-#define VSYNC_OFF 1
-#define VSYNC_ADAPTIVE 2
-
-/* GameData.flag */
-#define GAME_RESTRICT_ANIM_UPDATES (1 << 0)
-#define GAME_ENABLE_ALL_FRAMES (1 << 1)
-#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_GLSL_NO_LIGHTS (1 << 6)
-#define GAME_GLSL_NO_SHADERS (1 << 7)
-#define GAME_GLSL_NO_SHADOWS (1 << 8)
-#define GAME_GLSL_NO_RAMPS (1 << 9)
-#define GAME_GLSL_NO_NODES (1 << 10)
-#define GAME_GLSL_NO_EXTRA_TEX (1 << 11)
-#define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
-#define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
-#define GAME_SHOW_MOUSE (1 << 14)
-#define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15)
-#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 16)
-#define GAME_NO_MATERIAL_CACHING (1 << 17)
-#define GAME_GLSL_NO_ENV_LIGHTING (1 << 18)
-/* Note: GameData.flag is now an int (max 32 flags). A short could only take 16 flags */
-
-/* GameData.playerflag */
-#define GAME_PLAYER_FULLSCREEN (1 << 0)
-#define GAME_PLAYER_DESKTOP_RESOLUTION (1 << 1)
-
-/* GameData.matmode */
-enum {
-#ifdef DNA_DEPRECATED
- GAME_MAT_TEXFACE = 0, /* deprecated */
-#endif
- GAME_MAT_MULTITEX = 1,
- GAME_MAT_GLSL = 2,
-};
-
-/* GameData.lodflag */
-#define SCE_LOD_USE_HYST (1 << 0)
-
/* UV Paint */
/* ToolSettings.uv_sculpt_settings */
#define UV_SCULPT_LOCK_BORDERS 1
@@ -1268,17 +1031,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
*/
@@ -1458,7 +1210,6 @@ typedef struct ToolSettings {
float vgroup_weight;
float doublimit; /* remove doubles limit */
- float normalsize; /* size of normals */
short automerge;
/* Selection Mode for Mesh */
@@ -1483,6 +1234,8 @@ typedef struct ToolSettings {
char gpencil_v2d_align; /* : General 2D Editor */
char gpencil_seq_align; /* : Sequencer Preview */
char gpencil_ima_align; /* : Image Editor */
+
+ char _pad3[4];
/* Grease Pencil Sculpt */
struct GP_BrushEdit_Settings gp_sculpt;
@@ -1512,42 +1265,18 @@ typedef struct ToolSettings {
/* Multires */
char multires_subdiv_type;
- /* Skeleton generation */
- short skgen_resolution;
- float skgen_threshold_internal;
- float skgen_threshold_external;
- float skgen_length_ratio;
- float skgen_length_limit;
- float skgen_angle_limit;
- float skgen_correlation_limit;
- float skgen_symmetry_limit;
- float skgen_retarget_angle_weight;
- float skgen_retarget_length_weight;
- float skgen_retarget_distance_weight;
- short skgen_options;
- char skgen_postpro;
- char skgen_postpro_passes;
- char skgen_subdivisions[3];
- char skgen_multi_level;
-
- /* Skeleton Sketching */
- struct Object *skgen_template;
- char bone_sketching;
- char bone_sketching_convert;
- char skgen_subdivision_number;
- char skgen_retarget_options;
- char skgen_retarget_roll;
- char skgen_side_string[8];
- char skgen_num_string[8];
-
/* Alt+RMB option */
char edge_mode;
char edge_mode_live_unwrap;
+ char _pad1;
/* Transform */
+ char transform_pivot_point;
+ char transform_flag;
char snap_mode, snap_node_mode;
char snap_uv_mode;
- short snap_flag, snap_target;
+ char snap_flag;
+ char snap_target;
short proportional, prop_mode;
char proportional_objects; /* proportional edit, object mode */
char proportional_mask; /* proportional edit, mask editing */
@@ -1562,10 +1291,11 @@ typedef struct ToolSettings {
char vgroupsubset; /* subset selection filter in wpaint */
/* UV painting */
- int use_uv_sculpt;
- int uv_sculpt_settings;
- int uv_sculpt_tool;
- int uv_relax_method;
+ char _pad2[2];
+ char use_uv_sculpt;
+ char uv_sculpt_settings;
+ char uv_sculpt_tool;
+ char uv_relax_method;
/* XXX: these sculpt_paint_* fields are deprecated, use the
* unified_paint_settings field instead! */
short sculpt_paint_settings DNA_DEPRECATED; short pad5;
@@ -1627,6 +1357,73 @@ typedef struct DisplaySafeAreas {
float action_center[2];
} DisplaySafeAreas;
+/* ------------------------------------------- */
+/* Scene Display - used for store scene specific display settings for the 3d view */
+typedef struct SceneDisplay {
+ float light_direction[3]; /* light direction for shadows/highlight */
+ float shadow_shift;
+
+ int matcap_icon;
+ int matcap_type;
+ float matcap_rotation;
+ float matcap_hue;
+ float matcap_saturation;
+ float matcap_value;
+ float matcap_ssao_distance;
+ float matcap_ssao_attenuation;
+ float matcap_ssao_factor_cavity;
+ float matcap_ssao_factor_edge;
+ float matcap_hair_brightness_randomness;
+ int matcap_ssao_samples;
+} SceneDisplay;
+
+typedef struct SceneEEVEE {
+ int flag;
+ int gi_diffuse_bounces;
+ int gi_cubemap_resolution;
+ int gi_visibility_resolution;
+
+ int taa_samples;
+ int taa_render_samples;
+ int sss_samples;
+ float sss_jitter_threshold;
+
+ float ssr_quality;
+ float ssr_max_roughness;
+ float ssr_thickness;
+ float ssr_border_fade;
+ float ssr_firefly_fac;
+
+ float volumetric_start;
+ float volumetric_end;
+ int volumetric_tile_size;
+ int volumetric_samples;
+ float volumetric_sample_distribution;
+ float volumetric_light_clamp;
+ int volumetric_shadow_samples;
+
+ float gtao_distance;
+ float gtao_factor;
+ float gtao_quality;
+
+ float bokeh_max_size;
+ float bokeh_threshold;
+
+ float bloom_color[3];
+ float bloom_threshold;
+ float bloom_knee;
+ float bloom_intensity;
+ float bloom_radius;
+ float bloom_clamp;
+
+ int motion_blur_samples;
+ float motion_blur_shutter;
+
+ int shadow_method;
+ int shadow_cube_size;
+ int shadow_cascade_size;
+} SceneEEVEE;
+
/* *************************************************************** */
/* Scene ID-Block */
@@ -1639,12 +1436,11 @@ typedef struct Scene {
struct Scene *set;
- ListBase base;
- struct Base *basact; /* active base */
- struct Object *obedit; /* name replaces old G.obedit */
+ ListBase base DNA_DEPRECATED;
+ struct Base *basact DNA_DEPRECATED; /* active base */
+ void *_pad1;
- float cursor[3]; /* 3d cursor location */
- char _pad[4];
+ View3DCursor cursor; /* 3d cursor location */
unsigned int lay; /* bitflags for layer visibility */
int layact; /* active layer */
@@ -1660,17 +1456,20 @@ 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;
-
+
+ int orientation_index_custom;
+ int orientation_type;
+
void *sound_scene;
void *playback_handle;
void *sound_scrub_handle;
@@ -1679,19 +1478,12 @@ 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 */
ListBase keyingsets; /* KeyingSets for this scene */
-
- /* Game Settings */
- struct GameFraming framing DNA_DEPRECATED; // XXX deprecated since 2.5
- struct GameData gm;
/* Units */
struct UnitSettings unit;
@@ -1717,6 +1509,16 @@ typedef struct Scene {
struct RigidBodyWorld *rigidbody_world;
struct PreviewImage *preview;
+
+ ListBase view_layers;
+ /* Not an actual datablock, but memory owned by scene. */
+ Collection *master_collection;
+ struct SceneCollection *collection DNA_DEPRECATED;
+
+ IDProperty *layer_properties; /* settings to be override by workspaces */
+
+ struct SceneDisplay display;
+ struct SceneEEVEE eevee;
} Scene;
/* **************** RENDERDATA ********************* */
@@ -1730,25 +1532,25 @@ typedef struct Scene {
/* RenderData.mode */
#define R_OSA 0x0001
-#define R_SHADOW 0x0002
-#define R_GAMMA 0x0004
-#define R_ORTHO 0x0008
-#define R_ENVMAP 0x0010
-#define R_EDGE 0x0020
-#define R_FIELDS 0x0040
-#define R_FIELDSTILL 0x0080
+/* #define R_SHADOW 0x0002 */
+/* #define R_GAMMA 0x0004 */
+#define R_ORTHO 0x0008
+/* #define R_ENVMAP 0x0010 */
+/* #define R_EDGE 0x0020 */
+/* #define R_FIELDS 0x0040 */
+/*#define R_FIELDSTILL 0x0080 */
/*#define R_RADIO 0x0100 */ /* deprecated */
#define R_BORDER 0x0200
-#define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */
+#define R_PANORAMA 0x0400
#define R_CROP 0x0800
/* Disable camera switching: runtime (DURIAN_CAMERA_SWITCH) */
#define R_NO_CAMERA_SWITCH 0x1000
-#define R_ODDFIELD 0x2000
+/* #define R_ODDFIELD 0x2000 */
#define R_MBLUR 0x4000
/* unified was here */
-#define R_RAYTRACE 0x10000
+/* #define R_RAYTRACE 0x10000 */
/* R_GAUSS is obsolete, but used to retrieve setting from old files */
-#define R_GAUSS 0x20000
+/* #define R_GAUSS 0x20000 */
/* fbuf obsolete... */
/*#define R_FBUF 0x40000*/
/* threads obsolete... is there for old files, now use for autodetect threads */
@@ -1756,14 +1558,14 @@ typedef struct Scene {
/* Use the same flag for autothreads */
#define R_FIXED_THREADS 0x80000
-#define R_SPEED 0x100000
-#define R_SSS 0x200000
+/* #define R_SPEED 0x100000 */
+/* #define R_SSS 0x200000 */
#define R_NO_OVERWRITE 0x400000 /* skip existing files */
#define R_TOUCH 0x800000 /* touch files before rendering */
#define R_SIMPLIFY 0x1000000
#define R_EDGE_FRS 0x2000000 /* R_EDGE reserved for Freestyle */
#define R_PERSISTENT_DATA 0x4000000 /* keep data around for re-render */
-#define R_USE_WS_SHADING 0x8000000 /* use world space interpretation of lighting data */
+/* #define R_USE_WS_SHADING 0x8000000 */ /* use world space interpretation of lighting data */
/* RenderData.seq_flag */
enum {
@@ -1780,7 +1582,7 @@ enum {
#define R_OUTPUT_NONE 3
/*#define R_OUTPUT_FORKED 4*/
-/* RenderData.filtertype */
+/* RenderData.filtertype (used for nodes) */
#define R_FILTER_BOX 0
#define R_FILTER_TENT 1
#define R_FILTER_QUAD 2
@@ -1788,19 +1590,7 @@ enum {
#define R_FILTER_CATROM 4
#define R_FILTER_GAUSS 5
#define R_FILTER_MITCH 6
-#define R_FILTER_FAST_GAUSS 7 /* note, this is only used for nodes at the moment */
-
-/* RenderData.raytrace_structure */
-#define R_RAYSTRUCTURE_AUTO 0
-#define R_RAYSTRUCTURE_OCTREE 1
-#define R_RAYSTRUCTURE_BLIBVH 2 /* removed */
-#define R_RAYSTRUCTURE_VBVH 3
-#define R_RAYSTRUCTURE_SIMD_SVBVH 4 /* needs SIMD */
-#define R_RAYSTRUCTURE_SIMD_QBVH 5 /* needs SIMD */
-
-/* RenderData.raytrace_options */
-#define R_RAYTRACE_USE_LOCAL_COORDS 0x0001
-#define R_RAYTRACE_USE_INSTANCES 0x0002
+#define R_FILTER_FAST_GAUSS 7
/* RenderData.scemode (int now) */
#define R_DOSEQ 0x0001
@@ -1812,12 +1602,12 @@ enum {
#define R_MATNODE_PREVIEW 0x0020
#define R_DOCOMP 0x0040
#define R_COMP_CROP 0x0080
-#define R_FREE_IMAGE 0x0100
+/* #define R_FREE_IMAGE 0x0100 */
#define R_SINGLE_LAYER 0x0200
#define R_EXR_TILE_FILE 0x0400
/* #define R_COMP_FREE 0x0800 */
#define R_NO_IMAGE_LOAD 0x1000
-#define R_NO_TEX 0x2000
+/* #define R_NO_TEX 0x2000 */
#define R_NO_FRAME_UPDATE 0x4000
#define R_FULL_SAMPLE 0x8000
/* #define R_DEPRECATED 0x10000 */
@@ -1880,12 +1670,12 @@ enum {
/* bake_mode: same as RE_BAKE_xxx defines */
/* RenderData.bake_flag */
#define R_BAKE_CLEAR 1
-#define R_BAKE_OSA 2
+/* #define R_BAKE_OSA 2 */ /* deprecated */
#define R_BAKE_TO_ACTIVE 4
-#define R_BAKE_NORMALIZE 8
+/* #define R_BAKE_NORMALIZE 8 */ /* deprecated */
#define R_BAKE_MULTIRES 16
#define R_BAKE_LORES_MESH 32
-#define R_BAKE_VCOL 64
+/* #define R_BAKE_VCOL 64 */ /* deprecated */
#define R_BAKE_USERSCALE 128
#define R_BAKE_CAGE 256
#define R_BAKE_SPLIT_MAT 512
@@ -1897,9 +1687,6 @@ enum {
#define R_BAKE_SPACE_OBJECT 2
#define R_BAKE_SPACE_TANGENT 3
-/* RenderData.simplify_flag */
-#define R_SIMPLE_NO_TRIANGULATE 1
-
/* RenderData.line_thickness_mode */
#define R_LINE_THICKNESS_ABSOLUTE 1
#define R_LINE_THICKNESS_RELATIVE 2
@@ -1907,8 +1694,9 @@ enum {
/* sequencer seq_prev_type seq_rend_type */
/* RenderData.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_BLENDER_WORKBENCH;
extern const char *RE_engine_id_CYCLES;
/* **************** SCENE ********************* */
@@ -1927,39 +1715,39 @@ 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 OBEDIT_FROM_WORKSPACE(workspace, _view_layer) \
+ (((workspace)->object_mode & OD_MODE_EDIT) ? OBACT(_view_layer) : NULL)
+#define OBEDIT_FROM_OBACT(ob) \
+ ((ob) ? (((ob)->mode & OB_MODE_EDIT) ? ob : NULL) : NULL)
+#define OBPOSE_FROM_OBACT(ob) \
+ ((ob) ? (((ob)->mode & OB_MODE_POSE) ? ob : NULL) : NULL)
+#define OBEDIT_FROM_VIEW_LAYER(view_layer) \
+ OBEDIT_FROM_OBACT(OBACT(view_layer))
#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)
@@ -1977,6 +1765,11 @@ extern const char *RE_engine_id_CYCLES;
/* Base.flag is in DNA_object_types.h */
+/* ToolSettings.transform_flag */
+enum {
+ SCE_XFORM_AXIS_ALIGN = (1 << 0),
+};
+
/* ToolSettings.snap_flag */
#define SCE_SNAP 1
#define SCE_SNAP_ROTATE 2
@@ -1990,16 +1783,18 @@ extern const char *RE_engine_id_CYCLES;
#define SCE_SNAP_TARGET_CENTER 1
#define SCE_SNAP_TARGET_MEDIAN 2
#define SCE_SNAP_TARGET_ACTIVE 3
+
/* ToolSettings.snap_mode */
-#define SCE_SNAP_MODE_INCREMENT 0
-#define SCE_SNAP_MODE_VERTEX 1
-#define SCE_SNAP_MODE_EDGE 2
-#define SCE_SNAP_MODE_FACE 3
-#define SCE_SNAP_MODE_VOLUME 4
-#define SCE_SNAP_MODE_NODE_X 5
-#define SCE_SNAP_MODE_NODE_Y 6
-#define SCE_SNAP_MODE_NODE_XY 7
-#define SCE_SNAP_MODE_GRID 8
+#define SCE_SNAP_MODE_VERTEX (1 << 0)
+#define SCE_SNAP_MODE_EDGE (1 << 1)
+#define SCE_SNAP_MODE_FACE (1 << 2)
+#define SCE_SNAP_MODE_VOLUME (1 << 3)
+#define SCE_SNAP_MODE_INCREMENT (1 << 4)
+
+/* ToolSettings.snap_node_mode */
+#define SCE_SNAP_MODE_GRID (1 << 5)
+#define SCE_SNAP_MODE_NODE_X (1 << 6)
+#define SCE_SNAP_MODE_NODE_Y (1 << 7)
/* ToolSettings.selectmode */
#define SCE_SELECT_VERTEX 1 /* for mesh */
@@ -2290,15 +2085,6 @@ typedef enum eGPencil_Placement_Flags {
#define BONE_SKETCHING_QUICK 2
#define BONE_SKETCHING_ADJUST 4
-/* ToolSettings.bone_sketching_convert */
-#define SK_CONVERT_CUT_FIXED 0
-#define SK_CONVERT_CUT_LENGTH 1
-#define SK_CONVERT_CUT_ADAPTATIVE 2
-#define SK_CONVERT_RETARGET 3
-
-/* ToolSettings.skgen_retarget_options */
-#define SK_RETARGET_AUTONAME 1
-
/* ToolSettings.skgen_retarget_roll */
#define SK_RETARGET_ROLL_NONE 0
#define SK_RETARGET_ROLL_VIEW 1
@@ -2317,6 +2103,34 @@ typedef enum eGPencil_Placement_Flags {
#define USER_UNIT_OPT_SPLIT 1
#define USER_UNIT_ROT_RADIANS 2
+/* SceneEEVEE->flag */
+enum {
+ SCE_EEVEE_VOLUMETRIC_ENABLED = (1 << 0),
+ SCE_EEVEE_VOLUMETRIC_LIGHTS = (1 << 1),
+ SCE_EEVEE_VOLUMETRIC_SHADOWS = (1 << 2),
+ SCE_EEVEE_VOLUMETRIC_COLORED = (1 << 3),
+ 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_BLOOM_ENABLED = (1 << 8),
+ SCE_EEVEE_MOTION_BLUR_ENABLED = (1 << 9),
+ SCE_EEVEE_SHADOW_HIGH_BITDEPTH = (1 << 10),
+ SCE_EEVEE_TAA_REPROJECTION = (1 << 11),
+ SCE_EEVEE_SSS_ENABLED = (1 << 12),
+ SCE_EEVEE_SSS_SEPARATE_ALBEDO = (1 << 13),
+ SCE_EEVEE_SSR_ENABLED = (1 << 14),
+ SCE_EEVEE_SSR_REFRACTION = (1 << 15),
+ SCE_EEVEE_SSR_HALF_RESOLUTION = (1 << 16),
+};
+
+/* SceneEEVEE->shadow_method */
+enum {
+ SHADOW_ESM = 1,
+ SHADOW_VSM = 2,
+ SHADOW_METHOD_MAX = 3,
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index a7718883438..ef0dbceef38 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -30,6 +30,7 @@
#ifndef __DNA_SCREEN_TYPES_H__
#define __DNA_SCREEN_TYPES_H__
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_view2d_types.h"
#include "DNA_vec_types.h"
@@ -43,20 +44,28 @@ struct ARegionType;
struct PanelType;
struct Scene;
struct uiLayout;
+struct wmDrawBuffer;
struct wmTimer;
struct wmTooltipState;
+
+/* TODO Doing this is quite ugly :)
+ * Once the top-bar is merged bScreen should be refactored to use ScrAreaMap. */
+#define AREAMAP_FROM_SCREEN(screen) ((ScrAreaMap *)&(screen)->vertbase)
+
typedef struct bScreen {
ID id;
-
+
+ /* TODO Should become ScrAreaMap now.
+ * ** NOTE: KEEP ORDER IN SYNC WITH ScrAreaMap! (see AREAMAP_FROM_SCREEN macro above) ** */
ListBase vertbase; /* screens have vertices/edges to define areas */
ListBase edgebase;
ListBase areabase;
+
ListBase regionbase; /* screen level regions (menus), runtime only */
-
- struct Scene *scene;
- struct Scene *newscene; /* temporary when switching */
-
+
+ struct Scene *scene DNA_DEPRECATED;
+
short winid; /* winid from WM, starts with 1 */
short redraws_flag; /* user-setting for which editors get redrawn during anim playback (used to be time->redraws) */
@@ -67,18 +76,18 @@ typedef struct bScreen {
char do_draw_gesture; /* notifier for gesture draw. */
char do_draw_paintcursor; /* notifier for paint cursor draw. */
char do_draw_drag; /* notifier for dragging draw. */
- char swap; /* indicator to survive swap-exchange systems */
char skip_handling; /* set to delay screen handling after switching back from maximized area */
char scrubbing; /* set when scrubbing to avoid some costly updates */
- char pad[6];
+ char pad[3];
- short mainwin; /* screensize subwindow, for screenedges and global menus */
- short subwinactive; /* active subwindow */
+ struct ARegion *active_region; /* active region that has mouse focus */
struct wmTimer *animtimer; /* if set, screen has timer handler added in window */
void *context; /* context callback */
struct wmTooltipState *tool_tip; /* runtime */
+
+ PreviewImage *preview;
} bScreen;
typedef struct ScrVert {
@@ -96,6 +105,14 @@ typedef struct ScrEdge {
int pad;
} ScrEdge;
+typedef struct ScrAreaMap {
+ /* ** NOTE: KEEP ORDER IN SYNC WITH LISTBASES IN bScreen! ** */
+
+ ListBase vertbase; /* ScrVert - screens have vertices/edges to define areas */
+ ListBase edgebase; /* ScrEdge */
+ ListBase areabase; /* ScrArea */
+} ScrAreaMap;
+
typedef struct Panel { /* the part from uiBlock that needs saved in file */
struct Panel *next, *prev;
@@ -194,6 +211,13 @@ typedef struct uiList { /* some list UI data need to be saved in file
uiListDyn *dyn_data;
} uiList;
+typedef struct TransformOrientation {
+ struct TransformOrientation *next, *prev;
+ char name[64]; /* MAX_NAME */
+ float mat[3][3];
+ int pad;
+} TransformOrientation;
+
typedef struct uiPreview { /* some preview UI data need to be saved in file */
struct uiPreview *next, *prev;
@@ -202,6 +226,41 @@ typedef struct uiPreview { /* some preview UI data need to be saved in
short pad1[3];
} uiPreview;
+/* These two lines with # tell makesdna this struct can be excluded.
+ * Should be: #ifndef WITH_GLOBAL_AREA_WRITING */
+#
+#
+typedef struct ScrGlobalAreaData {
+ /* Global areas have a non-dynamic size. That means, changing the window
+ * size doesn't affect their size at all. However, they can still be
+ * 'collapsed', by changing this value. Ignores DPI (ED_area_global_size_y
+ * and winx/winy don't) */
+ short cur_fixed_height;
+ /* For global areas, this is the min and max size they can use depending on
+ * if they are 'collapsed' or not. Value is set on area creation and not
+ * touched afterwards. */
+ short size_min, size_max;
+ short align; /* GlobalAreaAlign */
+
+ short flag; /* GlobalAreaFlag */
+ short pad;
+} ScrGlobalAreaData;
+
+enum GlobalAreaFlag {
+ GLOBAL_AREA_IS_HIDDEN = (1 << 0),
+};
+
+typedef enum GlobalAreaAlign {
+ GLOBAL_AREA_ALIGN_TOP,
+ GLOBAL_AREA_ALIGN_BOTTOM,
+} GlobalAreaAlign;
+
+typedef struct ScrArea_Runtime {
+ struct bToolRef *tool;
+ char is_tool_set;
+ char _pad0[7];
+} ScrArea_Runtime;
+
typedef struct ScrArea {
struct ScrArea *next, *prev;
@@ -210,10 +269,15 @@ typedef struct ScrArea {
rcti totrct; /* rect bound by v1 v2 v3 v4 */
- char spacetype, butspacetype; /* SPACE_..., butspacetype is button arg */
+ char spacetype; /* eSpace_Type (SPACE_FOO) */
+ /* Temporarily used while switching area type, otherwise this should be
+ * SPACE_EMPTY. Also, versioning uses it to nicely replace deprecated
+ * editors. It's been there for ages, name doesn't fit any more... */
+ char butspacetype; /* eSpace_Type (SPACE_FOO) */
+
short winx, winy; /* size */
-
- short headertype; /* OLD! 0=no header, 1= down, 2= up */
+
+ short headertype DNA_DEPRECATED;/* OLD! 0=no header, 1= down, 2= up */
short do_refresh; /* private, for spacetype refresh callback */
short flag;
short region_active_win; /* index of last used region of 'RGN_TYPE_WINDOW'
@@ -222,6 +286,9 @@ typedef struct ScrArea {
struct SpaceType *type; /* callbacks for this space type */
+ /* Non-NULL if this area is global. */
+ ScrGlobalAreaData *global;
+
/* A list of space links (editors) that were open in this area before. When
* changing the editor type, we try to reuse old editor data from this list.
* The first item is the active/visible one.
@@ -234,6 +301,8 @@ typedef struct ScrArea {
ListBase handlers; /* wmEventHandler */
ListBase actionzones; /* AZone */
+
+ ScrArea_Runtime runtime;
} ScrArea;
typedef struct ARegion {
@@ -244,7 +313,7 @@ typedef struct ARegion {
rcti drawrct; /* runtime for partial redraw, same or smaller than winrct */
short winx, winy; /* size */
- short swinid;
+ short visible; /* region is currently visible on screen */
short regiontype; /* window, header, etc. identifier for drawing */
short alignment; /* how it should split */
short flag; /* hide, ... */
@@ -254,10 +323,9 @@ typedef struct ARegion {
short do_draw; /* private, cached notifier events */
short do_draw_overlay; /* private, cached notifier events */
- short swap; /* private, indicator to survive swap-exchange */
short overlap; /* private, set for indicate drawing overlapped */
short flagfullscreen; /* temporary copy of flag settings for clean fullscreen */
- short pad;
+ short pad1, pad2;
struct ARegionType *type; /* callbacks for this region type */
@@ -268,24 +336,25 @@ typedef struct ARegion {
ListBase ui_previews; /* uiPreview */
ListBase handlers; /* wmEventHandler */
ListBase panels_category; /* Panel categories runtime */
-
+
+ struct wmManipulatorMap *manipulator_map; /* manipulator-map of this region */
struct wmTimer *regiontimer; /* blend in/out */
-
+ struct wmDrawBuffer *draw_buffer;
+
char *headerstr; /* use this string to draw info */
void *regiondata; /* XXX 2.50, need spacedata equivalent? */
} ARegion;
-/* swap */
-#define WIN_BACK_OK 1
-#define WIN_FRONT_OK 2
-// #define WIN_EQUAL 3 // UNUSED
-
/* area->flag */
enum {
HEADER_NO_PULLDOWN = (1 << 0),
// AREA_FLAG_DEPRECATED_1 = (1 << 1),
// AREA_FLAG_DEPRECATED_2 = (1 << 2),
- AREA_TEMP_INFO = (1 << 3),
+#ifdef DNA_DEPRECATED_ALLOW
+ AREA_TEMP_INFO = (1 << 3), /* versioned to make slot reusable */
+#endif
+ /* update size of regions within the area */
+ AREA_FLAG_REGION_SIZE_UPDATE = (1 << 3),
// AREA_FLAG_DEPRECATED_4 = (1 << 4),
// AREA_FLAG_DEPRECATED_5 = (1 << 5),
/* used to check if we should switch back to prevspace (of a different type) */
@@ -301,9 +370,6 @@ enum {
#define AREAMINX 32
#define HEADERY 26
-#define HEADERDOWN 1
-#define HEADERTOP 2
-
/* screen->state */
enum {
SCREENNORMAL = 0,
@@ -403,13 +469,20 @@ enum {
#define RGN_SPLIT_PREV 32
/* region flag */
-#define RGN_FLAG_HIDDEN 1
-#define RGN_FLAG_TOO_SMALL 2
+enum {
+ RGN_FLAG_HIDDEN = (1 << 0),
+ RGN_FLAG_TOO_SMALL = (1 << 1),
+ /* Force delayed reinit of region size data, so that region size is calculated
+ * just big enough to show all its content (if enough space is available).
+ * Note that only ED_region_header supports this right now. */
+ RGN_FLAG_DYNAMIC_SIZE = (1 << 2),
+};
/* region do_draw */
#define RGN_DRAW 1
#define RGN_DRAW_PARTIAL 2
#define RGN_DRAWING 4
#define RGN_DRAW_REFRESH_UI 8 /* re-create uiBlock's where possible */
+#define RGN_DRAW_NO_REBUILD 16
#endif
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
deleted file mode 100644
index 37064854920..00000000000
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file DNA_sensor_types.h
- * \ingroup DNA
- * \since mar-2001
- * \author nzc
- *
- * #bSensor type is specifically for use by Object logic-bricks in the game-engine.
- */
-
-#ifndef __DNA_SENSOR_TYPES_H__
-#define __DNA_SENSOR_TYPES_H__
-
-struct Object;
-struct Material;
-
-/* ****************** SENSORS ********************* */
-
-typedef struct bNearSensor {
- char name[64]; /* MAX_NAME */
- float dist, resetdist;
- int lastval, pad;
-} bNearSensor;
-
-/**
- * Defines the settings of a mouse sensor.
- */
-typedef struct bMouseSensor {
- /**
- * The type of key this sensor listens to.
- */
- short type;
- short flag;
- short pad1;
- short mode; /* flag to choose material or property */
- char propname[64];
- char matname[64];
-} bMouseSensor;
-
-/* DEPRECATED */
-typedef struct bTouchSensor {
- char name[64]; /* MAX_NAME */
- struct Material *ma;
- float dist, pad;
-} bTouchSensor;
-
-typedef struct bKeyboardSensor {
- short key, qual;
- short type, qual2;
- /**
- * Name of the target property
- */
- char targetName[64]; /* MAX_NAME */
- /**
- * Name of the toggle property
- */
- char toggleName[64]; /* MAX_NAME */
-} bKeyboardSensor;
-
-typedef struct bPropertySensor {
- int type;
- int pad;
- char name[64]; /* MAX_NAME */
- char value[64];
- char maxvalue[64];
-} bPropertySensor;
-
-typedef struct bActuatorSensor {
- int type;
- int pad;
- char name[64]; /* MAX_NAME */
-} bActuatorSensor;
-
-typedef struct bDelaySensor {
- short delay;
- short duration;
- short flag;
- short pad;
-} bDelaySensor;
-
-typedef struct bCollisionSensor {
- char name[64]; /* property name. MAX_NAME */
- char materialName[64]; /* material */
- // struct Material *ma; // XXX remove materialName
- short damptimer, damp;
- short mode; /* flag to choose material or property */
- short pad2;
-} bCollisionSensor;
-
-typedef struct bRadarSensor {
- char name[64]; /* MAX_NAME */
- float angle;
- float range;
- short flag, axis;
-} bRadarSensor;
-
-typedef struct bRandomSensor {
- char name[64]; /* MAX_NAME */
- int seed;
- int delay;
-} bRandomSensor;
-
-typedef struct bRaySensor {
- char name[64]; /* MAX_NAME */
- float range;
- char propname[64];
- char matname[64];
- //struct Material *ma; // XXX remove materialName
- short mode;
- short pad1;
- int axisflag;
-} bRaySensor;
-
-typedef struct bArmatureSensor {
- char posechannel[64]; /* MAX_NAME */
- char constraint[64]; /* MAX_NAME */
- int type;
- float value;
-} bArmatureSensor;
-
-typedef struct bMessageSensor {
- /**
- * (Possible future use) pointer to a single sender object
- */
- struct Object *fromObject;
-
- /**
- * Can be used to filter on subjects like this
- */
- char subject[64];
-
- /**
- * (Possible future use) body to filter on
- */
- char body[64];
-} bMessageSensor;
-
-typedef struct bSensor {
- struct bSensor *next, *prev;
- /* pulse and freq are the bool toggle and frame count for pulse mode */
- short type, otype, flag, pulse;
- short freq, totlinks, pad1, pad2; /* freq makes reference to skipped ticks between 2 active pulses */
- char name[64]; /* MAX_NAME */
- void *data;
-
- struct bController **links;
-
- struct Object *ob;
-
- /* just add here, to avoid align errors... */
- short invert; /* Whether or not to invert the output. */
- short level; /* Whether the sensor is level base (edge by default) */
- short tap;
- short pad;
-} bSensor;
-
-typedef struct bJoystickSensor {
- char name[64]; /* MAX_NAME */
- char type;
- char joyindex;
- short flag;
- short axis;
- short axis_single;
- int axisf;
- int button;
- int hat;
- int hatf;
- int precision;
-} bJoystickSensor;
-
-/* bMouseSensor->type: uses blender event defines */
-
-/* bMouseSensor->flag: only pulse for now */
-#define SENS_MOUSE_FOCUS_PULSE 1
-
-/* propertysensor->type */
-#define SENS_PROP_EQUAL 0
-#define SENS_PROP_NEQUAL 1
-#define SENS_PROP_INTERVAL 2
-#define SENS_PROP_CHANGED 3
-#define SENS_PROP_EXPRESSION 4
-#define SENS_PROP_LESSTHAN 5
-#define SENS_PROP_GREATERTHAN 6
-
-/* raysensor->axisflag */
-/* flip x and y to make y default!!! */
-#define SENS_RAY_X_AXIS 1
-#define SENS_RAY_Y_AXIS 0
-#define SENS_RAY_Z_AXIS 2
-#define SENS_RAY_NEG_X_AXIS 3
-#define SENS_RAY_NEG_Y_AXIS 4
-#define SENS_RAY_NEG_Z_AXIS 5
-//#define SENS_RAY_NEGATIVE_AXIS 1
-
-/* bRadarSensor->axis */
-#define SENS_RADAR_X_AXIS 0
-#define SENS_RADAR_Y_AXIS 1
-#define SENS_RADAR_Z_AXIS 2
-#define SENS_RADAR_NEG_X_AXIS 3
-#define SENS_RADAR_NEG_Y_AXIS 4
-#define SENS_RADAR_NEG_Z_AXIS 5
-
-/* bMessageSensor->type */
-#define SENS_MESG_MESG 0
-#define SENS_MESG_PROP 1
-
-/* bArmatureSensor->type */
-#define SENS_ARM_STATE_CHANGED 0
-#define SENS_ARM_LIN_ERROR_BELOW 1
-#define SENS_ARM_LIN_ERROR_ABOVE 2
-#define SENS_ARM_ROT_ERROR_BELOW 3
-#define SENS_ARM_ROT_ERROR_ABOVE 4
-/* update this when adding new type */
-#define SENS_ARM_MAXTYPE 4
-
-/* sensor->type */
-#define SENS_ALWAYS 0
-#define SENS_TOUCH 1 /* DEPRECATED */
-#define SENS_NEAR 2
-#define SENS_KEYBOARD 3
-#define SENS_PROPERTY 4
-#define SENS_MOUSE 5
-#define SENS_COLLISION 6
-#define SENS_RADAR 7
-#define SENS_RANDOM 8
-#define SENS_RAY 9
-#define SENS_MESSAGE 10
-#define SENS_JOYSTICK 11
-#define SENS_ACTUATOR 12
-#define SENS_DELAY 13
-#define SENS_ARMATURE 14
-/* sensor->flag */
-#define SENS_SHOW 1
-#define SENS_DEL 2
-#define SENS_NEW 4
-#define SENS_NOT 8
-#define SENS_VISIBLE 16
-#define SENS_PIN 32
-#define SENS_DEACTIVATE 64
-
-/* sensor->pulse */
-#define SENS_PULSE_CONT 0
-#define SENS_PULSE_REPEAT 1
-//#define SENS_PULSE_ONCE 2
-#define SENS_NEG_PULSE_MODE 4
-
-/* sensor->suppress */
-#define SENS_SUPPRESS_POSITIVE (1 << 0)
-#define SENS_SUPPRESS_NEGATIVE (1 << 1)
-
-/* collision, ray sensor modes: */
-/* A little bit fake: when property is active, the first bit is
- * reset. Bite me :) So we don't actually use it, so we comment it out
- * ... The reason for this is that we need to be backward compatible,
- * and have a proper default value for this thing.
- * */
-#define SENS_COLLISION_PROPERTY 0
-#define SENS_COLLISION_MATERIAL 1
-#define SENS_COLLISION_PULSE 2
-
-/* ray specific mode */
-/* X-Ray means that the ray will traverse objects that don't have the property/material */
-#define SENS_RAY_PROPERTY 0
-#define SENS_RAY_MATERIAL 1
-#define SENS_RAY_XRAY 2
-
-/* Some stuff for the mouse sensor Type: */
-#define BL_SENS_MOUSE_LEFT_BUTTON 1
-#define BL_SENS_MOUSE_MIDDLE_BUTTON 2
-#define BL_SENS_MOUSE_RIGHT_BUTTON 4
-#define BL_SENS_MOUSE_WHEEL_UP 5
-#define BL_SENS_MOUSE_WHEEL_DOWN 6
-#define BL_SENS_MOUSE_MOVEMENT 8
-#define BL_SENS_MOUSE_MOUSEOVER 16
-#define BL_SENS_MOUSE_MOUSEOVER_ANY 32
-
-/* Joystick sensor - sorted by axis types */
-#define SENS_JOY_ANY_EVENT 1
-
-#define SENS_JOY_BUTTON 0 /* axis type */
-
-#define SENS_JOY_AXIS 1 /* axis type */
-#define SENS_JOY_X_AXIS 0
-#define SENS_JOY_Y_AXIS 1
-#define SENS_JOY_NEG_X_AXIS 2
-#define SENS_JOY_NEG_Y_AXIS 3
-#define SENS_JOY_PRECISION 4
-
-#define SENS_JOY_HAT 2 /* axis type */
-#define SENS_JOY_HAT_DIR 0
-#define SENS_JOY_HAT_UP 1
-#define SENS_JOY_HAT_RIGHT 2
-#define SENS_JOY_HAT_DOWN 4
-#define SENS_JOY_HAT_LEFT 8
-
-#define SENS_JOY_HAT_UP_RIGHT SENS_JOY_HAT_UP | SENS_JOY_HAT_RIGHT
-#define SENS_JOY_HAT_DOWN_RIGHT SENS_JOY_HAT_DOWN | SENS_JOY_HAT_RIGHT
-#define SENS_JOY_HAT_UP_LEFT SENS_JOY_HAT_UP | SENS_JOY_HAT_LEFT
-#define SENS_JOY_HAT_DOWN_LEFT SENS_JOY_HAT_DOWN | SENS_JOY_HAT_LEFT
-
-
-#define SENS_JOY_AXIS_SINGLE 3 /* axis type */
-
-
-#define SENS_DELAY_REPEAT 1
-// should match JOYINDEX_MAX in SCA_JoystickDefines.h */
-#define SENS_JOY_MAXINDEX 8
-
-#endif /* __DNA_SENSOR_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index c1565bde882..47f73c6ac22 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -129,9 +129,9 @@ typedef struct SmokeDomainSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
struct FLUID_3D *fluid;
void *fluid_mutex;
- struct Group *fluid_group;
- struct Group *eff_group; // UNUSED
- struct Group *coll_group; // collision objects group
+ struct Collection *fluid_group;
+ struct Collection *eff_group; // UNUSED
+ struct Collection *coll_group; // collision objects group
struct WTURBULENCE *wt; // WTURBULENCE object, if active
struct GPUTexture *tex;
struct GPUTexture *tex_wt;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 7de5d6267b6..3bc5118c996 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -67,6 +67,10 @@ struct MovieClipScopes;
struct Mask;
struct BLI_mempool;
+/* TODO 2.8: We don't write the global areas to files currently. Uncomment
+ * define to enable writing (should become the default in a bit). */
+//#define WITH_GLOBAL_AREA_WRITING
+
/* SpaceLink (Base) ==================================== */
@@ -124,9 +128,9 @@ typedef struct SpaceButs {
short mainb, mainbo, mainbuser; /* context tabs */
short re_align, align; /* align for panels */
short preview; /* preview is signal to refresh */
- /* texture context selector (material, lamp, particles, world, other) */
- short texture_context, texture_context_prev;
- char flag, pad[7];
+ char flag;
+ char collection_context;
+ char pad[2];
void *path; /* runtime */
int pathflag, dataicon; /* runtime */
@@ -144,7 +148,7 @@ typedef struct SpaceButs {
#define CONTEXT_SHADING 3
#define CONTEXT_EDITING 4
#define CONTEXT_SCRIPT 5
-#define CONTEXT_LOGIC 6
+//#define CONTEXT_LOGIC 6
/* sbuts->mainb old (deprecated) */
#ifdef DNA_DEPRECATED_ALLOW
@@ -156,7 +160,7 @@ typedef struct SpaceButs {
#define BUTS_WORLD 5
#define BUTS_RENDER 6
#define BUTS_EDIT 7
-#define BUTS_GAME 8
+// #define BUTS_GAME 8
#define BUTS_FPAINT 9
#define BUTS_RADIO 10
#define BUTS_SCRIPT 11
@@ -180,8 +184,9 @@ typedef enum eSpaceButtons_Context {
BCONTEXT_MODIFIER = 10,
BCONTEXT_CONSTRAINT = 11,
BCONTEXT_BONE_CONSTRAINT = 12,
- BCONTEXT_RENDER_LAYER = 13,
-
+ BCONTEXT_VIEW_LAYER = 13,
+ BCONTEXT_WORKSPACE = 15,
+
/* always as last... */
BCONTEXT_TOT
} eSpaceButtons_Context;
@@ -196,16 +201,6 @@ typedef enum eSpaceButtons_Flag {
SB_SHADING_CONTEXT = (1 << 4),
} eSpaceButtons_Flag;
-/* sbuts->texture_context */
-typedef enum eSpaceButtons_Texture_Context {
- SB_TEXC_MATERIAL = 0,
- SB_TEXC_WORLD = 1,
- SB_TEXC_LAMP = 2,
- SB_TEXC_PARTICLES = 3,
- SB_TEXC_OTHER = 4,
- SB_TEXC_LINESTYLE = 5,
-} eSpaceButtons_Texture_Context;
-
/* sbuts->align */
typedef enum eSpaceButtons_Align {
BUT_FREE = 0,
@@ -256,6 +251,10 @@ typedef struct SpaceOops {
struct TreeStoreElem search_tse;
short flag, outlinevis, storeflag, search_flags;
+ int filter;
+ char filter_state;
+ char pad;
+ short filter_id_type;
/* pointers to treestore elements, grouped by (id, type, nr) in hashtable for faster searching */
void *treehash;
@@ -271,31 +270,81 @@ typedef enum eSpaceOutliner_Flag {
SO_SKIP_SORT_ALPHA = (1 << 4),
} eSpaceOutliner_Flag;
+/* SpaceOops->filter */
+typedef enum eSpaceOutliner_Filter {
+ SO_FILTER_SEARCH = (1 << 0),
+ /* SO_FILTER_ENABLE = (1 << 1), */ /* Deprecated */
+ SO_FILTER_NO_OBJECT = (1 << 2),
+ SO_FILTER_NO_OB_CONTENT = (1 << 3), /* Not only mesh, but modifiers, constraints, ... */
+ SO_FILTER_NO_CHILDREN = (1 << 4),
+
+ /* SO_FILTER_OB_TYPE = (1 << 5), */ /* Deprecated */
+ SO_FILTER_NO_OB_MESH = (1 << 6),
+ SO_FILTER_NO_OB_ARMATURE = (1 << 7),
+ SO_FILTER_NO_OB_EMPTY = (1 << 8),
+ SO_FILTER_NO_OB_LAMP = (1 << 9),
+ SO_FILTER_NO_OB_CAMERA = (1 << 10),
+ SO_FILTER_NO_OB_OTHERS = (1 << 11),
+
+ /* SO_FILTER_OB_STATE = (1 << 12), */ /* Deprecated */
+ SO_FILTER_OB_STATE_VISIBLE = (1 << 13), /* Not set via DNA. */
+ SO_FILTER_OB_STATE_SELECTED = (1 << 14), /* Not set via DNA. */
+ SO_FILTER_OB_STATE_ACTIVE = (1 << 15), /* Not set via DNA. */
+ SO_FILTER_NO_COLLECTION = (1 << 16),
+
+ SO_FILTER_ID_TYPE = (1 << 17),
+} eSpaceOutliner_Filter;
+
+#define SO_FILTER_OB_TYPE (SO_FILTER_NO_OB_MESH | \
+ SO_FILTER_NO_OB_ARMATURE | \
+ SO_FILTER_NO_OB_EMPTY | \
+ SO_FILTER_NO_OB_LAMP | \
+ SO_FILTER_NO_OB_CAMERA | \
+ SO_FILTER_NO_OB_OTHERS)
+
+#define SO_FILTER_OB_STATE (SO_FILTER_OB_STATE_VISIBLE | \
+ SO_FILTER_OB_STATE_SELECTED | \
+ SO_FILTER_OB_STATE_ACTIVE)
+
+#define SO_FILTER_ANY (SO_FILTER_NO_OB_CONTENT | \
+ SO_FILTER_NO_CHILDREN | \
+ SO_FILTER_OB_TYPE | \
+ SO_FILTER_OB_STATE | \
+ SO_FILTER_NO_COLLECTION)
+
+/* SpaceOops->filter_state */
+typedef enum eSpaceOutliner_StateFilter {
+ SO_FILTER_OB_ALL = 0,
+ SO_FILTER_OB_VISIBLE = 1,
+ SO_FILTER_OB_SELECTED = 2,
+ SO_FILTER_OB_ACTIVE = 3,
+} eSpaceOutliner_StateFilter;
+
/* SpaceOops->outlinevis */
typedef enum eSpaceOutliner_Mode {
- SO_ALL_SCENES = 0,
- SO_CUR_SCENE = 1,
- SO_VISIBLE = 2,
- SO_SELECTED = 3,
- SO_ACTIVE = 4,
- SO_SAME_TYPE = 5,
- SO_GROUPS = 6,
- SO_LIBRARIES = 7,
- /* SO_VERSE_SESSION = 8, */ /* deprecated! */
- /* SO_VERSE_MS = 9, */ /* deprecated! */
- SO_SEQUENCE = 10,
- SO_DATABLOCKS = 11,
- SO_USERDEF = 12,
- /* SO_KEYMAP = 13, */ /* deprecated! */
- SO_ID_ORPHANS = 14,
+ SO_SCENES = 0,
+ /* SO_CUR_SCENE = 1, */ /* deprecated! */
+ /* SO_VISIBLE = 2, */ /* deprecated! */
+ /* SO_SELECTED = 3, */ /* deprecated! */
+ /* SO_ACTIVE = 4, */ /* deprecated! */
+ /* SO_SAME_TYPE = 5, */ /* deprecated! */
+ /* SO_GROUPS = 6, */ /* deprecated! */
+ SO_LIBRARIES = 7,
+ /* SO_VERSE_SESSION = 8, */ /* deprecated! */
+ /* SO_VERSE_MS = 9, */ /* deprecated! */
+ SO_SEQUENCE = 10,
+ SO_DATA_API = 11,
+ /* SO_USERDEF = 12, */ /* deprecated! */
+ /* SO_KEYMAP = 13, */ /* deprecated! */
+ SO_ID_ORPHANS = 14,
+ SO_VIEW_LAYER = 15,
} eSpaceOutliner_Mode;
/* SpaceOops->storeflag */
typedef enum eSpaceOutliner_StoreFlag {
/* cleanup tree */
SO_TREESTORE_CLEANUP = (1 << 0),
- /* if set, it allows redraws. gets set for some allqueue events */
- SO_TREESTORE_REDRAW = (1 << 1),
+ /* SO_TREESTORE_REDRAW = (1 << 1), */ /* Deprecated */
/* rebuild the tree, similar to cleanup,
* but defer a call to BKE_outliner_treehash_rebuild_from_treestore instead */
SO_TREESTORE_REBUILD = (1 << 2),
@@ -419,40 +468,6 @@ typedef enum eSpaceNla_Flag {
/* Timeline =============================================== */
-/* Pointcache drawing data */
-# /* Only store the data array in the cache to avoid constant reallocation. */
-# /* No need to store when saved. */
-typedef struct SpaceTimeCache {
- struct SpaceTimeCache *next, *prev;
- float *array;
-} SpaceTimeCache;
-
-/* Timeline View */
-typedef struct SpaceTime {
- SpaceLink *next, *prev;
- ListBase regionbase; /* storage of regions for inactive spaces */
- int spacetype;
- float blockscale DNA_DEPRECATED;
-
- View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
-
- ListBase caches;
-
- int cache_display;
- int flag;
-} SpaceTime;
-
-
-/* time->flag */
-typedef enum eTimeline_Flag {
- /* show timing in frames instead of in seconds */
- TIME_DRAWFRAMES = (1 << 0),
- /* show time indicator box beside the frame number */
- TIME_CFRA_NUM = (1 << 1),
- /* only keyframes from active/selected channels get shown */
- TIME_ONLYACTSEL = (1 << 2),
-} eTimeline_Flag;
-
/* time->redraws (now screen->redraws_flag) */
typedef enum eScreen_Redraws_Flag {
TIME_REGION = (1 << 0),
@@ -469,18 +484,6 @@ typedef enum eScreen_Redraws_Flag {
TIME_FOLLOW = (1 << 15),
} eScreen_Redraws_Flag;
-/* time->cache */
-typedef enum eTimeline_Cache_Flag {
- TIME_CACHE_DISPLAY = (1 << 0),
- TIME_CACHE_SOFTBODY = (1 << 1),
- TIME_CACHE_PARTICLES = (1 << 2),
- TIME_CACHE_CLOTH = (1 << 3),
- TIME_CACHE_SMOKE = (1 << 4),
- TIME_CACHE_DYNAMICPAINT = (1 << 5),
- TIME_CACHE_RIGIDBODY = (1 << 6),
-} eTimeline_Cache_Flag;
-
-
/* Sequence Editor ======================================= */
/* Sequencer */
@@ -655,17 +658,6 @@ typedef struct SpaceFile {
short systemnr, system_bookmarknr;
} SpaceFile;
-/* FSMenuEntry's without paths indicate separators */
-typedef struct FSMenuEntry {
- struct FSMenuEntry *next;
-
- char *path;
- char name[256]; /* FILE_MAXFILE */
- short save;
- short valid;
- short pad[2];
-} FSMenuEntry;
-
/* FileSelectParams.display */
enum eFileDisplayType {
FILE_DEFAULTDISPLAY = 0,
@@ -715,7 +707,7 @@ typedef enum eFileSel_Params_Flag {
FILE_LINK = (1 << 2),
FILE_HIDE_DOT = (1 << 3),
FILE_AUTOSELECT = (1 << 4),
- FILE_ACTIVELAY = (1 << 5),
+ FILE_ACTIVE_COLLECTION = (1 << 5),
/* FILE_ATCURSOR = (1 << 6), */ /* deprecated */
FILE_DIRSEL_ONLY = (1 << 7),
FILE_FILTER = (1 << 8),
@@ -944,7 +936,7 @@ typedef enum eSpaceImage_Sticky {
/* SpaceImage->flag */
typedef enum eSpaceImage_Flag {
/* SI_BE_SQUARE = (1 << 0), */ /* deprecated */
- SI_EDITTILE = (1 << 1), /* XXX - not used but should be? */
+/* SI_EDITTILE = (1 << 1), */ /* deprecated */
SI_CLIP_UV = (1 << 2),
/* SI_DRAWTOOL = (1 << 3), */ /* deprecated */
SI_NO_DRAWFACES = (1 << 4),
@@ -1158,14 +1150,14 @@ typedef enum eSpaceNode_Flag {
SNODE_AUTO_RENDER = (1 << 5),
// SNODE_SHOW_HIGHLIGHT = (1 << 6), DNA_DEPRECATED
// SNODE_USE_HIDDEN_PREVIEW = (1 << 10), DNA_DEPRECATED December2013
- SNODE_NEW_SHADERS = (1 << 11),
+// SNODE_NEW_SHADERS = (1 << 11), DNA_DEPRECATED
SNODE_PIN = (1 << 12),
SNODE_SKIP_INSOFFSET = (1 << 13), /* automatically offset following nodes in a chain on insertion */
} eSpaceNode_Flag;
/* snode->texfrom */
typedef enum eSpaceNode_TexFrom {
- SNODE_TEX_OBJECT = 0,
+ /* SNODE_TEX_OBJECT = 0, */
SNODE_TEX_WORLD = 1,
SNODE_TEX_BRUSH = 2,
SNODE_TEX_LINESTYLE = 3,
@@ -1184,23 +1176,6 @@ enum {
SNODE_INSERTOFS_DIR_LEFT = 1,
};
-/* Game Logic Editor ===================================== */
-
-/* Logic Editor */
-typedef struct SpaceLogic {
- SpaceLink *next, *prev;
- ListBase regionbase; /* storage of regions for inactive spaces */
- int spacetype;
- float blockscale DNA_DEPRECATED;
-
- short blockhandler[8] DNA_DEPRECATED;
-
- short flag, scaflag;
- int pad;
-
- struct bGPdata *gpd; /* grease-pencil data */
-} SpaceLogic;
-
/* Console ================================================ */
/* Console content */
@@ -1348,6 +1323,36 @@ typedef enum eSpaceClip_GPencil_Source {
SC_GPENCIL_SRC_TRACK = 1,
} eSpaceClip_GPencil_Source;
+
+/* Top Bar ======================================= */
+
+/* These two lines with # tell makesdna this struct can be excluded.
+ * Should be: #ifndef WITH_GLOBAL_AREA_WRITING */
+#
+#
+typedef struct SpaceTopBar {
+ SpaceLink *next, *prev;
+ ListBase regionbase; /* storage of regions for inactive spaces */
+ int spacetype;
+
+ int pad;
+} SpaceTopBar;
+
+/* Status Bar ======================================= */
+
+/* These two lines with # tell makesdna this struct can be excluded.
+ * Should be: #ifndef WITH_GLOBAL_AREA_WRITING */
+#
+#
+typedef struct SpaceStatusBar {
+ SpaceLink *next, *prev;
+ ListBase regionbase; /* storage of regions for inactive spaces */
+ int spacetype;
+
+ int pad;
+} SpaceStatusBar;
+
+
/* **************** SPACE DEFINES ********************* */
/* space types, moved from DNA_screen_types.h */
@@ -1371,14 +1376,16 @@ typedef enum eSpace_Type {
SPACE_NLA = 13,
/* TODO: fully deprecate */
SPACE_SCRIPT = 14, /* Deprecated */
- SPACE_TIME = 15,
+ SPACE_TIME = 15, /* Deprecated */
SPACE_NODE = 16,
- SPACE_LOGIC = 17,
+ SPACE_LOGIC = 17, /* deprecated */
SPACE_CONSOLE = 18,
SPACE_USERPREF = 19,
SPACE_CLIP = 20,
+ SPACE_TOPBAR = 21,
+ SPACE_STATUSBAR = 22,
- SPACE_TYPE_LAST = SPACE_CLIP
+ SPACE_TYPE_LAST = SPACE_STATUSBAR
} eSpace_Type;
/* use for function args */
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index 0eb54a9b5b3..f5267f20d2c 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -45,13 +45,11 @@ extern "C" {
struct AnimData;
struct Ipo;
struct ColorBand;
-struct EnvMap;
struct Object;
struct Tex;
struct Image;
struct PreviewImage;
struct ImBuf;
-struct Ocean;
struct CurveMapping;
typedef struct MTex {
@@ -121,21 +119,6 @@ typedef struct ColorBand {
CBData data[32];
} ColorBand;
-typedef struct EnvMap {
- struct Object *object;
- struct Image *ima; /* type ENV_LOAD */
- struct ImBuf *cube[6]; /* these images are dynamic, not part of the main struct */
- float imat[4][4];
- float obimat[3][3];
- short type, stype;
- float clipsta, clipend;
- float viewscale; /* viewscale is for planar envmaps to zoom in or out */
- unsigned int notlay;
- short cuberes, depth;
- int ok, lastframe;
- short recalc, lastsize;
-} EnvMap;
-
typedef struct PointDensity {
short flag;
@@ -172,38 +155,6 @@ typedef struct PointDensity {
struct CurveMapping *falloff_curve; /* falloff density curve */
} PointDensity;
-typedef struct VoxelData {
- int resol[3];
- int interp_type;
- short file_format;
- short flag;
- short extend;
- short smoked_type;
- short hair_type;
- short data_type;
- int _pad;
-
- struct Object *object; /* for rendering smoke sims */
- float int_multiplier;
- int still_frame;
- char source_path[1024]; /* 1024 = FILE_MAX */
-
- /* temporary data */
- float *dataset;
- int cachedframe;
- int ok;
-
-} VoxelData;
-
-typedef struct OceanTex {
- struct Object *object;
- char oceanmod[64];
-
- int output;
- int pad;
-
-} OceanTex;
-
typedef struct Tex {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -254,11 +205,7 @@ typedef struct Tex {
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Image *ima;
struct ColorBand *coba;
- struct EnvMap *env;
struct PreviewImage *preview;
- struct PointDensity *pd;
- struct VoxelData *vd;
- struct OceanTex *ot;
char use_nodes;
char pad[7];
@@ -316,13 +263,13 @@ typedef struct ColorMapping {
#define TEX_NOISE 7
#define TEX_IMAGE 8
//#define TEX_PLUGIN 9 /* Deprecated */
-#define TEX_ENVMAP 10
+//#define TEX_ENVMAP 10 /* Deprecated */
#define TEX_MUSGRAVE 11
#define TEX_VORONOI 12
#define TEX_DISTNOISE 13
-#define TEX_POINTDENSITY 14
-#define TEX_VOXELDATA 15
-#define TEX_OCEAN 16
+//#define TEX_POINTDENSITY 14 /* Deprecated */
+//#define TEX_VOXELDATA 15 /* Deprecated */
+//#define TEX_OCEAN 16 /* Deprecated */
/* musgrave stype */
#define TEX_MFRACTAL 0
@@ -549,22 +496,6 @@ enum {
COLBAND_HUE_CCW = 3,
};
-/* **************** EnvMap ********************* */
-
-/* type */
-#define ENV_CUBE 0
-#define ENV_PLANE 1
-#define ENV_SPHERE 2
-
-/* stype */
-#define ENV_STATIC 0
-#define ENV_ANIM 1
-#define ENV_LOAD 2
-
-/* ok */
-#define ENV_NORMAL 1
-#define ENV_OSA 2
-
/* **************** PointDensity ********************* */
/* source */
@@ -592,9 +523,9 @@ enum {
/* noise_influence */
#define TEX_PD_NOISE_STATIC 0
-#define TEX_PD_NOISE_VEL 1
-#define TEX_PD_NOISE_AGE 2
-#define TEX_PD_NOISE_TIME 3
+/* #define TEX_PD_NOISE_VEL 1 */ /* Deprecated */
+/* #define TEX_PD_NOISE_AGE 2 */ /* Deprecated */
+/* #define TEX_PD_NOISE_TIME 3 */ /* Deprecated */
/* color_source */
enum {
@@ -613,55 +544,6 @@ enum {
#define POINT_DATA_LIFE 2
#define POINT_DATA_COLOR 4
-/******************** Voxel Data *****************************/
-/* flag */
-#define TEX_VD_STILL 1
-
-/* interpolation */
-#define TEX_VD_NEARESTNEIGHBOR 0
-#define TEX_VD_LINEAR 1
-#define TEX_VD_QUADRATIC 2
-#define TEX_VD_TRICUBIC_CATROM 3
-#define TEX_VD_TRICUBIC_BSPLINE 4
-#define TEX_VD_TRICUBIC_SLOW 5
-
-/* file format */
-#define TEX_VD_BLENDERVOXEL 0
-#define TEX_VD_RAW_8BIT 1
-#define TEX_VD_RAW_16BIT 2
-#define TEX_VD_IMAGE_SEQUENCE 3
-#define TEX_VD_SMOKE 4
-#define TEX_VD_HAIR 5
-/* for voxels which use VoxelData->source_path */
-#define TEX_VD_IS_SOURCE_PATH(_format) (ELEM(_format, TEX_VD_BLENDERVOXEL, TEX_VD_RAW_8BIT, TEX_VD_RAW_16BIT))
-
-/* smoke data types */
-#define TEX_VD_SMOKEDENSITY 0
-#define TEX_VD_SMOKEHEAT 1
-#define TEX_VD_SMOKEVEL 2
-#define TEX_VD_SMOKEFLAME 3
-
-#define TEX_VD_HAIRDENSITY 0
-#define TEX_VD_HAIRVELOCITY 1
-#define TEX_VD_HAIRENERGY 2
-#define TEX_VD_HAIRRESTDENSITY 3
-
-/* data_type */
-#define TEX_VD_INTENSITY 0
-#define TEX_VD_RGBA_PREMUL 1
-
-/******************** Ocean *****************************/
-/* output */
-#define TEX_OCN_DISPLACEMENT 1
-#define TEX_OCN_FOAM 2
-#define TEX_OCN_JPLUS 3
-#define TEX_OCN_EMINUS 4
-#define TEX_OCN_EPLUS 5
-
-/* flag */
-#define TEX_OCN_GENERATE_NORMALS 1
-#define TEX_OCN_XZ 2
-
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index a7759a1d143..9817d44c96b 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -131,6 +131,8 @@ typedef struct uiWidgetColors {
short shaded;
short shadetop, shadedown;
short alpha_check;
+ float roundness;
+ float pad;
} uiWidgetColors;
typedef struct uiWidgetStateColors {
@@ -140,6 +142,8 @@ typedef struct uiWidgetStateColors {
char inner_key_sel[4];
char inner_driven[4];
char inner_driven_sel[4];
+ char inner_overridden[4];
+ char inner_overridden_sel[4];
float blend, pad;
} uiWidgetStateColors;
@@ -160,9 +164,9 @@ typedef struct uiGradientColors {
typedef struct ThemeUI {
/* Interface Elements (buttons, menus, icons) */
- uiWidgetColors wcol_regular, wcol_tool, wcol_text;
+ uiWidgetColors wcol_regular, wcol_tool, wcol_toolbar_item, wcol_text;
uiWidgetColors wcol_radio, wcol_option, wcol_toggle;
- uiWidgetColors wcol_num, wcol_numslider;
+ uiWidgetColors wcol_num, wcol_numslider, wcol_tab;
uiWidgetColors wcol_menu, wcol_pulldown, wcol_menu_back, wcol_menu_item, wcol_tooltip;
uiWidgetColors wcol_box, wcol_scroll, wcol_progress, wcol_list_item, wcol_pie_menu;
@@ -176,13 +180,24 @@ typedef struct ThemeUI {
float menu_shadow_fac;
short menu_shadow_width;
- short pad[3];
+ char editor_outline[4];
+ short pad[1];
char iconfile[256]; // FILE_MAXFILE length
float icon_alpha;
+ float icon_saturation;
+ char _pad[4];
/* Axis Colors */
char xaxis[4], yaxis[4], zaxis[4];
+
+ /* Manipulator Colors. */
+ char manipulator_hi[4];
+ char manipulator_primary[4];
+ char manipulator_secondary[4];
+ char manipulator_a[4];
+ char manipulator_b[4];
+ char pad2[4];
} ThemeUI;
/* try to put them all in one, if needed a special struct can be created as well
@@ -387,11 +402,12 @@ typedef struct bTheme {
ThemeSpace toops;
ThemeSpace ttime;
ThemeSpace tnode;
- ThemeSpace tlogic;
ThemeSpace tuserpref;
ThemeSpace tconsole;
ThemeSpace tclip;
-
+ ThemeSpace ttopbar;
+ ThemeSpace tstatusbar;
+
/* 20 sets of bone colors for this theme */
ThemeWireColor tarm[20];
/*ThemeWireColor tobj[20];*/
@@ -456,7 +472,7 @@ typedef struct UserDef {
short versions;
short dbl_click_time;
- short gameflags;
+ short pad;
short wheellinescroll;
int uiflag; /* eUserpref_UI_Flag */
int uiflag2; /* eUserpref_UI_Flag2 */
@@ -472,12 +488,16 @@ typedef struct UserDef {
int audioformat;
int audiochannels;
+ float ui_scale; /* setting for UI scale */
+ int ui_line_width; /* setting for UI line width */
+ int dpi; /* runtime, full DPI divided by pixelsize */
+ float dpi_fac; /* runtime, multiplier to scale UI elements based on DPI */
+ float pixelsize; /* runtime, line width and point size based on DPI */
+ int virtual_pixel; /* deprecated, for forward compatibility */
+
int scrollback; /* console scrollback limit */
- int dpi; /* range 48-128? */
- float ui_scale; /* interface scale */
- int ui_line_width; /* interface line width */
char node_margin; /* node insert offset (aka auto-offset) margin, but might be useful for later stuff as well */
- char pad2;
+ char pad2[5];
short transopts; /* eUserpref_Translation_Flags */
short menuthreshold1, menuthreshold2;
@@ -501,14 +521,14 @@ typedef struct UserDef {
short gp_settings; /* eGP_UserdefSettings */
short tb_leftmouse, tb_rightmouse;
struct SolidLight light[3];
- short tw_hotspot, tw_flag, tw_handlesize, tw_size;
+ short manipulator_flag, manipulator_size;
+ short pad6[3];
short textimeout, texcollectrate;
- short wmdrawmethod; /* eWM_DrawMethod */
short dragthreshold;
int memcachelimit;
int prefetchframes;
float pad_rot_angle; /* control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use */
- short frameserverport;
+ short _pad0;
short obcenter_dia;
short rvisize; /* rotating view icon size */
short rvibright; /* rotating view icon brightness */
@@ -557,7 +577,7 @@ typedef struct UserDef {
float gpencil_new_layer_col[4]; /* default color for newly created Grease Pencil layers */
short tweak_threshold;
- char navigation_mode, pad;
+ char navigation_mode, pad10;
char author[80]; /* author name for file formats supporting it */
@@ -568,8 +588,6 @@ typedef struct UserDef {
int compute_device_id;
float fcu_inactive_alpha; /* opacity of inactive F-Curves in F-Curve Editor */
- float pixelsize; /* private, set by GHOST, to multiply DPI with */
- int virtual_pixel; /* virtual pixelsize mode */
short pie_interaction_type; /* if keeping a pie menu spawn button pressed after this time, it turns into
* a drag/release pie menu */
@@ -607,7 +625,7 @@ typedef enum eUserPref_Flag {
USER_FLAG_DEPRECATED_1 = (1 << 1), /* cleared */
USER_FLAG_DEPRECATED_2 = (1 << 2), /* cleared */
USER_FLAG_DEPRECATED_3 = (1 << 3), /* cleared */
- USER_SCENEGLOBAL = (1 << 4),
+/* USER_SCENEGLOBAL = (1 << 4), deprecated */
USER_TRACKBALL = (1 << 5),
USER_FLAG_DEPRECATED_6 = (1 << 6), /* cleared */
USER_FLAG_DEPRECATED_7 = (1 << 7), /* cleared */
@@ -677,7 +695,7 @@ typedef enum eUserpref_UI_Flag {
USER_MENUOPENAUTO = (1 << 9),
USER_DEPTH_CURSOR = (1 << 10),
USER_AUTOPERSP = (1 << 11),
- USER_LOCKAROUND = (1 << 12),
+ /* USER_LOCKAROUND = (1 << 12), */ /* DEPRECATED */
USER_GLOBALUNDO = (1 << 13),
USER_ORBIT_SELECTION = (1 << 14),
USER_DEPTH_NAVIGATE = (1 << 15),
@@ -776,15 +794,6 @@ typedef enum eDupli_ID_Flags {
USER_DUP_PSYS = (1 << 11)
} eDupli_ID_Flags;
-/* UserDef.gameflags */
-typedef enum eOpenGL_RenderingOptions {
- USER_GL_RENDER_DEPRECATED_0 = (1 << 0),
- USER_GL_RENDER_DEPRECATED_1 = (1 << 1),
- USER_DISABLE_MIPMAP = (1 << 2),
- USER_GL_RENDER_DEPRECATED_3 = (1 << 3),
- USER_GL_RENDER_DEPRECATED_4 = (1 << 4),
-} eOpenGL_RenderingOptions;
-
/* selection method for opengl gpu_select_method */
typedef enum eOpenGL_SelectOptions {
USER_SELECT_AUTO = 0,
@@ -792,16 +801,6 @@ typedef enum eOpenGL_SelectOptions {
USER_SELECT_USE_SELECT_RENDERMODE = 2
} eOpenGL_SelectOptions;
-/* wm draw method.
- * UserDef.wmdrawmethod */
-typedef enum eWM_DrawMethod {
- USER_DRAW_TRIPLE = 0,
- USER_DRAW_OVERLAP = 1,
- USER_DRAW_FULL = 2,
- USER_DRAW_AUTOMATIC = 3,
- USER_DRAW_OVERLAP_FLIP = 4,
-} eWM_DrawMethod;
-
/* text draw options
* UserDef.text_render */
typedef enum eText_Draw_Options {
@@ -817,6 +816,12 @@ typedef enum eGP_UserdefSettings {
GP_PAINT_DOSIMPLIFY = (1 << 1),
} eGP_UserdefSettings;
+enum {
+ USER_MANIPULATOR_DRAW = (1 << 0),
+ USER_MANIPULATOR_DRAW_NAVIGATE = (1 << 1),
+ USER_MANIPULATOR_SHADED = (1 << 8),
+};
+
/* Color Picker Types.
* UserDef.color_picker_type */
typedef enum eColorPicker_Types {
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h
index 3319fed8cdd..a0480aa361b 100644
--- a/source/blender/makesdna/DNA_view2d_types.h
+++ b/source/blender/makesdna/DNA_view2d_types.h
@@ -64,6 +64,11 @@ typedef struct View2D {
int tab_num; /* number of tabs stored */
int tab_cur; /* current tab */
+ /* Usually set externally (as in, not in view2d files). */
+ char alpha_vert, alpha_hor; /* alpha of vertical and horizontal scrollbars (range is [0, 255]) */
+ short size_vert, size_hor; /* Dynamic size for scrollers without scale markers (no V2D_SCROLL_SCALE_FOO) */
+ short pad;
+
/* animated smooth view */
struct SmoothView2DStore *sms;
struct wmTimer *smooth_timer;
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 6f3cf4e2bec..dd3e0c25992 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -44,7 +44,7 @@ struct bGPdata;
struct SmoothView3DStore;
struct wmTimer;
struct Material;
-struct GPUFX;
+struct GPUViewport;
#include "DNA_defs.h"
#include "DNA_listBase.h"
@@ -61,23 +61,6 @@ struct GPUFX;
# undef far
#endif
-/* Background Picture in 3D-View */
-typedef struct BGpic {
- struct BGpic *next, *prev;
-
- struct Image *ima;
- struct ImageUser iuser;
- struct MovieClip *clip;
- struct MovieClipUser cuser;
- float xof, yof, size, blend, rotation;
- short view;
- short flag;
- short source;
- char pad[6];
-} BGpic;
-
-/* ********************************* */
-
typedef struct RegionView3D {
float winmat[4][4]; /* GL_PROJECTION matrix */
@@ -106,8 +89,13 @@ typedef struct RegionView3D {
struct wmTimer *smooth_timer;
- /* transform widget matrix */
+ /* transform manipulator matrix */
float twmat[4][4];
+ /* min/max dot product on twmat xyz axis. */
+ float tw_axis_min[3], tw_axis_max[3];
+ float tw_axis_matrix[3][3];
+
+ float gridview;
float viewquat[4]; /* view rotation, must be kept normalized */
float dist; /* distance from 'ofs' along -viewinv[2] vector, where result is negative as is 'ofs' */
@@ -125,7 +113,7 @@ typedef struct RegionView3D {
char pad[3];
float ofs_lock[2]; /* normalized offset for locked view: (-1, -1) bottom left, (1, 1) upper right */
- short twdrawflag;
+ short twdrawflag; /* XXX can easily get rid of this (Julian) */
short rflag;
@@ -133,17 +121,52 @@ typedef struct RegionView3D {
float lviewquat[4];
short lpersp, lview; /* lpersp can never be set to 'RV3D_CAMOB' */
- float gridview;
- float tw_idot[3]; /* manipulator runtime: (1 - dot) product with view vector (used to check view alignment) */
-
-
/* active rotation from NDOF or elsewhere */
float rot_angle;
float rot_axis[3];
-
- struct GPUFX *compositor;
} RegionView3D;
+typedef struct View3DCursor {
+ float location[3];
+ float rotation[4];
+ char _pad[4];
+} View3DCursor;
+
+/* 3D Viewport Shading setings */
+typedef struct View3DShading {
+ short flag;
+ short color_type;
+
+ short light;
+ char pad[2];
+ char studio_light[256]; /* FILE_MAXFILE */
+
+ float shadow_intensity;
+ float single_color[3];
+
+ float studiolight_rot_z;
+ float pad2;
+
+ float object_outline_color[3];
+ float pad3;
+} View3DShading;
+
+/* 3D Viewport Overlay setings */
+typedef struct View3DOverlay {
+ int flag;
+
+ /* Edit mode settings */
+ int edit_flag;
+ float normals_length;
+ float backwire_opacity;
+
+ /* Paint mode settings */
+ int paint_flag;
+
+ /* Armature edit/pose mode settings */
+ int arm_flag;
+} View3DOverlay;
+
/* 3D ViewPort Struct */
typedef struct View3D {
struct SpaceLink *next, *prev;
@@ -168,9 +191,6 @@ typedef struct View3D {
struct Object *camera, *ob_centre;
rctf render_border;
- struct ListBase bgpicbase;
- struct BGpic *bgpic DNA_DEPRECATED; /* deprecated, use bgpicbase, only kept for do_versions(...) */
-
struct View3D *localvd; /* allocated backup of its self while in localview */
char ob_centre_bone[64]; /* optional string for armature bone to define center, MAXBONENAME */
@@ -178,18 +198,17 @@ typedef struct View3D {
unsigned int lay;
int layact;
- /**
- * The drawing mode for the 3d display. Set to OB_BOUNDBOX, OB_WIRE, OB_SOLID,
- * OB_TEXTURE, OB_MATERIAL or OB_RENDER */
- short drawtype;
short ob_centre_cursor; /* optional bool for 3d cursor to define center */
- short scenelock, around;
- short flag, flag2;
+ short scenelock, _pad0;
+ short flag, flag2, pad2;
float lens, grid;
float near, far;
float ofs[3] DNA_DEPRECATED; /* XXX deprecated */
- float cursor[3];
+
+ View3DCursor cursor;
+
+ char _pad[4];
short matcap_icon; /* icon id */
@@ -197,22 +216,16 @@ typedef struct View3D {
short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */
char gridflag;
- /* transform widget info */
- char twtype, twmode, twflag;
+ /* transform manipulator info */
+ char twtype, _pad5, twflag;
short flag3;
-
- /* afterdraw, for xray & transparent */
- struct ListBase afterdraw_transp;
- struct ListBase afterdraw_xray;
- struct ListBase afterdraw_xraytransp;
/* drawflags, denoting state */
char zbuf, transp, xray;
char multiview_eye; /* multiview current eye - for internal use */
- /* built-in shader effects (eGPUFXFlags) */
char pad3[4];
/* note, 'fx_settings.dof' is currently _not_ allocated,
@@ -220,13 +233,11 @@ typedef struct View3D {
struct GPUFXSettings fx_settings;
void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */
- /* Allocated per view, not library data (used by matcap). */
- struct Material *defmaterial;
/* XXX deprecated? */
struct bGPdata *gpd DNA_DEPRECATED; /* Grease-Pencil Data (annotation layers) */
- /* multiview - stereo 3d */
+ /* Stereoscopy settings */
short stereo3d_flag;
char stereo3d_camera;
char pad4;
@@ -234,12 +245,13 @@ typedef struct View3D {
float stereo3d_volume_alpha;
float stereo3d_convergence_alpha;
- /* Previous viewport draw type.
- * Runtime-only, set in the rendered viewport toggle operator.
- */
- short prev_drawtype;
- short pad1;
- float pad2;
+ /* Display settings */
+ short drawtype; /* Shading mode (OB_SOLID, OB_TEXTURE, ..) */
+ short prev_drawtype; /* Runtime, for toggle between rendered viewport. */
+ int pad5;
+
+ View3DShading shading;
+ View3DOverlay overlay;
} View3D;
@@ -249,12 +261,12 @@ typedef struct View3D {
#define V3D_S3D_DISPVOLUME (1 << 2)
/* View3D->flag (short) */
-/*#define V3D_DISPIMAGE 1*/ /*UNUSED*/
-#define V3D_DISPBGPICS 2
+/*#define V3D_FLAG_DEPRECATED_1 (1 << 0) */ /*UNUSED */
+/*#define V3D_FLAG_DEPRECATED_2 (1 << 1) */ /* UNUSED */
#define V3D_HIDE_HELPLINES 4
#define V3D_INVALID_BACKBUF 8
-#define V3D_ALIGN 1024
+/* #define V3D_FLAG_DEPRECATED_10 (1 << 10) */ /* UNUSED */
#define V3D_SELECT_OUTLINE 2048
#define V3D_ZBUF_SELECT 4096
#define V3D_GLOBAL_STATS 8192
@@ -269,7 +281,7 @@ typedef struct View3D {
#define RV3D_CLIPPING 4
#define RV3D_NAVIGATING 8
#define RV3D_GPULIGHT_UPDATE 16
-#define RV3D_IS_GAME_ENGINE 32 /* runtime flag, used to check if LoD's should be used */
+/*#define RV3D_IS_GAME_ENGINE 32 *//* UNUSED */
/**
* Disable zbuffer offset, skip calls to #ED_view3d_polygon_offset.
* Use when precise surface depth is needed and picking bias isn't, see T45434).
@@ -310,12 +322,62 @@ typedef struct View3D {
#define V3D_SOLID_MATCAP (1 << 12) /* user flag */
#define V3D_SHOW_SOLID_MATCAP (1 << 13) /* runtime flag */
#define V3D_OCCLUDE_WIRE (1 << 14)
-#define V3D_SHADELESS_TEX (1 << 15)
+#define V3D_SHOW_MODE_SHADE_OVERRIDE (1 << 15)
/* View3d->flag3 (short) */
#define V3D_SHOW_WORLD (1 << 0)
+/* View3DShading->light */
+enum {
+ V3D_LIGHTING_FLAT = 0,
+ V3D_LIGHTING_STUDIO = 1,
+ V3D_LIGHTING_SCENE = 2
+};
+
+/* View3DShading->flag */
+enum {
+ V3D_SHADING_OBJECT_OUTLINE = (1 << 0),
+ V3D_SHADING_XRAY = (1 << 1),
+ V3D_SHADING_SHADOW = (1 << 2),
+};
+
+/* View3DShading->single_color_type */
+enum {
+ V3D_SHADING_MATERIAL_COLOR = 0,
+ V3D_SHADING_RANDOM_COLOR = 1,
+ V3D_SHADING_SINGLE_COLOR = 2,
+ V3D_SHADING_OBJECT_COLOR = 3,
+};
+
+/* View3DOverlay->flag */
+enum {
+ V3D_OVERLAY_FACE_ORIENTATION = (1 << 0),
+ V3D_OVERLAY_HIDE_CURSOR = (1 << 1),
+ V3D_OVERLAY_BONE_SELECTION = (1 << 2),
+};
+
+/* View3DOverlay->edit_flag */
+enum {
+ V3D_OVERLAY_EDIT_VERT_NORMALS = (1 << 0),
+ V3D_OVERLAY_EDIT_LOOP_NORMALS = (1 << 1),
+ V3D_OVERLAY_EDIT_FACE_NORMALS = (1 << 2),
+
+ V3D_OVERLAY_EDIT_OCCLUDE_WIRE = (1 << 3),
+
+ V3D_OVERLAY_EDIT_WEIGHT = (1 << 4),
+};
+
+/* View3DOverlay->arm_flag */
+enum {
+ V3D_OVERLAY_ARM_TRANSP_BONES = (1 << 0),
+};
+
+/* View3DOverlay->paint_flag */
+enum {
+ V3D_OVERLAY_PAINT_WIRE = (1 << 0),
+};
+
/* View3D->around */
enum {
/* center of the bounding box */
@@ -346,49 +408,20 @@ enum {
#define V3D_SHOW_Y 4
#define V3D_SHOW_Z 8
-/* View3d->twtype (bits, we can combine them) */
-#define V3D_MANIP_TRANSLATE 1
-#define V3D_MANIP_ROTATE 2
-#define V3D_MANIP_SCALE 4
-
-/* View3d->twmode */
+/* Scene.orientation_type */
#define V3D_MANIP_GLOBAL 0
#define V3D_MANIP_LOCAL 1
#define V3D_MANIP_NORMAL 2
#define V3D_MANIP_VIEW 3
#define V3D_MANIP_GIMBAL 4
-#define V3D_MANIP_CUSTOM 5 /* anything of value 5 or higher is custom */
+#define V3D_MANIP_CURSOR 5
+#define V3D_MANIP_CUSTOM 1024
-/* View3d->twflag */
- /* USE = user setting, DRAW = based on selection */
-#define V3D_USE_MANIPULATOR 1
-#define V3D_DRAW_MANIPULATOR 2
-/* #define V3D_CALC_MANIPULATOR 4 */ /*UNUSED*/
-
-/* BGPic->flag */
-/* may want to use 1 for select ? */
+/* View3d->twflag (also) */
enum {
- V3D_BGPIC_EXPANDED = (1 << 1),
- V3D_BGPIC_CAMERACLIP = (1 << 2),
- V3D_BGPIC_DISABLED = (1 << 3),
- V3D_BGPIC_FOREGROUND = (1 << 4),
-
- /* Camera framing options */
- V3D_BGPIC_CAMERA_ASPECT = (1 << 5), /* don't stretch to fit the camera view */
- V3D_BGPIC_CAMERA_CROP = (1 << 6), /* crop out the image */
-
- /* Axis flip options */
- V3D_BGPIC_FLIP_X = (1 << 7),
- V3D_BGPIC_FLIP_Y = (1 << 8),
+ V3D_MANIPULATOR_DRAW = (1 << 0),
};
-#define V3D_BGPIC_EXPANDED (V3D_BGPIC_EXPANDED | V3D_BGPIC_CAMERACLIP)
-
-/* BGPic->source */
-/* may want to use 1 for select ?*/
-#define V3D_BGPIC_IMAGE 0
-#define V3D_BGPIC_MOVIE 1
-
#define RV3D_CAMZOOM_MIN -30
#define RV3D_CAMZOOM_MAX 600
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 20470ba862e..7d7fa5fcf23 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -32,6 +32,7 @@
#define __DNA_WINDOWMANAGER_TYPES_H__
#include "DNA_listBase.h"
+#include "DNA_screen_types.h"
#include "DNA_vec_types.h"
#include "DNA_userdef_types.h"
@@ -41,6 +42,7 @@
struct wmWindowManager;
struct wmWindow;
+struct wmMsgBus;
struct wmEvent;
struct wmGesture;
struct wmOperatorType;
@@ -159,12 +161,15 @@ typedef struct wmWindowManager {
char is_interface_locked; /* indicates whether interface is locked for user interaction */
char par[7];
+
+ struct wmMsgBus *message_bus;
+
} wmWindowManager;
/* wmWindowManager.initialized */
enum {
- WM_INIT_WINDOW = (1<<0),
- WM_INIT_KEYMAP = (1<<1),
+ WM_WINDOW_IS_INITIALIZED = (1<<0),
+ WM_KEYMAP_IS_INITIALIZED = (1<<1),
};
/* IME is win32 only! */
@@ -179,10 +184,18 @@ typedef struct wmWindow {
struct wmWindow *next, *prev;
void *ghostwin; /* don't want to include ghost.h stuff */
+ void *gwnctx; /* don't want to include gawin stuff */
+
+ struct Scene *scene; /* The scene displayed in this window. */
+ struct Scene *new_scene; /* temporary when switching */
+
+ struct WorkSpaceInstanceHook *workspace_hook;
- struct bScreen *screen; /* active screen */
- struct bScreen *newscreen; /* temporary when switching */
- char screenname[64]; /* MAX_ID_NAME for matching window with active screen after file read */
+ /** Global areas aren't part of the screen, but part of the window directly.
+ * \note Code assumes global areas with fixed height, fixed width not supported yet */
+ ScrAreaMap global_areas;
+
+ struct bScreen *screen DNA_DEPRECATED;
short posx, posy, sizex, sizey; /* window coords */
short windowstate; /* borderless, full */
@@ -193,8 +206,7 @@ typedef struct wmWindow {
short modalcursor; /* the current modal cursor */
short grabcursor; /* cursor grab mode */
short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */
- short multisamples; /* amount of samples for OpenGL FSA the ghost window was created with, if zero no FSA */
- short pad[3];
+ short pad[4];
int winid; /* winid also in screens, is for retrieving this window after read */
@@ -204,22 +216,16 @@ typedef struct wmWindow {
struct wmEvent *eventstate; /* storage for event system */
- struct wmSubWindow *curswin; /* internal for wm_subwindow.c only */
-
struct wmGesture *tweak; /* internal for wm_operators.c */
/* Input Method Editor data - complex character input (esp. for asian character input)
* Currently WIN32, runtime-only data */
struct wmIMEData *ime_data;
- int drawmethod, drawfail; /* internal for wm_draw.c only */
- ListBase drawdata; /* internal for wm_draw.c only */
-
ListBase queue; /* all events (ghost level events were handled) */
ListBase handlers; /* window+screen handlers, handled last */
ListBase modalhandlers; /* priority handlers, handled first */
- ListBase subwindows; /* opengl stuff for sub windows, see notes in wm_subwindow.c */
ListBase gesture; /* gesture stuff */
struct Stereo3dFormat *stereo3d_format; /* properties for stereoscopic displays */
@@ -311,6 +317,7 @@ typedef struct wmKeyMap {
char idname[64]; /* global editor keymaps, or for more per space/region */
short spaceid; /* same IDs as in DNA_space_types.h */
short regionid; /* see above */
+ char owner_id[64]; /* optional, see: #wmOwnerID */
short flag; /* general flags */
short kmi_id; /* last kmi id */
@@ -371,6 +378,10 @@ typedef struct wmOperator {
struct uiLayout *layout; /* runtime for drawing */
short flag, pad[3];
+ /* Screen context the operator was finished in. It gets temporarily
+ * restored during operator repeat. Only set for registered operators. */
+ struct ScrArea *execution_area;
+ struct ARegion *execution_region;
} wmOperator;
/* operator type return flags: exec(), invoke() modal(), return values */
diff --git a/source/blender/makesdna/DNA_workspace_types.h b/source/blender/makesdna/DNA_workspace_types.h
new file mode 100644
index 00000000000..83b6867afd3
--- /dev/null
+++ b/source/blender/makesdna/DNA_workspace_types.h
@@ -0,0 +1,207 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file DNA_workspace_types.h
+ * \ingroup DNA
+ *
+ * Use API in BKE_workspace.h!
+ * Struct members marked with DNA_PRIVATE_WORKSPACE will throw a
+ * warning saying it's deprecated when used outside of workspace.c.
+ */
+
+#ifndef __DNA_WORKSPACE_TYPES_H__
+#define __DNA_WORKSPACE_TYPES_H__
+
+#include "DNA_scene_types.h"
+
+/* Same logic as DNA_DEPRECATED_ALLOW, but throws 'deprecated'
+ * warnings if DNA_PRIVATE_WORKSPACE_ALLOW is not defined */
+#ifdef DNA_PRIVATE_WORKSPACE_ALLOW
+ /* allow use of private items */
+# define DNA_PRIVATE_WORKSPACE
+#else
+# ifndef DNA_PRIVATE_WORKSPACE
+# define DNA_PRIVATE_WORKSPACE DNA_PRIVATE_ATTR
+# endif
+#endif
+
+#ifdef DNA_PRIVATE_READ_WRITE_ALLOW
+# define DNA_PRIVATE_WORKSPACE_READ_WRITE
+#else
+# ifndef DNA_PRIVATE_WORKSPACE_READ_WRITE
+# define DNA_PRIVATE_WORKSPACE_READ_WRITE DNA_PRIVATE_WORKSPACE
+# endif
+#endif
+
+/* Currently testing, allow to disable. */
+#define USE_WORKSPACE_TOOL
+
+#
+#
+typedef struct bToolRef_Runtime {
+ int cursor;
+
+ /* One of these 3 must be defined. */
+ char keymap[64];
+ char manipulator_group[64];
+ char data_block[64];
+
+ /* index when a tool is a member of a group */
+ int index;
+} bToolRef_Runtime;
+
+
+/* Stored per mode. */
+typedef struct bToolRef {
+ struct bToolRef *next, *prev;
+ char idname[64];
+
+ /** Use to avoid initializing the same tool multiple times. */
+ short tag;
+
+ /** bToolKey (spacetype, mode), used in 'WM_api.h' */
+ short space_type;
+ /**
+ * Value depends ont the 'space_type', object mode for 3D view, image editor has own mode too.
+ * RNA needs to handle using item function.
+ */
+ int mode;
+
+ /**
+ * Use for tool options, each group's name must match a tool name:
+ *
+ * {"Tool Name": {"SOME_OT_operator": {...}, ..}, ..}
+ *
+ * This is done since different tools may call the same operators with their own options.
+ */
+ IDProperty *properties;
+
+ /** Variables needed to operate the tool. */
+ bToolRef_Runtime *runtime;
+} bToolRef;
+
+
+/**
+ * \brief Wrapper for bScreen.
+ *
+ * bScreens are IDs and thus stored in a main list-base. We also want to store a list-base of them within the
+ * workspace (so each workspace can have its own set of screen-layouts) which would mess with the next/prev pointers.
+ * So we use this struct to wrap a bScreen pointer with another pair of next/prev pointers.
+ */
+typedef struct WorkSpaceLayout {
+ struct WorkSpaceLayout *next, *prev;
+
+ struct bScreen *screen DNA_PRIVATE_WORKSPACE;
+ /* The name of this layout, we override the RNA name of the screen with this (but not ID name itself) */
+ char name[64] DNA_PRIVATE_WORKSPACE; /* MAX_NAME */
+} WorkSpaceLayout;
+
+/** Optional tags, which features to use, aligned with #bAddon names by convention. */
+typedef struct wmOwnerID {
+ struct wmOwnerID *next, *prev;
+ char name[64] DNA_PRIVATE_WORKSPACE; /* MAX_NAME */
+} wmOwnerID;
+
+typedef struct WorkSpace {
+ ID id;
+
+ ListBase layouts DNA_PRIVATE_WORKSPACE; /* WorkSpaceLayout */
+ /* Store for each hook (so for each window) which layout has
+ * been activated the last time this workspace was visible. */
+ ListBase hook_layout_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */
+ ListBase scene_viewlayer_relations DNA_PRIVATE_WORKSPACE_READ_WRITE; /* WorkSpaceDataRelation */
+
+ /* Feature tagging (use for addons) */
+ ListBase owner_ids DNA_PRIVATE_WORKSPACE_READ_WRITE; /* wmOwnerID */
+
+ /* should be: '#ifdef USE_WORKSPACE_TOOL'. */
+
+ /** List of #bToolRef */
+ ListBase tools;
+
+ /**
+ * BAD DESIGN WARNING:
+ * This is a workaround for the topbar not knowing which tools spac */
+ char tools_space_type;
+ /** Type is different for each space-type. */
+ char tools_mode;
+
+ char _pad[2];
+ int flags DNA_PRIVATE_WORKSPACE; /* enum eWorkSpaceFlags */
+} WorkSpace;
+
+/* internal struct, but exported for read/write */
+#if defined(DNA_PRIVATE_READ_WRITE_ALLOW) || defined(DNA_PRIVATE_WORKSPACE_ALLOW)
+
+/**
+ * Generic (and simple/primitive) struct for storing a history of assignments/relations
+ * of workspace data to non-workspace data in a listbase inside the workspace.
+ *
+ * Using this we can restore the old state of a workspace if the user switches back to it.
+ *
+ * Usage
+ * =====
+ * When activating a workspace, it should activate the screen-layout that was active in that
+ * workspace before *in this window*.
+ * More concretely:
+ * * There are two windows, win1 and win2.
+ * * Both show workspace ws1, but both also had workspace ws2 activated at some point before.
+ * * Last time ws2 was active in win1, screen-layout sl1 was activated.
+ * * Last time ws2 was active in win2, screen-layout sl2 was activated.
+ * * When changing from ws1 to ws2 in win1, screen-layout sl1 should be activated again.
+ * * When changing from ws1 to ws2 in win2, screen-layout sl2 should be activated again.
+ * So that means we have to store the active screen-layout in a per workspace, per window
+ * relation. This struct is used to store an active screen-layout for each window within the
+ * workspace.
+ * To find the screen-layout to activate for this window-workspace combination, simply lookup
+ * the WorkSpaceDataRelation with the workspace-hook of the window set as parent.
+ */
+typedef struct WorkSpaceDataRelation {
+ struct WorkSpaceDataRelation *next, *prev;
+
+ /* the data used to identify the relation (e.g. to find screen-layout (= value) from/for a hook) */
+ void *parent;
+ /* The value for this parent-data/workspace relation */
+ void *value;
+
+ /** Use when we reference non-ID data, this allows use to look it up when linking in a workspace. */
+ char value_name[64]; /* MAX_NAME. */
+} WorkSpaceDataRelation;
+
+#endif /* DNA_PRIVATE_WORKSPACE_READ_WRITE */
+
+/**
+ * Little wrapper to store data that is going to be per window, but comming from the workspace.
+ * It allows us to keep workspace and window data completely separate.
+ */
+typedef struct WorkSpaceInstanceHook {
+ WorkSpace *active DNA_PRIVATE_WORKSPACE;
+ struct WorkSpaceLayout *act_layout DNA_PRIVATE_WORKSPACE;
+
+ /* Needed because we can't change workspaces/layouts in running handler loop, it would break context. */
+ WorkSpace *temp_workspace_store;
+ struct WorkSpaceLayout *temp_layout_store;
+} WorkSpaceInstanceHook;
+
+typedef enum eWorkSpaceFlags {
+ WORKSPACE_USE_FILTER_BY_ORIGIN = (1 << 1),
+} eWorkSpaceFlags;
+
+#endif /* __DNA_WORKSPACE_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 5fd4c9fd407..84050894faa 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -47,18 +47,15 @@ struct MTex;
/**
* World defines general modeling data such as a background fill,
- * gravity, color model etc. It mixes game-data, rendering
- * data and modeling data. */
+ * gravity, color model etc. It mixes rendering data and modeling data. */
typedef struct World {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
-
- short colormodel, totex;
+
+ char _pad0[4];
short texact, mistype;
float horr, horg, horb;
- float zenr, zeng, zenb;
- float ambr, ambg, ambb;
/**
* Exposure= mult factor. unused now, but maybe back later. Kept in to be upward compat.
@@ -67,60 +64,25 @@ typedef struct World {
*/
float exposure, exp, range;
float linfac, logfac;
-
- /**
- * Gravitation constant for the game world
- */
- float gravity; // XXX moved to scene->gamedata in 2.5
-
- /**
- * Radius of the activity bubble, in Manhattan length. Objects
- * outside the box are activity-culled. */
- float activityBoxRadius; // XXX moved to scene->gamedata in 2.5
- short skytype;
/**
* Some world modes
* bit 0: Do mist
- * bit 1: Do stars
- * bit 2: (reserved) depth of field
- * bit 3: (gameengine): Activity culling is enabled.
- * bit 4: ambient occlusion
- * bit 5: (gameengine) : enable Bullet DBVT tree for view frustum culling
*/
short mode; // partially moved to scene->gamedata in 2.5
- short occlusionRes; /* resolution of occlusion Z buffer in pixel */ // XXX moved to scene->gamedata in 2.5
- short physicsEngine; /* here it's aligned */ // XXX moved to scene->gamedata in 2.5
- short ticrate, maxlogicstep, physubstep, maxphystep; // XXX moved to scene->gamedata in 2.5
-
+ short pad2[3];
+
float misi, miststa, mistdist, misthi;
-
- float starr DNA_DEPRECATED, starg DNA_DEPRECATED, starb DNA_DEPRECATED, stark DNA_DEPRECATED; /* Deprecated */
- float starsize DNA_DEPRECATED, starmindist DNA_DEPRECATED;
- float stardist DNA_DEPRECATED, starcolnoise DNA_DEPRECATED;
-
- /* unused now: DOF */
- short dofsta, dofend, dofmin, dofmax;
-
+
/* ambient occlusion */
- float aodist, aodistfac, aoenergy, aobias;
- short aomode, aosamp, aomix, aocolor;
- float ao_adapt_thresh, ao_adapt_speed_fac;
- float ao_approx_error, ao_approx_correction;
- float ao_indirect_energy, ao_env_energy, ao_pad2;
- short ao_indirect_bounces, ao_pad;
- short ao_samp_method, ao_gather_method, ao_approx_passes;
-
- /* assorted settings (in the middle of ambient occlusion settings for padding reasons) */
- short flag;
-
- /* ambient occlusion (contd...) */
- float *aosphere, *aotables;
+ float aodist, aoenergy;
+ /* assorted settings */
+ short flag, pad3[3];
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
- struct MTex *mtex[18]; /* MAX_MTEX */
- short pr_texture, use_nodes, pad[2];
+ short pr_texture, use_nodes, pad;
+ short update_flag; /* XXX temporary flag waiting for depsgraph proper tagging */
/* previews */
struct PreviewImage *preview;
@@ -128,71 +90,28 @@ typedef struct World {
/* nodes */
struct bNodeTree *nodetree;
+ float mistend, pad1; /* runtime : miststa + mistdist, used for drawing camera */
ListBase gpumaterial; /* runtime */
} World;
/* **************** WORLD ********************* */
-/* skytype */
-#define WO_SKYBLEND 1
-#define WO_SKYREAL 2
-#define WO_SKYPAPER 4
-/* while render: */
-#define WO_SKYTEX 8
-#define WO_ZENUP 16
-
/* mode */
#define WO_MIST 1
//#define WO_STARS 2 /* deprecated */
/*#define WO_DOF 4*/
-#define WO_ACTIVITY_CULLING 8
-#define WO_ENV_LIGHT 16
-#define WO_DBVT_CULLING 32
+//#define WO_ACTIVITY_CULLING 8 /* deprecated */
+//#define WO_ENV_LIGHT 16
+//#define WO_DBVT_CULLING 32 /* deprecated */
#define WO_AMB_OCC 64
-#define WO_INDIRECT_LIGHT 128
+//#define WO_INDIRECT_LIGHT 128
-/* aomix */
enum {
- WO_AOADD = 0,
-#ifdef DNA_DEPRECATED
- WO_AOSUB = 1, /* deprecated */
- WO_AOADDSUB = 2, /* deprecated */
-#endif
- WO_AOMUL = 3,
+ WO_MIST_QUADRATIC = 0,
+ WO_MIST_LINEAR = 1,
+ WO_MIST_INVERSE_QUADRATIC = 2,
};
-/* ao_samp_method - methods for sampling the AO hemi */
-#define WO_AOSAMP_CONSTANT 0
-#define WO_AOSAMP_HALTON 1
-#define WO_AOSAMP_HAMMERSLEY 2
-
-/* aomode (use distances & random sampling modes) */
-#define WO_AODIST 1
-#define WO_AORNDSMP 2
-#define WO_AOCACHE 4
-
-/* aocolor */
-#define WO_AOPLAIN 0
-#define WO_AOSKYCOL 1
-#define WO_AOSKYTEX 2
-
-/* ao_gather_method */
-#define WO_AOGATHER_RAYTRACE 0
-#define WO_AOGATHER_APPROX 1
-
-/* texco (also in DNA_material_types.h) */
-#define TEXCO_ANGMAP 64
-#define TEXCO_H_SPHEREMAP 256
-#define TEXCO_H_TUBEMAP 1024
-#define TEXCO_EQUIRECTMAP 2048
-
-/* mapto */
-#define WOMAP_BLEND 1
-#define WOMAP_HORIZ 2
-#define WOMAP_ZENUP 4
-#define WOMAP_ZENDOWN 8
-// #define WOMAP_MIST 16 /* Deprecated */
-
/* flag */
#define WO_DS_EXPAND (1<<0)
/* NOTE: this must have the same value as MA_DS_SHOW_TEXS,
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index 2e21223d042..9c44d60b7c2 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -313,10 +313,52 @@ BLI_INLINE const char *pad_up_4(const char *ptr)
}
/**
+ * Temporary DNA doversion for files that were created with Blender 2.80
+ * between October 2016, and November 2017 (>=280.0 and < 280.2).
+ *
+ * /note This would be way more efficient if we can get the version from SDNA
+ * So we could return true if version == 280 && subversion < 2.
+ *
+ * Returns true if we need to do the DNA renaming.
+ */
+static bool need_doversion_280(SDNA *sdna, int *data, const bool data_alloc)
+{
+ if (data_alloc == false) {
+ return false;
+ }
+
+ bool active_layer = false, render_layers = false;
+
+ const char *cp = (char *)data;
+ for (int nr = 0; nr < sdna->nr_names; nr++) {
+ if (strcmp(cp, "active_layer") == 0) {
+ active_layer = true;
+ if (active_layer && render_layers) {
+ return true;
+ }
+ }
+ else if (strcmp(cp, "render_layers") == 0) {
+ render_layers = true;
+ if (active_layer && render_layers) {
+ return true;
+ }
+ }
+
+ while (*cp) cp++;
+ cp++;
+ }
+
+ /* If someone adds only one of them to the DNA, don't! */
+ BLI_assert(!(active_layer || render_layers));
+ return false;
+}
+
+/**
* In sdna->data the data, now we convert that to something understandable
*/
static bool init_structDNA(
SDNA *sdna, bool do_endian_swap,
+ bool data_alloc,
const char **r_error_message)
{
int *data, *verg, gravity_fix = -1;
@@ -361,6 +403,10 @@ static bool init_structDNA(
*r_error_message = "NAME error in SDNA file";
return false;
}
+
+ /* Temporary DNA doversion for files that were created with Blender 2.80
+ * between 280.0 and 280.2. */
+ const bool doversion_280 = need_doversion_280(sdna, data, data_alloc);
cp = (char *)data;
for (int nr = 0; nr < sdna->nr_names; nr++) {
@@ -375,6 +421,28 @@ static bool init_structDNA(
gravity_fix = nr;
}
}
+ else if (doversion_280) {
+ if (strcmp(cp, "*render_layer") == 0) {
+ /* WorkSpace. */
+ sdna->names[nr] = "*view_layer";
+ }
+ else if (strcmp(cp, "*scene_layer") == 0) {
+ /* ParticleEditSettings. */
+ sdna->names[nr] = "*view_layer";
+ }
+ else if (strcmp(cp, "render_layers") == 0) {
+ /* Scene. */
+ sdna->names[nr] = "view_layers";
+ }
+ else if (strcmp(cp, "active_layer") == 0) {
+ /* Scene. */
+ sdna->names[nr] = "active_view_layer";
+ }
+ else if (strcmp(cp, "*cur_render_layer") == 0) {
+ /* FileGlobal. */
+ sdna->names[nr] = "*cur_view_layer";
+ }
+ }
while (*cp) cp++;
cp++;
@@ -408,9 +476,24 @@ static bool init_structDNA(
/* this is a patch, to change struct names without a conflict with SDNA */
/* be careful to use it, in this case for a system-struct (opengl/X) */
- if (*cp == 'b') {
- /* struct Screen was already used by X, 'bScreen' replaces the old IrisGL 'Screen' struct */
- if (strcmp("bScreen", cp) == 0) sdna->types[nr] = cp + 1;
+ /* struct Screen was already used by X, 'bScreen' replaces the old IrisGL 'Screen' struct */
+ if (strcmp("bScreen", cp) == 0) {
+ sdna->types[nr] = cp + 1;
+ }
+ /* Groups renamed to collections in 2.8 */
+ else if (strcmp("Collection", cp) == 0) {
+ sdna->types[nr] = "Group";
+ }
+ else if (strcmp("CollectionObject", cp) == 0) {
+ sdna->types[nr] = "GroupObject";
+ }
+ else if (doversion_280) {
+ if (strcmp(cp, "SceneLayer") == 0) {
+ sdna->types[nr] = "ViewLayer";
+ }
+ else if (strcmp(cp, "SceneLayerEngineData") == 0) {
+ sdna->types[nr] = "ViewLayerEngineData";
+ }
}
while (*cp) cp++;
@@ -554,7 +637,7 @@ SDNA *DNA_sdna_from_data(
sdna->data_alloc = data_alloc;
- if (init_structDNA(sdna, do_endian_swap, &error_message)) {
+ if (init_structDNA(sdna, do_endian_swap, data_alloc, &error_message)) {
return sdna;
}
else {
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index a5f474b93bf..c1f8341ddc6 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -100,10 +100,6 @@ static const char *includefiles[] = {
"DNA_sequence_types.h",
"DNA_effect_types.h",
"DNA_outliner_types.h",
- "DNA_property_types.h",
- "DNA_sensor_types.h",
- "DNA_controller_types.h",
- "DNA_actuator_types.h",
"DNA_sound_types.h",
"DNA_group_types.h",
"DNA_armature_types.h",
@@ -130,6 +126,10 @@ static const char *includefiles[] = {
"DNA_freestyle_types.h",
"DNA_linestyle_types.h",
"DNA_cachefile_types.h",
+ "DNA_layer_types.h",
+ "DNA_workspace_types.h",
+ "DNA_lightprobe_types.h",
+
/* see comment above before editing! */
/* empty string to indicate end of includefiles */
@@ -504,6 +504,17 @@ static int preprocess_include(char *maindata, int len)
a -= 13;
cp += 13;
}
+ else if (strncmp("DNA_PRIVATE_WORKSPACE", cp, 21) == 0) {
+ /* Check for DNA_PRIVATE_WORKSPACE_READ_WRITE */
+ if (strncmp("_READ_WRITE", cp + 21, 11) == 0) {
+ a -= 31;
+ cp += 31;
+ }
+ else {
+ a -= 20;
+ cp += 20;
+ }
+ }
else {
md[0] = cp[0];
md++;
@@ -1313,10 +1324,6 @@ int main(int argc, char **argv)
#include "DNA_sequence_types.h"
#include "DNA_effect_types.h"
#include "DNA_outliner_types.h"
-#include "DNA_property_types.h"
-#include "DNA_sensor_types.h"
-#include "DNA_controller_types.h"
-#include "DNA_actuator_types.h"
#include "DNA_sound_types.h"
#include "DNA_group_types.h"
#include "DNA_armature_types.h"
@@ -1343,4 +1350,8 @@ int main(int argc, char **argv)
#include "DNA_freestyle_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_cachefile_types.h"
+#include "DNA_layer_types.h"
+#include "DNA_workspace_types.h"
+#include "DNA_lightprobe_types.h"
+
/* end of list */