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:
authorDalai Felinto <dfelinto@gmail.com>2015-09-24 18:24:20 +0300
committerDalai Felinto <dfelinto@gmail.com>2015-09-24 18:24:20 +0300
commit27b3ea622f8bd313a8e2827dfec752bf2125566c (patch)
treef212e49d224ce8e1cfc3b17a64ae524711494391 /source/blender/makesdna
parent372dff8d1dc7e24d4b2cd37de245588ecfce8bfa (diff)
parentde80e687689032cb85179a1f7e89750573631d5d (diff)
Merge remote-tracking branch 'origin/master' into cycles_camera_nodescycles_camera_nodes
Note: the branch currently crashes in blender_camera_nodes.cpp: BL::NodeTree b_ntree = b_data.node_groups[nodes_tree_name]; The crash was introduced in: cb7cf523e5c000609f32a382e2c0fcc57f635a42 Conflicts: intern/cycles/SConscript intern/cycles/blender/addon/__init__.py intern/cycles/blender/addon/properties.py intern/cycles/blender/blender_camera.cpp intern/cycles/kernel/kernel_types.h intern/cycles/kernel/svm/svm.h intern/cycles/kernel/svm/svm_types.h intern/cycles/render/camera.cpp intern/cycles/render/camera.h
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h199
-rw-r--r--source/blender/makesdna/DNA_action_types.h33
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h3
-rw-r--r--source/blender/makesdna/DNA_anim_types.h20
-rw-r--r--source/blender/makesdna/DNA_armature_types.h12
-rw-r--r--source/blender/makesdna/DNA_brush_types.h55
-rw-r--r--source/blender/makesdna/DNA_camera_types.h41
-rw-r--r--source/blender/makesdna/DNA_cloth_types.h19
-rw-r--r--source/blender/makesdna/DNA_color_types.h1
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h36
-rw-r--r--source/blender/makesdna/DNA_curve_types.h214
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h21
-rw-r--r--source/blender/makesdna/DNA_documentation.h18
-rw-r--r--source/blender/makesdna/DNA_dynamicpaint_types.h167
-rw-r--r--source/blender/makesdna/DNA_fileglobal_types.h4
-rw-r--r--source/blender/makesdna/DNA_freestyle_types.h95
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h110
-rw-r--r--source/blender/makesdna/DNA_gpu_types.h68
-rw-r--r--source/blender/makesdna/DNA_group_types.h4
-rw-r--r--source/blender/makesdna/DNA_image_types.h67
-rw-r--r--source/blender/makesdna/DNA_key_types.h6
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h37
-rw-r--r--source/blender/makesdna/DNA_linestyle_types.h135
-rw-r--r--source/blender/makesdna/DNA_material_types.h2
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h105
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h113
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h174
-rw-r--r--source/blender/makesdna/DNA_node_types.h96
-rw-r--r--source/blender/makesdna/DNA_object_force.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h35
-rw-r--r--source/blender/makesdna/DNA_outliner_types.h50
-rw-r--r--source/blender/makesdna/DNA_packedFile_types.h3
-rw-r--r--source/blender/makesdna/DNA_particle_types.h119
-rw-r--r--source/blender/makesdna/DNA_scene_types.h274
-rw-r--r--source/blender/makesdna/DNA_screen_types.h65
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h2
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h91
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h6
-rw-r--r--source/blender/makesdna/DNA_sound_types.h16
-rw-r--r--source/blender/makesdna/DNA_space_types.h267
-rw-r--r--source/blender/makesdna/DNA_texture_types.h22
-rw-r--r--source/blender/makesdna/DNA_tracking_types.h2
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h68
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h2
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h91
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h64
-rw-r--r--source/blender/makesdna/DNA_world_types.h7
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt5
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c24
-rw-r--r--source/blender/makesdna/intern/makesdna.c8
50 files changed, 2296 insertions, 782 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 33d1445fb93..342245fa393 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -44,54 +44,65 @@ struct FileData;
struct ID;
struct PackedFile;
struct GPUTexture;
-
+
typedef struct IDPropertyData {
void *pointer;
ListBase group;
- int val, val2; /*note, we actually fit a double into these two ints*/
+ int val, val2; /* note, we actually fit a double into these two ints */
} IDPropertyData;
typedef struct IDProperty {
struct IDProperty *next, *prev;
char type, subtype;
short flag;
- char name[64]; /* MAX_IDPROP_NAME */
- int saved; /* saved is used to indicate if this struct has been saved yet.
- * seemed like a good idea as a pad var was needed anyway :)*/
- IDPropertyData data; /* note, alignment for 64 bits */
- int len; /* array length, also (this is important!) string length + 1.
- * the idea is to be able to reuse array realloc functions on strings.*/
+ char name[64]; /* MAX_IDPROP_NAME */
+
+ /* saved is used to indicate if this struct has been saved yet.
+ * seemed like a good idea as a pad var was needed anyway :) */
+ int saved;
+ IDPropertyData data; /* note, alignment for 64 bits */
+
+ /* array length, also (this is important!) string length + 1.
+ * the idea is to be able to reuse array realloc functions on strings.*/
+ int len;
+
+ /* Strings and arrays are both buffered, though the buffer isn't saved. */
/* totallen is total length of allocated array/string, including a buffer.
- * Note that the buffering is mild; the code comes from python's list implementation.*/
- int totallen; /*strings and arrays are both buffered, though the buffer isn't saved.*/
+ * Note that the buffering is mild; the code comes from python's list implementation. */
+ int totallen;
} IDProperty;
-#define MAX_IDPROP_NAME 64
-#define DEFAULT_ALLOC_FOR_NULL_STRINGS 64
+#define MAX_IDPROP_NAME 64
+#define DEFAULT_ALLOC_FOR_NULL_STRINGS 64
/*->type*/
-#define IDP_STRING 0
-#define IDP_INT 1
-#define IDP_FLOAT 2
-#define IDP_ARRAY 5
-#define IDP_GROUP 6
-/* the ID link property type hasn't been implemented yet, this will require
- * some cleanup of blenkernel, most likely.*/
-#define IDP_ID 7
-#define IDP_DOUBLE 8
-#define IDP_IDPARRAY 9
-#define IDP_NUMTYPES 10
+enum {
+ IDP_STRING = 0,
+ IDP_INT = 1,
+ IDP_FLOAT = 2,
+ IDP_ARRAY = 5,
+ IDP_GROUP = 6,
+ /* the ID link property type hasn't been implemented yet, this will require
+ * some cleanup of blenkernel, most likely. */
+ IDP_ID = 7,
+ IDP_DOUBLE = 8,
+ IDP_IDPARRAY = 9,
+ IDP_NUMTYPES = 10,
+};
/*->subtype */
/* IDP_STRING */
-#define IDP_STRING_SUB_UTF8 0 /* default */
-#define IDP_STRING_SUB_BYTE 1 /* arbitrary byte array, _not_ null terminated */
-/*->flag*/
-#define 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 */
+enum {
+ IDP_STRING_SUB_UTF8 = 0, /* default */
+ IDP_STRING_SUB_BYTE = 1, /* arbitrary byte array, _not_ null terminated */
+};
+/*->flag*/
+enum {
+ 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.*/
@@ -102,7 +113,7 @@ typedef struct IDProperty {
* */
/* 2 characters for ID code and 64 for actual name */
-#define MAX_ID_NAME 66
+#define MAX_ID_NAME 66
/* There's a nasty circular dependency here.... 'void *' to the rescue! I
* really wonder why this is needed. */
@@ -129,14 +140,14 @@ typedef struct Library {
ID id;
ID *idblock;
struct FileData *filedata;
- char name[1024]; /* path name used for reading, can be relative and edited in the outliner */
- char filepath[1024]; /* absolute filepath, this is only for convenience,
- * 'name' is the real path used on file read but in
- * some cases its useful to access the absolute one,
- * This is set on file read.
- * Use BKE_library_filepath_set() rather than
- * setting 'name' directly and it will be kept in
- * sync - campbell */
+ char name[1024]; /* path name used for reading, can be relative and edited in the outliner */
+
+ /* absolute filepath, this is only for convenience, 'name' is the real path used on file read but in
+ * some cases its useful to access the absolute one.
+ * This is set on file read.
+ * Use BKE_library_filepath_set() rather than setting 'name' directly and it will be kept in sync - campbell */
+ char filepath[1024];
+
struct Library *parent; /* set for indirectly linked libs, used in the outliner and while reading */
struct PackedFile *packedfile;
@@ -144,20 +155,36 @@ typedef struct Library {
enum eIconSizes {
ICON_SIZE_ICON = 0,
- ICON_SIZE_PREVIEW = 1
+ ICON_SIZE_PREVIEW = 1,
+
+ NUM_ICON_SIZES
+};
+
+/* for PreviewImage->flag */
+enum ePreviewImage_Flag {
+ PRV_CHANGED = (1 << 0),
+ PRV_USER_EDITED = (1 << 1), /* if user-edited, do not auto-update this anymore! */
};
-#define NUM_ICON_SIZES (ICON_SIZE_PREVIEW + 1)
typedef struct PreviewImage {
/* All values of 2 are really NUM_ICON_SIZES */
unsigned int w[2];
unsigned int h[2];
- short changed[2];
+ short flag[2];
short changed_timestamp[2];
unsigned int *rect[2];
+
+ /* Runtime-only data. */
struct GPUTexture *gputexture[2];
+ int icon_id; /* Used by previews outside of ID context. */
+
+ char pad[3];
+ char use_deferred; /* for now a mere bool, if we add more deferred loading methods we can switch to bitflag. */
} PreviewImage;
+#define PRV_DEFERRED_DATA(prv) \
+ (CHECK_TYPE_INLINE(prv, PreviewImage *), BLI_assert((prv)->use_deferred), (void *)((prv) + 1))
+
/**
* Defines for working with IDs.
*
@@ -174,7 +201,12 @@ typedef struct PreviewImage {
# define MAKE_ID2(c, d) ((d) << 8 | (c))
#endif
-/* ID from database */
+/**
+ * ID from database.
+ *
+ * Written to #BHead.code (for file IO)
+ * and the first 2 bytes of #ID.name (for runtime checks, see #GS macro).
+ */
#define ID_SCE MAKE_ID2('S', 'C') /* Scene */
#define ID_LI MAKE_ID2('L', 'I') /* Library */
#define ID_OB MAKE_ID2('O', 'B') /* Object */
@@ -232,33 +264,72 @@ typedef struct PreviewImage {
#ifdef GS
# undef GS
#endif
-// #define GS(a) (*((short *)(a)))
-#define GS(a) (CHECK_TYPE_INLINE(a, char *), (*((short *)(a))))
+#define GS(a) (CHECK_TYPE_ANY(a, char *, const char *, char [66], const char[66]), (*((const short *)(a))))
#define ID_NEW(a) if ( (a) && (a)->id.newid ) (a) = (void *)(a)->id.newid
#define ID_NEW_US(a) if ( (a)->id.newid) { (a) = (void *)(a)->id.newid; (a)->id.us++; }
#define ID_NEW_US2(a) if (((ID *)a)->newid) { (a) = ((ID *)a)->newid; ((ID *)a)->us++; }
-/* id->flag: set frist 8 bits always at zero while reading */
-#define LIB_LOCAL 0
-#define LIB_EXTERN 1
-#define LIB_INDIRECT 2
-#define LIB_NEED_EXPAND 8
-#define LIB_TESTEXT (LIB_NEED_EXPAND | LIB_EXTERN)
-#define LIB_TESTIND (LIB_NEED_EXPAND | LIB_INDIRECT)
-#define LIB_READ 16
-#define LIB_NEED_LINK 32
-
-#define LIB_NEW 256
-#define LIB_FAKEUSER 512
-/* free test flag */
-#define LIB_DOIT 1024
-/* tag existing data before linking so we know what is new */
-#define LIB_PRE_EXISTING 2048
-/* runtime */
-#define LIB_ID_RECALC 4096
-#define LIB_ID_RECALC_DATA 8192
-#define LIB_ANIM_NO_RECALC 16384
+/* id->flag: set first 8 bits always at zero while reading */
+enum {
+ LIB_LOCAL = 0,
+ LIB_EXTERN = 1 << 0,
+ LIB_INDIRECT = 1 << 1,
+ LIB_NEED_EXPAND = 1 << 3,
+ LIB_TESTEXT = (LIB_NEED_EXPAND | LIB_EXTERN),
+ LIB_TESTIND = (LIB_NEED_EXPAND | LIB_INDIRECT),
+ LIB_READ = 1 << 4,
+ LIB_NEED_LINK = 1 << 5,
+
+ LIB_NEW = 1 << 8,
+ LIB_FAKEUSER = 1 << 9,
+ /* free test flag */
+ LIB_DOIT = 1 << 10,
+ /* tag existing data before linking so we know what is new */
+ LIB_PRE_EXISTING = 1 << 11,
+ /* runtime */
+ LIB_ID_RECALC = 1 << 12,
+ LIB_ID_RECALC_DATA = 1 << 13,
+ LIB_ANIM_NO_RECALC = 1 << 14,
+
+ LIB_ID_RECALC_ALL = (LIB_ID_RECALC | LIB_ID_RECALC_DATA),
+};
+
+/* To filter ID types (filter_id) */
+/* XXX We cannot put all needed IDs inside an enum...
+ * We'll have to see whether we can fit all needed ones inside 32 values,
+ * or if we need to fallback to longlong defines :/
+ */
+enum {
+ FILTER_ID_AC = (1 << 0),
+ FILTER_ID_AR = (1 << 1),
+ FILTER_ID_BR = (1 << 2),
+ FILTER_ID_CA = (1 << 3),
+ FILTER_ID_CU = (1 << 4),
+ FILTER_ID_GD = (1 << 5),
+ FILTER_ID_GR = (1 << 6),
+ FILTER_ID_IM = (1 << 7),
+ FILTER_ID_LA = (1 << 8),
+ FILTER_ID_LS = (1 << 9),
+ FILTER_ID_LT = (1 << 10),
+ FILTER_ID_MA = (1 << 11),
+ FILTER_ID_MB = (1 << 12),
+ FILTER_ID_MC = (1 << 13),
+ FILTER_ID_ME = (1 << 14),
+ FILTER_ID_MSK = (1 << 15),
+ FILTER_ID_NT = (1 << 16),
+ FILTER_ID_OB = (1 << 17),
+ FILTER_ID_PAL = (1 << 18),
+ FILTER_ID_PC = (1 << 19),
+ FILTER_ID_SCE = (1 << 20),
+ FILTER_ID_SPK = (1 << 21),
+ FILTER_ID_SO = (1 << 22),
+ FILTER_ID_TE = (1 << 23),
+ FILTER_ID_TXT = (1 << 24),
+ FILTER_ID_VF = (1 << 25),
+ FILTER_ID_WO = (1 << 26),
+ FILTER_ID_PA = (1 << 27),
+};
#ifdef __cplusplus
}
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index dab825c856e..d574694c70d 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -198,7 +198,8 @@ typedef struct bPoseChannel {
short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */
char constflag; /* for quick detecting which constraints affect this channel */
char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
- char pad0[6];
+ char drawflag;
+ char pad0[5];
struct Bone *bone; /* set on read file or rebuild pose */
struct bPoseChannel *parent; /* set on read file or rebuild pose */
@@ -212,6 +213,9 @@ typedef struct bPoseChannel {
struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform.
* needed in rare cases for advanced rigs,
* since the alternative is highly complicated - campbell */
+ float custom_scale;
+
+ char pad1[4];
/* transforms - written in by actions or transform */
float loc[3];
@@ -250,6 +254,7 @@ typedef enum ePchan_Flag {
POSE_ROT = (1 << 1),
POSE_SIZE = (1 << 2),
/* old IK/cache stuff... */
+#if 0
POSE_IK_MAT = (1 << 3),
POSE_UNUSED2 = (1 << 4),
POSE_UNUSED3 = (1 << 5),
@@ -257,6 +262,7 @@ typedef enum ePchan_Flag {
POSE_UNUSED5 = (1 << 7),
/* has Standard IK */
POSE_HAS_IK = (1 << 8),
+#endif
/* IK/Pose solving*/
POSE_CHAIN = (1 << 9),
POSE_DONE = (1 << 10),
@@ -265,8 +271,10 @@ typedef enum ePchan_Flag {
POSE_STRIDE = (1 << 12),
/* standard IK solving */
POSE_IKTREE = (1 << 13),
+#if 0
/* has Spline IK */
POSE_HAS_IKS = (1 << 14),
+#endif
/* spline IK solving */
POSE_IKSPLINE = (1 << 15)
} ePchan_Flag;
@@ -302,6 +310,14 @@ typedef enum ePchan_IkFlag {
BONE_IK_NO_ZDOF_TEMP = (1 << 12)
} ePchan_IkFlag;
+/* PoseChannel->drawflag */
+typedef enum ePchan_DrawFlag {
+ PCHAN_DRAW_NO_CUSTOM_BONE_SIZE = (1 << 0),
+} ePchan_DrawFlag;
+
+#define PCHAN_CUSTOM_DRAW_SIZE(pchan) \
+ (pchan)->custom_scale * (((pchan)->drawflag & PCHAN_DRAW_NO_CUSTOM_BONE_SIZE) ? 1.0f : (pchan)->bone->length)
+
/* PoseChannel->rotmode and Object->rotmode */
typedef enum eRotationModes {
/* quaternion rotations (default, and for older Blender versions) */
@@ -371,7 +387,9 @@ typedef enum ePose_Flags {
/* 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_GAME_ENGINE = (1 << 6),
+ /* pose constraint flags needs to be updated */
+ POSE_CONSTRAINTS_NEED_UPDATE_FLAGS = (1 << 7),
} ePose_Flags;
/* IK Solvers ------------------------------------ */
@@ -465,6 +483,9 @@ typedef enum eActionGroup_Flag {
AGRP_NOTVISIBLE = (1 << 5),
/* for UI (Graph Editor), sub-channels are shown */
AGRP_EXPANDED_G = (1 << 6),
+
+ /* sub channel modifiers off */
+ AGRP_MODIFIERS_OFF = (1 << 7),
AGRP_TEMP = (1 << 30),
AGRP_MOVED = (1 << 31)
@@ -487,7 +508,7 @@ typedef struct bAction {
ID id; /* ID-serialisation for relinking */
ListBase curves; /* function-curves (FCurve) */
- ListBase chanbase; /* legacy data - Action Channels (bActionChannel) in pre-2.5 animation system */
+ ListBase chanbase DNA_DEPRECATED; /* legacy data - Action Channels (bActionChannel) in pre-2.5 animation system */
ListBase groups; /* groups of function-curves (bActionGroup) */
ListBase markers; /* markers local to the Action (used to provide Pose-Libraries) */
@@ -541,7 +562,7 @@ typedef enum eDopeSheet_FilterFlag {
ADS_FILTER_ONLYNLA = (1 << 2), /* for 'NLA' editor - only include NLA data from AnimData */
ADS_FILTER_SELEDIT = (1 << 3), /* for Graph Editor - used to indicate whether to include a filtering flag or not */
- /* general filtering 2 */
+ /* general filtering */
ADS_FILTER_SUMMARY = (1 << 4), /* for 'DopeSheet' Editors - include 'summary' line */
ADS_FILTER_ONLYOBGROUP = (1 << 5), /* only the objects in the specified object group get used */
@@ -564,6 +585,8 @@ typedef enum eDopeSheet_FilterFlag {
ADS_FILTER_NOSPK = (1 << 21),
ADS_FILTER_NOLINESTYLE = (1 << 22),
ADS_FILTER_NOMODIFIERS = (1 << 23),
+ ADS_FILTER_NOGPENCIL = (1 << 24),
+ /* NOTE: all new datablock filters will have to go in filterflag2 (see below) */
/* NLA-specific filters */
ADS_FILTER_NLA_NOACT = (1 << 25), /* if the AnimData block has no NLA data, don't include to just show Action-line */
@@ -581,6 +604,8 @@ typedef enum eDopeSheet_FilterFlag {
typedef enum eDopeSheet_Flag {
ADS_FLAG_SUMMARY_COLLAPSED = (1 << 0), /* when summary is shown, it is collapsed, so all other channels get hidden */
ADS_FLAG_SHOW_DBFILTERS = (1 << 1) /* show filters for datablocks */
+
+ /* NOTE: datablock filter flags continued (1 << 10) onwards... */
} eDopeSheet_Flag;
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index dcde9007cd8..9af0c1dac10 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -57,7 +57,7 @@ typedef struct bActionActuator {
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 the action to its starting frame */
+ 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
@@ -570,6 +570,7 @@ typedef struct bActuator {
#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
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 3d0d6b820d7..590179e0a0f 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -459,7 +459,7 @@ typedef struct FCurve {
int color_mode; /* coloring method to use (eFCurve_Coloring) */
float color[3]; /* the last-color this curve took */
- float prev_norm_factor, pad;
+ float prev_norm_factor, prev_offset;
} FCurve;
@@ -479,7 +479,7 @@ typedef enum eFCurve_Flags {
/* fcurve uses 'auto-handles', which stay horizontal... */
// DEPRECATED
FCURVE_AUTO_HANDLES = (1<<5),
-
+ FCURVE_MOD_OFF = (1<<6),
/* skip evaluation, as RNA-path cannot be resolved (similar to muting, but cannot be set by user) */
FCURVE_DISABLED = (1<<10),
/* curve can only have whole-number values (integer types) */
@@ -719,13 +719,13 @@ typedef struct KS_Path {
int idtype; /* ID-type that path can be used on */
short groupmode; /* group naming (eKSP_Grouping) */
- short pad;
+ short flag; /* various settings, etc. */
char *rna_path; /* dynamically (or statically in the case of predefined sets) path */
int array_index; /* index that path affects */
- short flag; /* various settings, etc. */
- short keyingflag; /* settings to supply insertkey() with */
+ short keyingflag; /* (eInsertKeyFlags) settings to supply insertkey() with */
+ short keyingoverride; /* (eInsertKeyFlags) for each flag set, the relevant keyingflag bit overrides the default */
} KS_Path;
/* KS_Path->flag */
@@ -770,10 +770,14 @@ typedef struct KeyingSet {
char description[240]; /* (RNA_DYN_DESCR_MAX) short help text. */
char typeinfo[64]; /* name of the typeinfo data used for the relative paths */
+ int active_path; /* index of the active path */
+
short flag; /* settings for KeyingSet */
- short keyingflag; /* settings to supply insertkey() with */
- int active_path; /* index of the active path */
+ short keyingflag; /* (eInsertKeyFlags) settings to supply insertkey() with */
+ short keyingoverride; /* (eInsertKeyFlags) for each flag set, the relevant keyingflag bit overrides the default */
+
+ char pad[6];
} KeyingSet;
/* KeyingSet settings */
@@ -849,6 +853,8 @@ typedef struct AnimData {
/* nla-tracks */
ListBase nla_tracks;
+ /* active NLA-track (only set/used during tweaking, so no need to worry about dangling pointers) */
+ NlaTrack *act_track;
/* active NLA-strip (only set/used during tweaking, so no need to worry about dangling pointers) */
NlaStrip *actstrip;
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index b6d4a8c9db8..b995e6917a9 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -153,16 +153,15 @@ typedef enum eArmature_DeformFlag {
ARM_DEF_VGROUP = (1<<0),
ARM_DEF_ENVELOPE = (1<<1),
ARM_DEF_QUATERNION = (1<<2),
+#ifdef DNA_DEPRECATED
ARM_DEF_B_BONE_REST = (1<<3), /* deprecated */
+#endif
ARM_DEF_INVERT_VGROUP = (1<<4)
} eArmature_DeformFlag;
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison ARM_DEF_B_BONE_REST
-#endif
-
/* armature->pathflag */
// XXX deprecated... old animation system (armature only viz)
+#ifdef DNA_DEPRECATED
typedef enum eArmature_PathFlag {
ARM_PATH_FNUMS = (1<<0),
ARM_PATH_KFRAS = (1<<1),
@@ -170,9 +169,6 @@ typedef enum eArmature_PathFlag {
ARM_PATH_ACFRA = (1<<3),
ARM_PATH_KFNOS = (1<<4)
} eArmature_PathFlag;
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison ARM_PATH_FNUMS ARM_PATH_KFRAS ARM_PATH_HEADS ARM_PATH_ACFRA ARM_PATH_KFNOS
#endif
/* armature->ghosttype */
@@ -188,7 +184,7 @@ typedef enum eBone_Flag {
BONE_SELECTED = (1 << 0),
BONE_ROOTSEL = (1 << 1),
BONE_TIPSEL = (1 << 2),
- BONE_TRANSFORM = (1 << 3), /* Used instead of BONE_SELECTED during transform */
+ BONE_TRANSFORM = (1 << 3), /* Used instead of BONE_SELECTED during transform (clear before use) */
BONE_CONNECTED = (1 << 4), /* when bone has a parent, connect head of bone to parent's tail*/
/* 32 used to be quatrot, was always set in files, do not reuse unless you clear it always */
BONE_HIDDEN_P = (1 << 6), /* hidden Bones when drawing PoseChannels */
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index b14861fcf47..7ec86459f0c 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -93,7 +93,7 @@ typedef struct Brush {
float plane_offset; /* offset for plane brushes (clay, flatten, fill, scrape) */
- float pad;
+ int flag2;
int gradient_spacing;
int gradient_stroke_mode; /* source for stroke color gradient application */
int gradient_fill_mode; /* source for fill tool color gradient application */
@@ -102,7 +102,7 @@ typedef struct Brush {
char vertexpaint_tool; /* active vertex/weight paint blend mode (poorly named) */
char imagepaint_tool; /* active image paint tool */
char mask_tool; /* enum BrushMaskTool, only used if sculpt_tool is SCULPT_TOOL_MASK */
-
+
float autosmooth_factor;
float crease_pinch_factor;
@@ -137,34 +137,29 @@ typedef struct Brush {
float mask_stencil_dimension[2];
} Brush;
-typedef struct PaletteColor
-{
+typedef struct PaletteColor {
struct PaletteColor *next, *prev;
/* two values, one to store rgb, other to store values for sculpt/weight */
float rgb[3];
float value;
} PaletteColor;
-typedef struct Palette
-{
+typedef struct Palette {
ID id;
/* pointer to individual colours */
ListBase colors;
- ListBase deleted;
int active_color;
int pad;
} Palette;
-typedef struct PaintCurvePoint
-{
+typedef struct PaintCurvePoint {
BezTriple bez; /* bezier handle */
float pressure; /* pressure on that point */
} PaintCurvePoint;
-typedef struct PaintCurve
-{
+typedef struct PaintCurve {
ID id;
PaintCurvePoint *points; /* points of curve */
int tot_points;
@@ -186,13 +181,13 @@ typedef enum BrushGradientSourceFill {
/* Brush.flag */
typedef enum BrushFlags {
BRUSH_AIRBRUSH = (1 << 0),
- BRUSH_TORUS = (1 << 1),
+// BRUSH_TORUS = (1 << 1), deprecated, use paint->symmetry_flags & PAINT_TILE_*
BRUSH_ALPHA_PRESSURE = (1 << 2),
BRUSH_SIZE_PRESSURE = (1 << 3),
BRUSH_JITTER_PRESSURE = (1 << 4),
BRUSH_SPACING_PRESSURE = (1 << 5),
BRUSH_UNUSED = (1 << 6),
- BRUSH_RAKE = (1 << 7),
+// BRUSH_RAKE = (1 << 7), deprecated, use brush_angle_mode
BRUSH_ANCHORED = (1 << 8),
BRUSH_DIR_IN = (1 << 9),
BRUSH_SPACE = (1 << 10),
@@ -209,7 +204,7 @@ typedef enum BrushFlags {
BRUSH_EDGE_TO_EDGE = (1 << 22),
BRUSH_DRAG_DOT = (1 << 23),
BRUSH_INVERSE_SMOOTH_PRESSURE = (1 << 24),
- BRUSH_RANDOM_ROTATION = (1 << 25),
+// BRUSH_RANDOM_ROTATION = (1 << 25), deprecated, use brush_angle_mode
BRUSH_PLANE_TRIM = (1 << 26),
BRUSH_FRONTFACE = (1 << 27),
BRUSH_CUSTOM_ICON = (1 << 28),
@@ -260,6 +255,36 @@ typedef enum BrushSculptTool {
SCULPT_TOOL_MASK = 19
} BrushSculptTool;
+/** When #BRUSH_ACCUMULATE is used */
+#define SCULPT_TOOL_HAS_ACCUMULATE(t) ELEM(t, \
+ SCULPT_TOOL_DRAW, \
+ SCULPT_TOOL_CREASE, \
+ SCULPT_TOOL_BLOB, \
+ SCULPT_TOOL_LAYER, \
+ SCULPT_TOOL_INFLATE, \
+ SCULPT_TOOL_CLAY, \
+ SCULPT_TOOL_CLAY_STRIPS, \
+ SCULPT_TOOL_ROTATE, \
+ SCULPT_TOOL_FLATTEN \
+ )
+
+#define SCULPT_TOOL_HAS_NORMAL_WEIGHT(t) ELEM(t, \
+ SCULPT_TOOL_GRAB, \
+ SCULPT_TOOL_SNAKE_HOOK \
+ )
+
+#define SCULPT_TOOL_HAS_DYNTOPO(t) (ELEM(t, \
+ /* These brushes, as currently coded, cannot support dynamic topology */ \
+ SCULPT_TOOL_GRAB, \
+ SCULPT_TOOL_ROTATE, \
+ SCULPT_TOOL_THUMB, \
+ SCULPT_TOOL_LAYER, \
+ \
+ /* These brushes could handle dynamic topology, but user feedback indicates it's better not to */ \
+ SCULPT_TOOL_SMOOTH, \
+ SCULPT_TOOL_MASK \
+ ) == 0)
+
/* ImagePaintSettings.tool */
typedef enum BrushImagePaintTool {
PAINT_TOOL_DRAW = 0,
@@ -300,7 +325,7 @@ typedef enum BlurKernelType {
KERNEL_BOX
} BlurKernelType;
-#define MAX_BRUSH_PIXEL_RADIUS 200
+#define MAX_BRUSH_PIXEL_RADIUS 500
#endif
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index c99494ce00e..c45322b818f 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -33,7 +33,7 @@
#define __DNA_CAMERA_TYPES_H__
#include "DNA_defs.h"
-
+#include "DNA_gpu_types.h"
#include "DNA_ID.h"
#ifdef __cplusplus
@@ -44,6 +44,16 @@ struct Object;
struct AnimData;
struct Ipo;
+/* ------------------------------------------- */
+/* Stereo Settings */
+typedef struct CameraStereoSettings {
+ float interocular_distance;
+ float convergence_distance;
+ short convergence_mode;
+ short pivot;
+ short pad, pad2;
+} CameraStereoSettings;
+
typedef struct Camera {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -56,7 +66,7 @@ typedef struct Camera {
float lens, ortho_scale, drawsize;
float sensor_x, sensor_y;
float shiftx, shifty;
-
+
/* yafray: dof params */
/* qdn: yafray var 'YF_dofdist' now enabled for defocus composite node as well.
* The name was not changed so that no other files need to be modified */
@@ -65,9 +75,13 @@ typedef struct Camera {
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Object *dof_ob;
+ struct GPUDOFSettings gpu_dof;
char sensor_fit;
char pad[7];
+
+ /* Stereo settings */
+ struct CameraStereoSettings stereo;
} Camera;
/* **************** CAMERA ********************* */
@@ -96,18 +110,17 @@ enum {
CAM_SHOWLIMITS = (1 << 0),
CAM_SHOWMIST = (1 << 1),
CAM_SHOWPASSEPARTOUT = (1 << 2),
- CAM_SHOWTITLESAFE = (1 << 3),
+ CAM_SHOW_SAFE_MARGINS = (1 << 3),
CAM_SHOWNAME = (1 << 4),
CAM_ANGLETOGGLE = (1 << 5),
CAM_DS_EXPAND = (1 << 6),
+#ifdef DNA_DEPRECATED
CAM_PANORAMA = (1 << 7), /* deprecated */
+#endif
CAM_SHOWSENSOR = (1 << 8),
+ CAM_SHOW_SAFE_CENTER = (1 << 9),
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison CAM_PANORAMA
-#endif
-
/* yafray: dof sampling switch */
/* #define CAM_YF_NO_QMC 512 */ /* deprecated */
@@ -121,6 +134,20 @@ enum {
#define DEFAULT_SENSOR_WIDTH 32.0f
#define DEFAULT_SENSOR_HEIGHT 18.0f
+/* stereo->convergence_mode */
+enum {
+ CAM_S3D_OFFAXIS = 0,
+ CAM_S3D_PARALLEL = 1,
+ CAM_S3D_TOE = 2,
+};
+
+/* stereo->pivot */
+enum {
+ CAM_S3D_PIVOT_LEFT = 0,
+ CAM_S3D_PIVOT_RIGHT = 1,
+ CAM_S3D_PIVOT_CENTER = 2,
+};
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h
index 6c7d500e4e2..07bc2478837 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -32,6 +32,8 @@
#ifndef __DNA_CLOTH_TYPES_H__
#define __DNA_CLOTH_TYPES_H__
+#include "DNA_defs.h"
+
/**
* This struct contains all the global data required to run a simulation.
* At the time of this writing, this structure contains data appropriate
@@ -69,14 +71,23 @@ typedef struct ClothSimSettings {
float goalspring;
float goalfrict;
float velocity_smooth; /* smoothing of velocities for hair */
+ float density_target; /* minimum density for hair */
+ float density_strength; /* influence of hair density */
float collider_friction; /* friction with colliders */
float vel_damping; /* damp the velocity to speed up getting to the resting position */
float shrink_min; /* min amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing) */
float shrink_max; /* max amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing) */
+
+ /* XXX various hair stuff
+ * should really be separate, this struct is a horrible mess already
+ */
+ float bending_damping; /* damping of bending springs */
+ float voxel_cell_size; /* size of voxel grid cells for continuum dynamics */
+ int pad;
int stepsPerFrame; /* Number of time steps per frame. */
int flags; /* flags, see CSIMSETT_FLAGS enum above. */
- int preroll; /* How many frames of simulation to do before we start. */
+ int preroll DNA_DEPRECATED; /* How many frames of simulation to do before we start. */
int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */
short solver_type; /* which solver should be used? txold */
short vgroup_bend; /* vertex group for scaling bending stiffness */
@@ -86,7 +97,6 @@ typedef struct ClothSimSettings {
short shapekey_rest; /* vertex group for scaling structural stiffness */
short presets; /* used for presets on GUI */
short reset;
- char pad[4];
struct EffectorWeights *effector_weights;
} ClothSimSettings;
@@ -97,15 +107,16 @@ typedef struct ClothCollSettings {
float epsilon; /* min distance for collisions. */
float self_friction; /* Fiction/damping with self contact. */
float friction; /* Friction/damping applied on contact with other object.*/
+ float damping; /* Collision restitution on contact with other object.*/
float selfepsilon; /* for selfcollision */
float repel_force, distance_repel;
int flags; /* collision flags defined in BKE_cloth.h */
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 */
short vgroup_selfcol; /* vgroup to paint which vertices are used for self collisions */
- short pad;
- int pad2;
+ short pad2[3];
} ClothCollSettings;
diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h
index e3731129632..c9a5e056e4a 100644
--- a/source/blender/makesdna/DNA_color_types.h
+++ b/source/blender/makesdna/DNA_color_types.h
@@ -133,7 +133,6 @@ typedef struct Histogram {
float co[2][2];
} Histogram;
-struct ImBuf;
typedef struct Scopes {
int ok;
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 0277956cac5..86991245068 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -173,6 +173,12 @@ typedef struct bSplineIKConstraint {
/* settings */
short flag; /* general settings for constraint */
short xzScaleMode; /* method used for determining the x & z scaling of the bones */
+
+ /* volume preservation settings */
+ float bulge;
+ float bulge_min;
+ float bulge_max;
+ float bulge_smooth;
} bSplineIKConstraint;
@@ -284,10 +290,14 @@ typedef struct bFollowPathConstraint {
/* Stretch to constraint */
typedef struct bStretchToConstraint {
struct Object *tar;
+ int flag;
int volmode;
- int plane;
+ int plane;
float orglength;
float bulge;
+ float bulge_min;
+ float bulge_max;
+ float bulge_smooth;
char subtarget[64]; /* MAX_ID_NAME-2 */
} bStretchToConstraint;
@@ -676,15 +686,19 @@ typedef enum eKinematic_Flags {
/* bSplineIKConstraint->flag */
typedef enum eSplineIK_Flags {
/* chain has been attached to spline */
- CONSTRAINT_SPLINEIK_BOUND = (1<<0),
+ CONSTRAINT_SPLINEIK_BOUND = (1 << 0),
/* root of chain is not influenced by the constraint */
- CONSTRAINT_SPLINEIK_NO_ROOT = (1<<1),
+ CONSTRAINT_SPLINEIK_NO_ROOT = (1 << 1),
/* bones in the chain should not scale to fit the curve */
- CONSTRAINT_SPLINEIK_SCALE_LIMITED = (1<<2),
+ CONSTRAINT_SPLINEIK_SCALE_LIMITED = (1 << 2),
/* evenly distribute the bones along the path regardless of length */
- CONSTRAINT_SPLINEIK_EVENSPLITS = (1<<3),
+ CONSTRAINT_SPLINEIK_EVENSPLITS = (1 << 3),
/* don't adjust the x and z scaling of the bones by the curve radius */
- CONSTRAINT_SPLINEIK_NO_CURVERAD = (1<<4)
+ CONSTRAINT_SPLINEIK_NO_CURVERAD = (1 << 4),
+
+ /* for "volumetric" xz scale mode, limit the minimum or maximum scale values */
+ CONSTRAINT_SPLINEIK_USE_BULGE_MIN = (1 << 5),
+ CONSTRAINT_SPLINEIK_USE_BULGE_MAX = (1 << 6),
} eSplineIK_Flags;
/* bSplineIKConstraint->xzScaleMode */
@@ -694,7 +708,9 @@ typedef enum eSplineIK_XZScaleModes {
/* bones in the chain should take their x/z scales from the original scaling */
CONSTRAINT_SPLINEIK_XZS_ORIGINAL = 1,
/* x/z scales are the inverse of the y-scale */
- CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC = 2
+ CONSTRAINT_SPLINEIK_XZS_INVERSE = 2,
+ /* x/z scales are computed using a volume preserving technique (from Stretch To constraint) */
+ CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC = 3
} eSplineIK_XZScaleModes;
/* MinMax (floor) flags */
@@ -820,6 +836,12 @@ typedef enum eObjectSolver_Flags {
#define CONSTRAINT_DRAW_PIVOT 0x40
#define CONSTRAINT_DISABLE_LINKED_COLLISION 0x80
+/* ObjectSolver Constraint -> flag */
+typedef enum eStretchTo_Flags {
+ STRETCHTOCON_USE_BULGE_MIN = (1 << 0),
+ STRETCHTOCON_USE_BULGE_MAX = (1 << 1),
+} eStretchTo_Flags;
+
/* important: these defines need to match up with PHY_DynamicTypes headerfile */
#define CONSTRAINT_RB_BALL 1
#define CONSTRAINT_RB_HINGE 2
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 87496fb491f..9be3fbc2348 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -46,7 +46,6 @@ struct Key;
struct Material;
struct VFont;
struct AnimData;
-struct SelBox;
struct EditFont;
struct GHash;
@@ -158,6 +157,7 @@ typedef struct Nurb {
short tilt_interp; /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */
short radius_interp;
+ /* only used for dynamically generated Nurbs created from OB_FONT's */
int charidx;
} Nurb;
@@ -270,86 +270,101 @@ typedef struct Curve {
/* **************** CURVE ********************* */
-/* texflag */
-#define CU_AUTOSPACE 1
-
-/* drawflag */
-#define CU_HIDE_HANDLES (1 << 0)
-#define CU_HIDE_NORMALS (1 << 1)
-
-/* flag */
-#define CU_3D 1
-#define CU_FRONT 2
-#define CU_BACK 4
-#define CU_PATH 8
-#define CU_FOLLOW 16
-#define CU_UV_ORCO 32
-#define CU_DEFORM_BOUNDS_OFF 64
-#define CU_STRETCH 128
-/* #define CU_OFFS_PATHDIST 256 */ /* DEPRECATED */
-#define CU_FAST 512 /* Font: no filling inside editmode */
-/* #define CU_RETOPO 1024 */ /* DEPRECATED */
-#define CU_DS_EXPAND 2048
-#define CU_PATH_RADIUS 4096 /* make use of the path radius if this is enabled (default for new curves) */
-#define CU_DEFORM_FILL 8192 /* fill 2d curve after deformation */
-#define CU_FILL_CAPS 16384 /* fill bevel caps */
-#define CU_MAP_TAPER 32768 /* map taper object to beveled area */
-
-/* twist mode */
-#define CU_TWIST_Z_UP 0
-// #define CU_TWIST_Y_UP 1 // not used yet
-// #define CU_TWIST_X_UP 2
-#define CU_TWIST_MINIMUM 3
-#define CU_TWIST_TANGENT 4
-
-/* bevel factor mapping */
+/* Curve.texflag */
enum {
- CU_BEVFAC_MAP_RESOLU = 0,
+ CU_AUTOSPACE = 1,
+};
+
+/* Curve.drawflag */
+enum {
+ CU_HIDE_HANDLES = 1 << 0,
+ CU_HIDE_NORMALS = 1 << 1,
+};
+
+/* Curve.flag */
+enum {
+ CU_3D = 1 << 0,
+ CU_FRONT = 1 << 1,
+ CU_BACK = 1 << 2,
+ CU_PATH = 1 << 3,
+ CU_FOLLOW = 1 << 4,
+ CU_UV_ORCO = 1 << 5,
+ CU_DEFORM_BOUNDS_OFF = 1 << 6,
+ CU_STRETCH = 1 << 7,
+ /* CU_OFFS_PATHDIST = 1 << 8, */ /* DEPRECATED */
+ CU_FAST = 1 << 9, /* Font: no filling inside editmode */
+ /* CU_RETOPO = 1 << 10, */ /* DEPRECATED */
+ CU_DS_EXPAND = 1 << 11,
+ CU_PATH_RADIUS = 1 << 12, /* make use of the path radius if this is enabled (default for new curves) */
+ CU_DEFORM_FILL = 1 << 13, /* fill 2d curve after deformation */
+ CU_FILL_CAPS = 1 << 14, /* fill bevel caps */
+ CU_MAP_TAPER = 1 << 15, /* map taper object to beveled area */
+};
+
+/* Curve.twist_mode */
+enum {
+ CU_TWIST_Z_UP = 0,
+ /* CU_TWIST_Y_UP = 1, */ /* not used yet */
+ /* CU_TWIST_X_UP = 2, */
+ CU_TWIST_MINIMUM = 3,
+ CU_TWIST_TANGENT = 4,
+};
+
+/* Curve.bevfac1_mapping, Curve.bevfac2_mapping, bevel factor mapping */
+enum {
+ CU_BEVFAC_MAP_RESOLU = 0,
CU_BEVFAC_MAP_SEGMENT = 1,
- CU_BEVFAC_MAP_SPLINE = 2
+ CU_BEVFAC_MAP_SPLINE = 2,
};
-/* spacemode */
-#define CU_LEFT 0
-#define CU_MIDDLE 1
-#define CU_RIGHT 2
-#define CU_JUSTIFY 3
-#define CU_FLUSH 4
-
-/* flag (nurb) */
-#define CU_SMOOTH 1
-#define CU_2D 8 /* moved from type since 2.4x */
-
-/* type (nurb) */
-#define CU_POLY 0
-#define CU_BEZIER 1
-#define CU_BSPLINE 2
-#define CU_CARDINAL 3
-#define CU_NURBS 4
-#define CU_TYPE (CU_POLY|CU_BEZIER|CU_BSPLINE|CU_CARDINAL|CU_NURBS)
-
- /* only for adding */
-#define CU_PRIMITIVE 0xF00
-
- /* 2 or 4 points */
-#define CU_PRIM_CURVE 0x100
- /* 8 points circle */
-#define CU_PRIM_CIRCLE 0x200
- /* 4x4 patch Nurb */
-#define CU_PRIM_PATCH 0x300
-#define CU_PRIM_TUBE 0x400
-#define CU_PRIM_SPHERE 0x500
-#define CU_PRIM_DONUT 0x600
- /* 5 points, 5th order straight line (for anim path) */
-#define CU_PRIM_PATH 0x700
-
-
-/* flagu flagv (nurb) */
-#define CU_NURB_CYCLIC 1
-#define CU_NURB_ENDPOINT 2
-#define CU_NURB_BEZIER 4
-
-#define CU_ACT_NONE -1
+/* Curve.spacemode */
+enum {
+ CU_LEFT = 0,
+ CU_MIDDLE = 1,
+ CU_RIGHT = 2,
+ CU_JUSTIFY = 3,
+ CU_FLUSH = 4,
+};
+
+/* Nurb.flag */
+enum {
+ CU_SMOOTH = 1 << 0,
+ CU_2D = 1 << 3, /* moved from type since 2.4x */
+};
+
+/* Nurb.type */
+enum {
+ CU_POLY = 0,
+ CU_BEZIER = 1,
+ CU_BSPLINE = 2,
+ CU_CARDINAL = 3,
+ CU_NURBS = 4,
+ CU_TYPE = (CU_POLY | CU_BEZIER | CU_BSPLINE | CU_CARDINAL | CU_NURBS),
+
+ /* only for adding */
+ CU_PRIMITIVE = 0xF00,
+
+ /* 2 or 4 points */
+ CU_PRIM_CURVE = 0x100,
+ /* 8 points circle */
+ CU_PRIM_CIRCLE = 0x200,
+ /* 4x4 patch Nurb */
+ CU_PRIM_PATCH = 0x300,
+ CU_PRIM_TUBE = 0x400,
+ CU_PRIM_SPHERE = 0x500,
+ CU_PRIM_DONUT = 0x600,
+ /* 5 points, 5th order straight line (for anim path) */
+ CU_PRIM_PATH = 0x700,
+};
+
+/* Nurb.flagu, Nurb.flagv */
+enum {
+ CU_NURB_CYCLIC = 1 << 0,
+ CU_NURB_ENDPOINT = 1 << 1,
+ CU_NURB_BEZIER = 1 << 2,
+};
+
+#define CU_ACT_NONE -1
/* *************** BEZTRIPLE **************** */
@@ -366,9 +381,9 @@ typedef enum eBezTriple_Handle {
/* interpolation modes (used only for BezTriple->ipo) */
typedef enum eBezTriple_Interpolation {
/* traditional interpolation */
- BEZT_IPO_CONST = 0, /* constant interpolation */
- BEZT_IPO_LIN = 1, /* linear interpolation */
- BEZT_IPO_BEZ = 2, /* bezier interpolation */
+ BEZT_IPO_CONST = 0, /* constant interpolation */
+ BEZT_IPO_LIN = 1, /* linear interpolation */
+ BEZT_IPO_BEZ = 2, /* bezier interpolation */
/* easing equations */
BEZT_IPO_BACK = 3,
@@ -380,7 +395,7 @@ typedef enum eBezTriple_Interpolation {
BEZT_IPO_QUAD = 9,
BEZT_IPO_QUART = 10,
BEZT_IPO_QUINT = 11,
- BEZT_IPO_SINE = 12
+ BEZT_IPO_SINE = 12,
} eBezTriple_Interpolation;
/* easing modes (used only for Keyframes - BezTriple->easing) */
@@ -389,31 +404,38 @@ typedef enum eBezTriple_Easing {
BEZT_IPO_EASE_IN = 1,
BEZT_IPO_EASE_OUT = 2,
- BEZT_IPO_EASE_IN_OUT = 3
+ BEZT_IPO_EASE_IN_OUT = 3,
} eBezTriple_Easing;
/* types of keyframe (used only for BezTriple->hide when BezTriple is used in F-Curves) */
typedef enum eBezTriple_KeyframeType {
- BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */
- BEZT_KEYTYPE_EXTREME = 1, /* 'extreme' keyframe */
- BEZT_KEYTYPE_BREAKDOWN = 2, /* 'breakdown' keyframe */
- BEZT_KEYTYPE_JITTER = 3, /* 'jitter' keyframe (for adding 'filler' secondary motion) */
+ BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */
+ BEZT_KEYTYPE_EXTREME = 1, /* 'extreme' keyframe */
+ BEZT_KEYTYPE_BREAKDOWN = 2, /* 'breakdown' keyframe */
+ BEZT_KEYTYPE_JITTER = 3, /* 'jitter' keyframe (for adding 'filler' secondary motion) */
} eBezTriple_KeyframeType;
/* checks if the given BezTriple is selected */
-#define BEZSELECTED(bezt) (((bezt)->f2 & SELECT) || ((bezt)->f1 & SELECT) || ((bezt)->f3 & SELECT))
-#define BEZSELECTED_HIDDENHANDLES(cu, bezt) (((cu)->drawflag & CU_HIDE_HANDLES) ? (bezt)->f2 & SELECT : BEZSELECTED(bezt))
+#define BEZT_ISSEL_ANY(bezt) \
+ (((bezt)->f2 & SELECT) || ((bezt)->f1 & SELECT) || ((bezt)->f3 & SELECT))
+#define BEZT_ISSEL_ANY_HIDDENHANDLES(cu, bezt) \
+ (((cu)->drawflag & CU_HIDE_HANDLES) ? (bezt)->f2 & SELECT : BEZT_ISSEL_ANY(bezt))
+
+#define BEZT_SEL_ALL(bezt) { (bezt)->f1 |= SELECT; (bezt)->f2 |= SELECT; (bezt)->f3 |= SELECT; } ((void)0)
+#define BEZT_DESEL_ALL(bezt) { (bezt)->f1 &= ~SELECT; (bezt)->f2 &= ~SELECT; (bezt)->f3 &= ~SELECT; } ((void)0)
/* *************** CHARINFO **************** */
-/* flag */
-/* note: CU_CHINFO_WRAP and CU_CHINFO_SMALLCAPS_TEST are set dynamically */
-#define CU_CHINFO_BOLD (1<<0)
-#define CU_CHINFO_ITALIC (1<<1)
-#define CU_CHINFO_UNDERLINE (1<<2)
-#define CU_CHINFO_WRAP (1<<3) /* wordwrap occurred here */
-#define CU_CHINFO_SMALLCAPS (1<<4)
-#define CU_CHINFO_SMALLCAPS_CHECK (1<<5) /* set at runtime, checks if case switching is needed */
+/* CharInfo.flag */
+enum {
+ /* note: CU_CHINFO_WRAP and CU_CHINFO_SMALLCAPS_TEST are set dynamically */
+ CU_CHINFO_BOLD = 1 << 0,
+ CU_CHINFO_ITALIC = 1 << 1,
+ CU_CHINFO_UNDERLINE = 1 << 2,
+ CU_CHINFO_WRAP = 1 << 3, /* wordwrap occurred here */
+ CU_CHINFO_SMALLCAPS = 1 << 4,
+ CU_CHINFO_SMALLCAPS_CHECK = 1 << 5, /* set at runtime, checks if case switching is needed */
+};
/* mixed with KEY_LINEAR but define here since only curve supports */
#define KEY_CU_EASE 3
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 70dc43676ac..3807bb296fd 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -63,9 +63,10 @@ typedef struct CustomDataExternal {
* layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */
typedef struct CustomData {
CustomDataLayer *layers; /* CustomDataLayers, ordered by type */
- int typemap[41]; /* runtime only! - maps types to indices of first layer of that type,
+ int typemap[42]; /* runtime only! - maps types to indices of first layer of that type,
* MUST be >= CD_NUMTYPES, but we cant use a define here.
* Correct size is ensured in CustomData_update_typemap assert() */
+ int pad_i1;
int totlayer, maxlayer; /* number of layers, size of layers array */
int totsize; /* in editmode, total size of all data layers */
struct BLI_mempool *pool; /* (BMesh Only): Memory pool for allocation of blocks */
@@ -73,9 +74,11 @@ typedef struct CustomData {
} CustomData;
/* CustomData.type */
-enum {
+typedef enum CustomDataType {
CD_MVERT = 0,
+#ifdef DNA_DEPRECATED
CD_MSTICKY = 1, /* DEPRECATED */
+#endif
CD_MDEFORMVERT = 2,
CD_MEDGE = 3,
CD_MFACE = 4,
@@ -95,8 +98,8 @@ enum {
CD_TANGENT = 18,
CD_MDISPS = 19,
CD_PREVIEW_MCOL = 20, /* for displaying weightpaint colors */
- CD_ID_MCOL = 21,
- CD_TEXTURE_MCOL = 22,
+/* CD_ID_MCOL = 21, */
+ CD_TEXTURE_MLOOPCOL = 22,
CD_CLOTH_ORCO = 23,
CD_RECAST = 24,
@@ -119,13 +122,14 @@ enum {
CD_FREESTYLE_FACE = 38,
CD_MLOOPTANGENT = 39,
CD_TESSLOOPNORMAL = 40,
+ CD_CUSTOMLOOPNORMAL = 41,
- CD_NUMTYPES = 41
-};
+ CD_NUMTYPES = 42
+} CustomDataType;
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
-#define CD_MASK_MSTICKY (1 << CD_MSTICKY) /* DEPRECATED */
+// #define CD_MASK_MSTICKY (1 << CD_MSTICKY) /* DEPRECATED */
#define CD_MASK_MDEFORMVERT (1 << CD_MDEFORMVERT)
#define CD_MASK_MEDGE (1 << CD_MEDGE)
#define CD_MASK_MFACE (1 << CD_MFACE)
@@ -167,6 +171,7 @@ enum {
#define CD_MASK_FREESTYLE_FACE (1LL << CD_FREESTYLE_FACE)
#define CD_MASK_MLOOPTANGENT (1LL << CD_MLOOPTANGENT)
#define CD_MASK_TESSLOOPNORMAL (1LL << CD_TESSLOOPNORMAL)
+#define CD_MASK_CUSTOMLOOPNORMAL (1LL << CD_CUSTOMLOOPNORMAL)
/* CustomData.flag */
enum {
@@ -188,6 +193,8 @@ enum {
#define DYNTOPO_NODE_NONE -1
+#define CD_TEMP_CHUNK_SIZE 128
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h
index 0dd7f37f8b4..0a0d46d70ff 100644
--- a/source/blender/makesdna/DNA_documentation.h
+++ b/source/blender/makesdna/DNA_documentation.h
@@ -48,6 +48,24 @@
* be badly defined. The reason for this is that it is called with
* different types of arguments. It takes a char* at this moment...
*
+ * - Ignoring structs:
+ *
+ * Sometimes we need to define structs in DNA which aren't written
+ * to disk, and can be excluded from blend file DNA string.
+ * in this case, add two '#' chars directly before the struct. eg.
+ *
+ * \code{.c}
+ * #
+ * #
+ * typedef struct MyStruct {
+ * int value;
+ * } MyStruct;
+ * \endcode
+ *
+ * Ignored structs can only be referred to from non-ignored structs
+ * when referred to as a pointer (where they're usually allocated
+ * and cleared in ``readfile.c``).
+ *
* - %Path to the header files
*
* Also because of historical reasons, there is a path prefix to the
diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h
index d2b95c959b3..17553e98817 100644
--- a/source/blender/makesdna/DNA_dynamicpaint_types.h
+++ b/source/blender/makesdna/DNA_dynamicpaint_types.h
@@ -29,59 +29,74 @@
#define __DNA_DYNAMICPAINT_TYPES_H__
#include "DNA_listBase.h"
-struct CurveMapping;
struct PaintSurfaceData;
/* surface format */
-#define MOD_DPAINT_SURFACE_F_PTEX 0
-#define MOD_DPAINT_SURFACE_F_VERTEX 1
-#define MOD_DPAINT_SURFACE_F_IMAGESEQ 2
+enum {
+ MOD_DPAINT_SURFACE_F_PTEX = 0,
+ MOD_DPAINT_SURFACE_F_VERTEX = 1,
+ MOD_DPAINT_SURFACE_F_IMAGESEQ = 2,
+};
/* surface type */
-#define MOD_DPAINT_SURFACE_T_PAINT 0
-#define MOD_DPAINT_SURFACE_T_DISPLACE 1
-#define MOD_DPAINT_SURFACE_T_WEIGHT 2
-#define MOD_DPAINT_SURFACE_T_WAVE 3
+enum {
+ MOD_DPAINT_SURFACE_T_PAINT = 0,
+ MOD_DPAINT_SURFACE_T_DISPLACE = 1,
+ MOD_DPAINT_SURFACE_T_WEIGHT = 2,
+ MOD_DPAINT_SURFACE_T_WAVE = 3,
+};
/* surface flags */
-#define MOD_DPAINT_ACTIVE (1<<0) /* Is surface enabled */
+enum {
+ MOD_DPAINT_ACTIVE = 1 << 0, /* Is surface enabled */
-#define MOD_DPAINT_ANTIALIAS (1<<1) /* do antialiasing */
-#define MOD_DPAINT_DISSOLVE (1<<2) /* do dissolve */
-#define MOD_DPAINT_MULALPHA (1<<3) /* Multiply color by alpha when saving image */
-#define MOD_DPAINT_DISSOLVE_LOG (1<<4) /* Use 1/x for surface dissolve */
-#define MOD_DPAINT_DRY_LOG (1<<5) /* Use 1/x for drying paint */
-#define MOD_DPAINT_PREVIEW (1<<6) /* preview this surface on viewport*/
+ MOD_DPAINT_ANTIALIAS = 1 << 1, /* do antialiasing */
+ MOD_DPAINT_DISSOLVE = 1 << 2, /* do dissolve */
+ MOD_DPAINT_MULALPHA = 1 << 3, /* Multiply color by alpha when saving image */
+ MOD_DPAINT_DISSOLVE_LOG = 1 << 4, /* Use 1/x for surface dissolve */
+ MOD_DPAINT_DRY_LOG = 1 << 5, /* Use 1/x for drying paint */
+ MOD_DPAINT_PREVIEW = 1 << 6, /* preview this surface on viewport*/
-#define MOD_DPAINT_WAVE_OPEN_BORDERS (1<<7) /* passes waves through mesh edges */
-#define MOD_DPAINT_DISP_INCREMENTAL (1<<8) /* builds displace on top of earlier values */
-#define MOD_DPAINT_USE_DRYING (1<<9) /* use drying */
+ MOD_DPAINT_WAVE_OPEN_BORDERS = 1 << 7, /* passes waves through mesh edges */
+ MOD_DPAINT_DISP_INCREMENTAL = 1 << 8, /* builds displace on top of earlier values */
+ MOD_DPAINT_USE_DRYING = 1 << 9, /* use drying */
-#define MOD_DPAINT_OUT1 (1<<10) /* output primary surface */
-#define MOD_DPAINT_OUT2 (1<<11) /* output secondary surface */
+ MOD_DPAINT_OUT1 = 1 << 10, /* output primary surface */
+ MOD_DPAINT_OUT2 = 1 << 11, /* output secondary surface */
+};
/* image_fileformat */
-#define MOD_DPAINT_IMGFORMAT_PNG 0
-#define MOD_DPAINT_IMGFORMAT_OPENEXR 1
+enum {
+ MOD_DPAINT_IMGFORMAT_PNG = 0,
+ MOD_DPAINT_IMGFORMAT_OPENEXR = 1,
+};
/* disp_format */
-#define MOD_DPAINT_DISP_DISPLACE 0 /* displacement output displace map */
-#define MOD_DPAINT_DISP_DEPTH 1 /* displacement output depth data */
+enum {
+ MOD_DPAINT_DISP_DISPLACE = 0, /* displacement output displace map */
+ MOD_DPAINT_DISP_DEPTH = 1, /* displacement output depth data */
+};
/* effect */
-#define MOD_DPAINT_EFFECT_DO_SPREAD (1<<0) /* do spread effect */
-#define MOD_DPAINT_EFFECT_DO_DRIP (1<<1) /* do drip effect */
-#define MOD_DPAINT_EFFECT_DO_SHRINK (1<<2) /* do shrink effect */
+enum {
+ MOD_DPAINT_EFFECT_DO_SPREAD = 1 << 0, /* do spread effect */
+ MOD_DPAINT_EFFECT_DO_DRIP = 1 << 1, /* do drip effect */
+ MOD_DPAINT_EFFECT_DO_SHRINK = 1 << 2, /* do shrink effect */
+};
/* preview_id */
-#define MOD_DPAINT_SURFACE_PREV_PAINT 0
-#define MOD_DPAINT_SURFACE_PREV_WETMAP 1
+enum {
+ MOD_DPAINT_SURFACE_PREV_PAINT = 0,
+ MOD_DPAINT_SURFACE_PREV_WETMAP = 1,
+};
/* init_color_type */
-#define MOD_DPAINT_INITIAL_NONE 0
-#define MOD_DPAINT_INITIAL_COLOR 1
-#define MOD_DPAINT_INITIAL_TEXTURE 2
-#define MOD_DPAINT_INITIAL_VERTEXCOLOR 3
+enum {
+ MOD_DPAINT_INITIAL_NONE = 0,
+ MOD_DPAINT_INITIAL_COLOR = 1,
+ MOD_DPAINT_INITIAL_TEXTURE = 2,
+ MOD_DPAINT_INITIAL_VERTEXCOLOR = 3,
+};
typedef struct DynamicPaintSurface {
@@ -136,11 +151,14 @@ typedef struct DynamicPaintSurface {
} DynamicPaintSurface;
/* canvas flags */
-#if 0 /* This should not be needed, having a valid WEIGHT_MCOL layer should be enough.
- * And if not, should be a general flag. But seems unnecessary for now... */
-#define MOD_DPAINT_PREVIEW_READY (1<<0) /* if viewport preview is ready */
+enum {
+ /* This should not be needed, having a valid WEIGHT_MCOL layer should be enough.
+ * And if not, should be a general flag. But seems unnecessary for now... */
+#if 0
+ MOD_DPAINT_PREVIEW_READY = 1 << 0, /* if viewport preview is ready */
#endif
-#define MOD_DPAINT_BAKING (1<<1) /* surface is already baking, so it wont get updated (loop) */
+ MOD_DPAINT_BAKING = 1 << 1, /* surface is already baking, so it wont get updated (loop) */
+};
/* Canvas settings */
typedef struct DynamicPaintCanvasSettings {
@@ -157,47 +175,56 @@ typedef struct DynamicPaintCanvasSettings {
/* flags */
-#define MOD_DPAINT_PART_RAD (1<<0) /* use particle radius */
-#define MOD_DPAINT_USE_MATERIAL (1<<1) /* use object material */
-#define MOD_DPAINT_ABS_ALPHA (1<<2) /* don't increase alpha unless
- * paint alpha is higher than existing */
-#define MOD_DPAINT_ERASE (1<<3) /* removes paint */
-
-#define MOD_DPAINT_RAMP_ALPHA (1<<4) /* only read falloff ramp alpha */
-#define MOD_DPAINT_PROX_PROJECT (1<<5) /* do proximity check only in defined dir */
-#define MOD_DPAINT_INVERSE_PROX (1<<6) /* inverse proximity painting */
-#define MOD_DPAINT_NEGATE_VOLUME (1<<7) /* negates volume influence on "volume + prox" mode */
-
-#define MOD_DPAINT_DO_SMUDGE (1<<8) /* brush smudges existing paint */
-#define MOD_DPAINT_VELOCITY_ALPHA (1<<9) /* multiply brush influence by velocity */
-#define MOD_DPAINT_VELOCITY_COLOR (1<<10) /* replace brush color by velocity color ramp */
-#define MOD_DPAINT_VELOCITY_DEPTH (1<<11) /* multiply brush intersection depth by velocity */
-
-#define MOD_DPAINT_USES_VELOCITY ((1<<8)|(1<<9)|(1<<10)|(1<<11))
+enum {
+ MOD_DPAINT_PART_RAD = 1 << 0, /* use particle radius */
+ MOD_DPAINT_USE_MATERIAL = 1 << 1, /* use object material */
+ MOD_DPAINT_ABS_ALPHA = 1 << 2, /* don't increase alpha unless paint alpha is higher than existing */
+ MOD_DPAINT_ERASE = 1 << 3, /* removes paint */
+
+ MOD_DPAINT_RAMP_ALPHA = 1 << 4, /* only read falloff ramp alpha */
+ MOD_DPAINT_PROX_PROJECT = 1 << 5, /* do proximity check only in defined dir */
+ MOD_DPAINT_INVERSE_PROX = 1 << 6, /* inverse proximity painting */
+ MOD_DPAINT_NEGATE_VOLUME = 1 << 7, /* negates volume influence on "volume + prox" mode */
+
+ MOD_DPAINT_DO_SMUDGE = 1 << 8, /* brush smudges existing paint */
+ MOD_DPAINT_VELOCITY_ALPHA = 1 << 9, /* multiply brush influence by velocity */
+ MOD_DPAINT_VELOCITY_COLOR = 1 << 10, /* replace brush color by velocity color ramp */
+ MOD_DPAINT_VELOCITY_DEPTH = 1 << 11, /* multiply brush intersection depth by velocity */
+
+ MOD_DPAINT_USES_VELOCITY = (MOD_DPAINT_DO_SMUDGE | MOD_DPAINT_VELOCITY_ALPHA |
+ MOD_DPAINT_VELOCITY_COLOR | MOD_DPAINT_VELOCITY_DEPTH),
+};
/* collision type */
-#define MOD_DPAINT_COL_VOLUME 0 /* paint with mesh volume */
-#define MOD_DPAINT_COL_DIST 1 /* paint using distance to mesh surface */
-#define MOD_DPAINT_COL_VOLDIST 2 /* use both volume and distance */
-#define MOD_DPAINT_COL_PSYS 3 /* use particle system */
-#define MOD_DPAINT_COL_POINT 4 /* use distance to object center point */
+enum {
+ MOD_DPAINT_COL_VOLUME = 0, /* paint with mesh volume */
+ MOD_DPAINT_COL_DIST = 1, /* paint using distance to mesh surface */
+ MOD_DPAINT_COL_VOLDIST = 2, /* use both volume and distance */
+ MOD_DPAINT_COL_PSYS = 3, /* use particle system */
+ MOD_DPAINT_COL_POINT = 4, /* use distance to object center point */
+};
/* proximity_falloff */
-#define MOD_DPAINT_PRFALL_CONSTANT 0 /* no-falloff */
-#define MOD_DPAINT_PRFALL_SMOOTH 1 /* smooth, linear falloff */
-#define MOD_DPAINT_PRFALL_RAMP 2 /* use color ramp */
+enum {
+ MOD_DPAINT_PRFALL_CONSTANT = 0, /* no-falloff */
+ MOD_DPAINT_PRFALL_SMOOTH = 1, /* smooth, linear falloff */
+ MOD_DPAINT_PRFALL_RAMP = 2, /* use color ramp */
+};
/* wave_brush_type */
-#define MOD_DPAINT_WAVEB_DEPTH 0 /* use intersection depth */
-#define MOD_DPAINT_WAVEB_FORCE 1 /* act as a force on intersection area */
-#define MOD_DPAINT_WAVEB_REFLECT 2 /* obstacle that reflects waves */
-#define MOD_DPAINT_WAVEB_CHANGE 3 /* use change of intersection depth from previous frame */
+enum {
+ MOD_DPAINT_WAVEB_DEPTH = 0, /* use intersection depth */
+ MOD_DPAINT_WAVEB_FORCE = 1, /* act as a force on intersection area */
+ MOD_DPAINT_WAVEB_REFLECT = 2, /* obstacle that reflects waves */
+ MOD_DPAINT_WAVEB_CHANGE = 3, /* use change of intersection depth from previous frame */
+};
/* brush ray_dir */
-#define MOD_DPAINT_RAY_CANVAS 0
-#define MOD_DPAINT_RAY_BRUSH_AVG 1
-#define MOD_DPAINT_RAY_ZPLUS 2
-
+enum {
+ MOD_DPAINT_RAY_CANVAS = 0,
+ MOD_DPAINT_RAY_BRUSH_AVG = 1,
+ MOD_DPAINT_RAY_ZPLUS = 2,
+};
/* Brush settings */
typedef struct DynamicPaintBrushSettings {
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
index 040b55d9eb6..fc7959c0043 100644
--- a/source/blender/makesdna/DNA_fileglobal_types.h
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -41,9 +41,9 @@ struct Scene;
*/
typedef struct FileGlobal {
char subvstr[4]; /* needs to be here, for human fileformat recognition */
- short subversion, pads;
+ short subversion;
short minversion, minsubversion;
- short displaymode, winpos;
+ char pad[6];
struct bScreen *curscreen;
struct Scene *curscene;
int fileflags;
diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h
index 195c7eb4841..2359d1e9738 100644
--- a/source/blender/makesdna/DNA_freestyle_types.h
+++ b/source/blender/makesdna/DNA_freestyle_types.h
@@ -44,59 +44,74 @@ struct Group;
struct Text;
/* FreestyleConfig::flags */
-#define FREESTYLE_SUGGESTIVE_CONTOURS_FLAG (1 << 0)
-#define FREESTYLE_RIDGES_AND_VALLEYS_FLAG (1 << 1)
-#define FREESTYLE_MATERIAL_BOUNDARIES_FLAG (1 << 2)
-#define FREESTYLE_FACE_SMOOTHNESS_FLAG (1 << 3)
-#define FREESTYLE_ADVANCED_OPTIONS_FLAG (1 << 4)
-#define FREESTYLE_CULLING (1 << 5)
+enum {
+ FREESTYLE_SUGGESTIVE_CONTOURS_FLAG = 1 << 0,
+ FREESTYLE_RIDGES_AND_VALLEYS_FLAG = 1 << 1,
+ FREESTYLE_MATERIAL_BOUNDARIES_FLAG = 1 << 2,
+ FREESTYLE_FACE_SMOOTHNESS_FLAG = 1 << 3,
+ FREESTYLE_ADVANCED_OPTIONS_FLAG = 1 << 4,
+ FREESTYLE_CULLING = 1 << 5,
+ FREESTYLE_VIEW_MAP_CACHE = 1 << 6,
+};
/* FreestyleConfig::mode */
-#define FREESTYLE_CONTROL_SCRIPT_MODE 1
-#define FREESTYLE_CONTROL_EDITOR_MODE 2
+enum {
+ FREESTYLE_CONTROL_SCRIPT_MODE = 1,
+ FREESTYLE_CONTROL_EDITOR_MODE = 2,
+};
/* FreestyleLineSet::flags */
-#define FREESTYLE_LINESET_CURRENT (1 << 0)
-#define FREESTYLE_LINESET_ENABLED (1 << 1)
-#define FREESTYLE_LINESET_FE_NOT (1 << 2)
-#define FREESTYLE_LINESET_FE_AND (1 << 3)
-#define FREESTYLE_LINESET_GR_NOT (1 << 4)
-#define FREESTYLE_LINESET_FM_NOT (1 << 5)
-#define FREESTYLE_LINESET_FM_BOTH (1 << 6)
+enum {
+ FREESTYLE_LINESET_CURRENT = 1 << 0,
+ FREESTYLE_LINESET_ENABLED = 1 << 1,
+ FREESTYLE_LINESET_FE_NOT = 1 << 2,
+ FREESTYLE_LINESET_FE_AND = 1 << 3,
+ FREESTYLE_LINESET_GR_NOT = 1 << 4,
+ FREESTYLE_LINESET_FM_NOT = 1 << 5,
+ FREESTYLE_LINESET_FM_BOTH = 1 << 6,
+};
/* FreestyleLineSet::selection */
-#define FREESTYLE_SEL_VISIBILITY (1 << 0)
-#define FREESTYLE_SEL_EDGE_TYPES (1 << 1)
-#define FREESTYLE_SEL_GROUP (1 << 2)
-#define FREESTYLE_SEL_IMAGE_BORDER (1 << 3)
-#define FREESTYLE_SEL_FACE_MARK (1 << 4)
+enum {
+ FREESTYLE_SEL_VISIBILITY = 1 << 0,
+ FREESTYLE_SEL_EDGE_TYPES = 1 << 1,
+ FREESTYLE_SEL_GROUP = 1 << 2,
+ FREESTYLE_SEL_IMAGE_BORDER = 1 << 3,
+ FREESTYLE_SEL_FACE_MARK = 1 << 4,
+};
/* FreestyleLineSet::edge_types, exclude_edge_types */
-#define FREESTYLE_FE_SILHOUETTE (1 << 0)
-#define FREESTYLE_FE_BORDER (1 << 1)
-#define FREESTYLE_FE_CREASE (1 << 2)
-#define FREESTYLE_FE_RIDGE_VALLEY (1 << 3)
-/* Note: FREESTYLE_FE_VALLEY = (1 << 4) is no longer used */
-#define FREESTYLE_FE_SUGGESTIVE_CONTOUR (1 << 5)
-#define FREESTYLE_FE_MATERIAL_BOUNDARY (1 << 6)
-#define FREESTYLE_FE_CONTOUR (1 << 7)
-#define FREESTYLE_FE_EXTERNAL_CONTOUR (1 << 8)
-#define FREESTYLE_FE_EDGE_MARK (1 << 9)
+enum {
+ FREESTYLE_FE_SILHOUETTE = 1 << 0,
+ FREESTYLE_FE_BORDER = 1 << 1,
+ FREESTYLE_FE_CREASE = 1 << 2,
+ FREESTYLE_FE_RIDGE_VALLEY = 1 << 3,
+ /* FREESTYLE_FE_VALLEY = 1 << 4, */ /* No longer used */
+ FREESTYLE_FE_SUGGESTIVE_CONTOUR = 1 << 5,
+ FREESTYLE_FE_MATERIAL_BOUNDARY = 1 << 6,
+ FREESTYLE_FE_CONTOUR = 1 << 7,
+ FREESTYLE_FE_EXTERNAL_CONTOUR = 1 << 8,
+ FREESTYLE_FE_EDGE_MARK = 1 << 9,
+};
/* FreestyleLineSet::qi */
-#define FREESTYLE_QI_VISIBLE 1
-#define FREESTYLE_QI_HIDDEN 2
-#define FREESTYLE_QI_RANGE 3
+enum {
+ FREESTYLE_QI_VISIBLE = 1,
+ FREESTYLE_QI_HIDDEN = 2,
+ FREESTYLE_QI_RANGE = 3,
+};
/* FreestyleConfig::raycasting_algorithm */
/* Defines should be replaced with ViewMapBuilder::visibility_algo */
-#define FREESTYLE_ALGO_REGULAR 1
-#define FREESTYLE_ALGO_FAST 2
-#define FREESTYLE_ALGO_VERYFAST 3
-#define FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL 4
-#define FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL 5
-#define FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE 6
-#define FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE 7
+enum {
+ FREESTYLE_ALGO_REGULAR = 1,
+ FREESTYLE_ALGO_FAST = 2,
+ FREESTYLE_ALGO_VERYFAST = 3,
+ FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL = 4,
+ FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL = 5,
+ FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE = 6,
+ FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE = 7,
+};
typedef struct FreestyleLineSet {
struct FreestyleLineSet *next, *prev;
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 2bf874d3a85..beffbc4c017 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -33,6 +33,9 @@
#include "DNA_listBase.h"
#include "DNA_ID.h"
+struct AnimData;
+
+
/* Grease-Pencil Annotations - 'Stroke Point'
* -> Coordinates may either be 2d or 3d depending on settings at the time
* -> Coordinates of point on stroke, in proportions of window size
@@ -42,8 +45,15 @@ typedef struct bGPDspoint {
float x, y, z; /* co-ordinates of point (usually 2d, but can be 3d as well) */
float pressure; /* pressure of input device (from 0 to 1) at this point */
float time; /* seconds since start of stroke */
+ int flag; /* additional options (NOTE: can shrink this field down later if needed) */
} bGPDspoint;
+/* bGPDspoint->flag */
+typedef enum eGPDspoint_Flag {
+ /* stroke point is selected (for editing) */
+ GP_SPOINT_SELECT = (1 << 0)
+} eGPSPoint_Flag;
+
/* Grease-Pencil Annotations - 'Stroke'
* -> A stroke represents a (simplified version) of the curve
* drawn by the user in one 'mousedown'->'mouseup' operation
@@ -61,15 +71,18 @@ typedef struct bGPDstroke {
} bGPDstroke;
/* bGPDstroke->flag */
+typedef enum eGPDstroke_Flag {
/* stroke is in 3d-space */
-#define GP_STROKE_3DSPACE (1<<0)
+ GP_STROKE_3DSPACE = (1 << 0),
/* stroke is in 2d-space */
-#define GP_STROKE_2DSPACE (1<<1)
+ GP_STROKE_2DSPACE = (1 << 1),
/* stroke is in 2d-space (but with special 'image' scaling) */
-#define GP_STROKE_2DIMAGE (1<<2)
+ GP_STROKE_2DIMAGE = (1 << 2),
+ /* stroke is selected */
+ GP_STROKE_SELECT = (1 << 3),
/* only for use with stroke-buffer (while drawing eraser) */
-#define GP_STROKE_ERASER (1<<15)
-
+ GP_STROKE_ERASER = (1 << 15)
+} eGPDstroke_Flag;
/* Grease-Pencil Annotations - 'Frame'
* -> Acts as storage for the 'image' formed by strokes
@@ -80,15 +93,18 @@ typedef struct bGPDframe {
ListBase strokes; /* list of the simplified 'strokes' that make up the frame's data */
int framenum; /* frame number of this frame */
- int flag; /* temp settings */
+
+ short flag; /* temp settings */
+ short key_type; /* keyframe type (eBezTriple_KeyframeType) */
} bGPDframe;
-/* bGPDframe->flag */
+/* bGPDframe->flag */
+typedef enum eGPDframe_Flag {
/* frame is being painted on */
-#define GP_FRAME_PAINT (1<<0)
+ GP_FRAME_PAINT = (1 << 0),
/* for editing in Action Editor */
-#define GP_FRAME_SELECT (1<<1)
-
+ GP_FRAME_SELECT = (1 << 1)
+} eGPDframe_Flag;
/* Grease-Pencil Annotations - 'Layer' */
typedef struct bGPDlayer {
@@ -97,38 +113,52 @@ typedef struct bGPDlayer {
ListBase frames; /* list of annotations to display for frames (bGPDframe list) */
bGPDframe *actframe; /* active frame (should be the frame that is currently being displayed) */
- int flag; /* settings for layer */
+ short flag; /* settings for layer */
short thickness; /* current thickness to apply to strokes */
- short gstep; /* max number of frames between active and ghost to show (0=only those on either side) */
+
+ short gstep; /* Ghosts Before: max number of ghost frames to show between active frame and the one before it (0 = only the ghost itself) */
+ short gstep_next; /* Ghosts After: max number of ghost frames to show after active frame and the following it (0 = only the ghost itself) */
+
+ float gcolor_prev[3]; /* optional color for ghosts before the active frame */
+ float gcolor_next[3]; /* optional color for ghosts after the active frame */
float color[4]; /* color that should be used to draw all the strokes in this layer */
+ float fill[4]; /* color that should be used for drawing "fills" for strokes */
char info[128]; /* optional reference info about this layer (i.e. "director's comments, 12/3")
* this is used for the name of the layer too and kept unique. */
} bGPDlayer;
/* bGPDlayer->flag */
+typedef enum eGPDlayer_Flag {
/* don't display layer */
-#define GP_LAYER_HIDE (1<<0)
+ GP_LAYER_HIDE = (1 << 0),
/* protected from further editing */
-#define GP_LAYER_LOCKED (1<<1)
+ GP_LAYER_LOCKED = (1 << 1),
/* layer is 'active' layer being edited */
-#define GP_LAYER_ACTIVE (1<<2)
+ GP_LAYER_ACTIVE = (1 << 2),
/* draw points of stroke for debugging purposes */
-#define GP_LAYER_DRAWDEBUG (1<<3)
- /* do onionskinning */
-#define GP_LAYER_ONIONSKIN (1<<4)
+ GP_LAYER_DRAWDEBUG = (1 << 3),
+ /* do onion skinning */
+ GP_LAYER_ONIONSKIN = (1 << 4),
/* for editing in Action Editor */
-#define GP_LAYER_SELECT (1<<5)
+ GP_LAYER_SELECT = (1 << 5),
/* current frame for layer can't be changed */
-#define GP_LAYER_FRAMELOCK (1<<6)
+ GP_LAYER_FRAMELOCK = (1 << 6),
/* don't render xray (which is default) */
-#define GP_LAYER_NO_XRAY (1<<7)
-
+ GP_LAYER_NO_XRAY = (1 << 7),
+ /* use custom color for ghosts before current frame */
+ 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) */
+ GP_LAYER_VOLUMETRIC = (1 << 10),
+} eGPDlayer_Flag;
/* Grease-Pencil Annotations - 'DataBlock' */
typedef struct bGPdata {
- ID id; /* Grease Pencil data is */
+ ID id; /* Grease Pencil data is a datablock */
+ struct AnimData *adt; /* animation data - for animating draw settings */
/* saved Grease-Pencil data */
ListBase layers; /* bGPDlayers */
@@ -144,23 +174,33 @@ typedef struct bGPdata {
} bGPdata;
/* bGPdata->flag */
-// XXX many of these flags should be deprecated for more general ideas in 2.5
+/* NOTE: A few flags have been deprecated since early 2.5,
+ * since they have been made redundant by interaction
+ * changes made during the porting process.
+ */
+typedef enum eGPdata_Flag {
/* don't allow painting to occur at all */
- // XXX is deprecated - not well understood
-// #define GP_DATA_LMBPLOCK (1<<0)
+ /* GP_DATA_LMBPLOCK = (1 << 0), */
+
/* show debugging info in viewport (i.e. status print) */
-#define GP_DATA_DISPINFO (1<<1)
+ GP_DATA_DISPINFO = (1 << 1),
/* in Action Editor, show as expanded channel */
-#define GP_DATA_EXPAND (1<<2)
+ GP_DATA_EXPAND = (1 << 2),
+
/* is the block overriding all clicks? */
- // XXX is deprecated - nasty old concept
-// #define GP_DATA_EDITPAINT (1<<3)
+ /* GP_DATA_EDITPAINT = (1 << 3), */
+
/* new strokes are added in viewport space */
-#define GP_DATA_VIEWALIGN (1<<4)
- /* Project into the screens Z values */
-#define GP_DATA_DEPTH_VIEW (1<<5)
-#define GP_DATA_DEPTH_STROKE (1<<6)
+ GP_DATA_VIEWALIGN = (1 << 4),
+
+ /* Project into the screen's Z values */
+ GP_DATA_DEPTH_VIEW = (1 << 5),
+ GP_DATA_DEPTH_STROKE = (1 << 6),
-#define GP_DATA_DEPTH_STROKE_ENDPOINTS (1<<7)
+ GP_DATA_DEPTH_STROKE_ENDPOINTS = (1 << 7),
+
+ /* Stroke Editing Mode - Toggle to enable alternative keymap for easier editing of stroke points */
+ GP_DATA_STROKE_EDITMODE = (1 << 8)
+} eGPdata_Flag;
#endif /* __DNA_GPENCIL_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_gpu_types.h b/source/blender/makesdna/DNA_gpu_types.h
new file mode 100644
index 00000000000..967cb7284dc
--- /dev/null
+++ b/source/blender/makesdna/DNA_gpu_types.h
@@ -0,0 +1,68 @@
+/*
+ * ***** 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_gpu_types.h
+ * \ingroup DNA
+ */
+
+#ifndef __DNA_GPU_TYPES_H__
+#define __DNA_GPU_TYPES_H__
+
+/* properties for dof effect */
+typedef struct GPUDOFSettings {
+ float focus_distance; /* focal distance for depth of field */
+ float fstop;
+ float focal_length;
+ float sensor;
+ int num_blades;
+ int high_quality;
+} GPUDOFSettings;
+
+/* properties for SSAO effect */
+typedef struct GPUSSAOSettings {
+ float factor;
+ float color[3];
+ float distance_max;
+ float attenuation;
+ int samples; /* ray samples, we use presets here for easy control instead of */
+ int pad;
+} GPUSSAOSettings;
+
+typedef struct GPUFXSettings {
+ GPUDOFSettings *dof;
+ GPUSSAOSettings *ssao;
+ char fx_flag; /* eGPUFXFlags */
+ char pad[7];
+} GPUFXSettings;
+
+/* shaderfx enables */
+typedef enum eGPUFXFlags {
+ GPU_FX_FLAG_DOF = (1 << 0),
+ GPU_FX_FLAG_SSAO = (1 << 1),
+} eGPUFXFlags;
+
+#endif /* __DNA_GPU_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h
index 2740281b4c0..45dd0cb9ff2 100644
--- a/source/blender/makesdna/DNA_group_types.h
+++ b/source/blender/makesdna/DNA_group_types.h
@@ -52,7 +52,9 @@ typedef struct Group {
ID id;
ListBase gobject; /* GroupObject */
-
+
+ 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 */
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 0b9dddd0ea5..56a8842a8d2 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -39,12 +39,10 @@
struct PackedFile;
struct Scene;
struct anim;
-struct ImBuf;
struct MovieCache;
struct RenderResult;
struct GPUTexture;
-
/* ImageUser is in Texture, in Nodes, Background Image, Image Window, .... */
/* should be used in conjunction with an ID * to Image. */
typedef struct ImageUser {
@@ -54,21 +52,43 @@ typedef struct ImageUser {
int frames; /* total amount of frames to use */
int offset, sfra; /* offset within movie, start frame in global time */
char fie_ima, cycl; /* fields/image in movie, cyclic flag */
- char ok, pad;
+ char ok;
- short multi_index, layer, pass; /* listbase indices, for menu browsing or retrieve buffer */
+ char multiview_eye; /* multiview current eye - for internal use of drawing routines */
+ short pass;
+ short pad;
+ short multi_index, view, layer; /* listbase indices, for menu browsing or retrieve buffer */
short flag;
-
- int pad2;
-
} ImageUser;
+typedef struct ImageAnim {
+ struct ImageAnim *next, *prev;
+ struct anim *anim;
+} ImageAnim;
+
+typedef struct ImageView {
+ struct ImageView *next, *prev;
+ char name[64]; /* MAX_NAME */
+ char filepath[1024]; /* 1024 = FILE_MAX */
+} ImageView;
+
+typedef struct ImagePackedFile {
+ struct ImagePackedFile *next, *prev;
+ struct PackedFile *packedfile;
+ char filepath[1024]; /* 1024 = FILE_MAX */
+} ImagePackedFile;
+
+typedef struct RenderSlot {
+ char name[64]; /* 64 = MAX_NAME */
+} RenderSlot;
+
/* iuser->flag */
#define IMA_ANIM_ALWAYS 1
#define IMA_ANIM_REFRESHED 2
/* #define IMA_DO_PREMUL 4 */
#define IMA_NEED_FRAME_RECALC 8
+#define IMA_SHOW_STEREO 16
typedef struct Image {
ID id;
@@ -79,13 +99,13 @@ typedef struct Image {
struct GPUTexture *gputexture; /* not written in file */
/* sources from: */
- struct anim *anim;
+ ListBase anims;
struct RenderResult *rr;
struct RenderResult *renders[8]; /* IMA_MAX_RENDER_SLOT */
short render_slot, last_render_slot;
-
- short ok, flag;
+
+ int flag;
short source, type;
int lastframe;
@@ -96,19 +116,22 @@ typedef struct Image {
unsigned int bindcode; /* only for current image... */
unsigned int *repbind; /* for repeat of parts of images */
- struct PackedFile *packedfile;
+ struct PackedFile *packedfile DNA_DEPRECATED; /* deprecated */
+ struct ListBase packedfiles;
struct PreviewImage *preview;
/* game engine tile animation */
float lastupdate;
int lastused;
short animspeed;
- short pad2;
+
+ short ok;
/* for generated images */
int gen_x, gen_y;
char gen_type, gen_flag;
short gen_depth;
+ float gen_color[4];
/* display aspect - for UV editing images resized for faster openGL display */
float aspx, aspy;
@@ -117,7 +140,15 @@ typedef struct Image {
ColorManagedColorspaceSettings colorspace_settings;
char alpha_mode;
- char pad[7];
+ char pad[5];
+
+ /* Multiview */
+ char eye; /* for viewer node stereoscopy */
+ char views_format;
+ ListBase views;
+ struct Stereo3dFormat *stereo3d_format;
+
+ RenderSlot render_slots[8]; /* 8 = IMA_MAX_RENDER_SLOT */
} Image;
@@ -127,7 +158,9 @@ typedef struct Image {
enum {
IMA_FIELDS = (1 << 0),
IMA_STD_FIELD = (1 << 1),
+#ifdef DNA_DEPRECATED
IMA_DO_PREMUL = (1 << 2), /* deprecated, should not be used */
+#endif
IMA_REFLECT = (1 << 4),
IMA_NOCOLLECT = (1 << 5),
//IMA_DONE_TAG = (1 << 6), // UNUSED
@@ -137,12 +170,12 @@ enum {
IMA_USER_FRAME_IN_RANGE = (1 << 10), /* for image user, but these flags are mixed */
IMA_VIEW_AS_RENDER = (1 << 11),
IMA_IGNORE_ALPHA = (1 << 12),
+ IMA_DEINTERLACE = (1 << 13),
+ IMA_USE_VIEWS = (1 << 14),
+ IMA_IS_STEREO = (1 << 15),
+ IMA_IS_MULTIVIEW = (1 << 16), /* similar to stereo, but a more general case */
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison IMA_DO_PREMUL
-#endif
-
/* Image.tpageflag */
#define IMA_TILES 1
#define IMA_TWINANIM 2
diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h
index f5ce3c8d8c1..60ab01c901b 100644
--- a/source/blender/makesdna/DNA_key_types.h
+++ b/source/blender/makesdna/DNA_key_types.h
@@ -91,10 +91,10 @@ typedef struct Key {
ID *from;
- short type; /* absolute or relative shape key */
- short totkey; /* (totkey == BLI_countlist(&key->block)) */
- short slurph; /* quaint feature to delay moving points based on their order (Key->type == KEY_NORMAL) only */
+ int totkey; /* (totkey == BLI_listbase_count(&key->block)) */
short flag;
+ char type; /* absolute or relative shape key */
+ char pad2;
/* only used when (Key->type == KEY_NORMAL), this value is used as a time slider,
* rather then using the scenes time, this value can be animated to give greater control */
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index b7aae005e3b..ce8e86cb512 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -131,26 +131,27 @@ typedef struct Lamp {
#define LA_YF_PHOTON 5
/* mode */
-#define LA_SHAD_BUF 1
-#define LA_HALO 2
-#define LA_LAYER 4
-#define LA_QUAD 8 /* no longer used */
-#define LA_NEG 16
-#define LA_ONLYSHADOW 32
-#define LA_SPHERE 64
-#define LA_SQUARE 128
-#define LA_TEXTURE 256
-#define LA_OSATEX 512
-/* #define LA_DEEP_SHADOW 1024 */ /* not used anywhere */
-#define LA_NO_DIFF 2048
-#define LA_NO_SPEC 4096
-#define LA_SHAD_RAY 8192
+#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_SQUARE (1 << 7)
+#define LA_TEXTURE (1 << 8)
+#define LA_OSATEX (1 << 9)
+/* #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)
/* yafray: lamp shadowbuffer flag, softlight */
/* Since it is used with LOCAL lamp, can't use LA_SHAD */
-/* #define LA_YF_SOFT 16384 */ /* no longer used */
-#define LA_LAYER_SHADOW 32768
-#define LA_SHAD_TEX (1<<16)
-#define LA_SHOW_CONE (1<<17)
+/* #define LA_YF_SOFT (1 << 14) */ /* no longer used */
+#define LA_LAYER_SHADOW (1 << 15)
+#define LA_SHAD_TEX (1 << 16)
+#define LA_SHOW_CONE (1 << 17)
+#define LA_SHOW_SHADOW_BOX (1 << 18)
/* layer_shadow */
#define LA_LAYER_SHADOW_BOTH 0
diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h
index bac03b4efd7..f9b9f8a4641 100644
--- a/source/blender/makesdna/DNA_linestyle_types.h
+++ b/source/blender/makesdna/DNA_linestyle_types.h
@@ -57,7 +57,6 @@ typedef struct LineStyleModifier {
float influence;
int flags;
int blend;
-
} LineStyleModifier;
/* LineStyleModifier::type */
@@ -79,7 +78,12 @@ typedef struct LineStyleModifier {
#define LS_MODIFIER_BLUEPRINT 16
#define LS_MODIFIER_2D_OFFSET 17
#define LS_MODIFIER_2D_TRANSFORM 18
-#define LS_MODIFIER_NUM 19
+#define LS_MODIFIER_TANGENT 19
+#define LS_MODIFIER_NOISE 20
+#define LS_MODIFIER_CREASE_ANGLE 21
+#define LS_MODIFIER_SIMPLIFICATION 22
+#define LS_MODIFIER_CURVATURE_3D 23
+#define LS_MODIFIER_NUM 24
/* LineStyleModifier::flags */
#define LS_MODIFIER_ENABLED 1
@@ -92,6 +96,9 @@ typedef struct LineStyleModifier {
#define LS_MODIFIER_USE_CURVE 1
#define LS_MODIFIER_INVERT 2
+/* flags (for asymmetric thickness application) */
+#define LS_THICKNESS_ASYMMETRIC 1
+
/* blend (for alpha & thickness) */
#define LS_VALUE_BLEND 0
#define LS_VALUE_ADD 1
@@ -186,6 +193,113 @@ typedef struct LineStyleThicknessModifier_DistanceFromObject {
int pad;
} LineStyleThicknessModifier_DistanceFromObject;
+/* 3D curvature modifiers */
+
+typedef struct LineStyleColorModifier_Curvature_3D {
+ struct LineStyleModifier modifier;
+
+ float min_curvature, max_curvature;
+ struct ColorBand *color_ramp;
+ float range_min, range_max;
+} LineStyleColorModifier_Curvature_3D;
+
+typedef struct LineStyleAlphaModifier_Curvature_3D {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int flags;
+ float min_curvature, max_curvature;
+ int pad;
+} LineStyleAlphaModifier_Curvature_3D;
+
+typedef struct LineStyleThicknessModifier_Curvature_3D {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int flags, pad;
+ float min_curvature, max_curvature;
+ float min_thickness, max_thickness;
+} LineStyleThicknessModifier_Curvature_3D;
+
+/* Noise modifiers (for color, alpha and thickness) */
+
+typedef struct LineStyleColorModifier_Noise {
+ struct LineStyleModifier modifier;
+
+ struct ColorBand *color_ramp;
+ float period, amplitude;
+ int seed, pad;
+} LineStyleColorModifier_Noise;
+
+typedef struct LineStyleAlphaModifier_Noise {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int flags;
+ float period, amplitude;
+ int seed;
+} LineStyleAlphaModifier_Noise;
+
+typedef struct LineStyleThicknessModifier_Noise {
+ struct LineStyleModifier modifier;
+
+ float period, amplitude;
+ int flags;
+ int seed;
+} LineStyleThicknessModifier_Noise;
+
+/* Crease Angle modifiers */
+
+typedef struct LineStyleColorModifier_CreaseAngle {
+ struct LineStyleModifier modifier;
+
+ struct ColorBand *color_ramp;
+ float min_angle, max_angle;
+} LineStyleColorModifier_CreaseAngle;
+
+typedef struct LineStyleAlphaModifier_CreaseAngle {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int flags;
+ float min_angle, max_angle;
+ int pad;
+} LineStyleAlphaModifier_CreaseAngle;
+
+typedef struct LineStyleThicknessModifier_CreaseAngle {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int flags, pad;
+ float min_angle, max_angle;
+ float min_thickness, max_thickness;
+} LineStyleThicknessModifier_CreaseAngle;
+
+/* Tangent modifiers */
+
+typedef struct LineStyleColorModifier_Tangent {
+ struct LineStyleModifier modifier;
+
+ struct ColorBand *color_ramp;
+} LineStyleColorModifier_Tangent;
+
+typedef struct LineStyleAlphaModifier_Tangent {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int flags;
+ int pad;
+} LineStyleAlphaModifier_Tangent;
+
+typedef struct LineStyleThicknessModifier_Tangent {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int flags;
+ float min_thickness, max_thickness;
+ int pad;
+} LineStyleThicknessModifier_Tangent;
+
/* Material modifiers */
/* mat_attr */
@@ -203,6 +317,7 @@ typedef struct LineStyleThicknessModifier_DistanceFromObject {
#define LS_MODIFIER_MATERIAL_LINE_R 12
#define LS_MODIFIER_MATERIAL_LINE_G 13
#define LS_MODIFIER_MATERIAL_LINE_B 14
+#define LS_MODIFIER_MATERIAL_LINE_A 15
typedef struct LineStyleColorModifier_Material {
struct LineStyleModifier modifier;
@@ -353,6 +468,13 @@ typedef struct LineStyleGeometryModifier_2DTransform {
int pad;
} LineStyleGeometryModifier_2DTransform;
+typedef struct LineStyleGeometryModifier_Simplification {
+ struct LineStyleModifier modifier;
+
+ float tolerance;
+ int pad;
+}LineStyleGeometryModifier_Simplification;
+
/* Calligraphic thickness modifier */
typedef struct LineStyleThicknessModifier_Calligraphy {
@@ -387,6 +509,7 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
#define LS_NO_SORTING (1 << 11)
#define LS_REVERSE_ORDER (1 << 12) /* for sorting */
#define LS_TEXTURE (1 << 13)
+#define LS_CHAIN_COUNT (1 << 14)
/* FreestyleLineStyle::chaining */
#define LS_CHAINING_PLAIN 1
@@ -406,6 +529,8 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
/* FreestyleLineStyle::sort_key */
#define LS_SORT_KEY_DISTANCE_FROM_CAMERA 1
#define LS_SORT_KEY_2D_LENGTH 2
+#define LS_SORT_KEY_PROJECTED_X 3
+#define LS_SORT_KEY_PROJECTED_Y 4
/* FreestyleLineStyle::integration_type */
#define LS_INTEGRATION_MEAN 1
@@ -428,17 +553,17 @@ typedef struct FreestyleLineStyle {
float split_length;
float min_angle, max_angle; /* in radians, for splitting */
float min_length, max_length;
+ unsigned int chain_count;
unsigned short split_dash1, split_gap1;
unsigned short split_dash2, split_gap2;
unsigned short split_dash3, split_gap3;
int sort_key, integration_type;
float texstep;
short texact, pr_texture;
- short use_nodes, pad;
+ short use_nodes, pad[3];
unsigned short dash1, gap1, dash2, gap2, dash3, gap3;
int panel; /* for UI */
-
- struct MTex *mtex[18]; /* MAX_MTEX */
+ struct MTex *mtex[18]; /* MAX_MTEX */
/* nodes */
struct bNodeTree *nodetree;
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 3f94a9cfebb..8790f736600 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -210,6 +210,7 @@ typedef struct Material {
#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 */
@@ -438,6 +439,7 @@ typedef struct Material {
#define MAP_PA_CLUMP 128
#define MAP_PA_KINK 256
#define MAP_PA_ROUGH 512
+#define MAP_PA_FREQ 1024
/* pr_type */
#define MA_FLAT 0
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index e535e6012b3..39e56925903 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -37,7 +37,6 @@
#include "DNA_customdata_types.h"
struct AnimData;
-struct DerivedMesh;
struct Ipo;
struct Key;
struct MCol;
@@ -47,13 +46,11 @@ struct MLoop;
struct MLoopCol;
struct MLoopUV;
struct MPoly;
-struct MSticky;
struct MTexPoly;
struct MVert;
struct Material;
struct Mesh;
struct Multires;
-struct OcInfo;
typedef struct Mesh {
ID id;
@@ -133,6 +130,7 @@ typedef struct Mesh {
} Mesh;
/* deprecated by MTFace, only here for file reading */
+#ifdef DNA_DEPRECATED
typedef struct TFace {
void *tpage; /* the faces image for the active UVLayer */
float uv[4][2];
@@ -140,24 +138,25 @@ typedef struct TFace {
char flag, transp;
short mode, tile, unwrap;
} TFace;
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison TFace
#endif
/* **************** MESH ********************* */
/* texflag */
-#define ME_AUTOSPACE 1
+enum {
+ ME_AUTOSPACE = 1,
+};
/* me->editflag */
-#define ME_EDIT_MIRROR_X (1 << 0)
-#define ME_EDIT_MIRROR_Y (1 << 1) // unused so far
-#define ME_EDIT_MIRROR_Z (1 << 2) // unused so far
+enum {
+ ME_EDIT_MIRROR_X = 1 << 0,
+ ME_EDIT_MIRROR_Y = 1 << 1, /* unused so far */
+ ME_EDIT_MIRROR_Z = 1 << 2, /* unused so far */
-#define ME_EDIT_PAINT_FACE_SEL (1 << 3)
-#define ME_EDIT_MIRROR_TOPO (1 << 4)
-#define ME_EDIT_PAINT_VERT_SEL (1 << 5)
+ ME_EDIT_PAINT_FACE_SEL = 1 << 3,
+ ME_EDIT_MIRROR_TOPO = 1 << 4,
+ ME_EDIT_PAINT_VERT_SEL = 1 << 5,
+};
/* we cant have both flags enabled at once,
* flags defined in DNA_scene_types.h */
@@ -168,57 +167,65 @@ typedef struct TFace {
)
/* me->flag */
-/* #define ME_ISDONE 1 */
-/* #define ME_DEPRECATED 2 */
-#define ME_TWOSIDED 4
-#define ME_UVEFFECT 8
-#define ME_VCOLEFFECT 16
-#define ME_AUTOSMOOTH 32
-#define ME_SMESH 64
-#define ME_SUBSURF 128
-#define ME_OPT_EDGES 256
-#define ME_DS_EXPAND 512
-#define ME_SCULPT_DYNAMIC_TOPOLOGY 1024
+enum {
+/* ME_ISDONE = 1 << 0, */
+/* ME_DEPRECATED = 1 << 1, */
+ ME_TWOSIDED = 1 << 2,
+ ME_UVEFFECT = 1 << 3,
+ ME_VCOLEFFECT = 1 << 4,
+ ME_AUTOSMOOTH = 1 << 5,
+ ME_SMESH = 1 << 6,
+ ME_SUBSURF = 1 << 7,
+ ME_OPT_EDGES = 1 << 8,
+ ME_DS_EXPAND = 1 << 9,
+ ME_SCULPT_DYNAMIC_TOPOLOGY = 1 << 10,
+};
/* me->cd_flag */
-#define ME_CDFLAG_VERT_BWEIGHT (1 << 0)
-#define ME_CDFLAG_EDGE_BWEIGHT (1 << 1)
-#define ME_CDFLAG_EDGE_CREASE (1 << 2)
+enum {
+ ME_CDFLAG_VERT_BWEIGHT = 1 << 0,
+ ME_CDFLAG_EDGE_BWEIGHT = 1 << 1,
+ ME_CDFLAG_EDGE_CREASE = 1 << 2,
+};
/* me->drawflag, short */
-#define ME_DRAWEDGES (1 << 0)
-#define ME_DRAWFACES (1 << 1)
-#define ME_DRAWNORMALS (1 << 2)
-#define ME_DRAW_VNORMALS (1 << 3)
+enum {
+ ME_DRAWEDGES = 1 << 0,
+ ME_DRAWFACES = 1 << 1,
+ ME_DRAWNORMALS = 1 << 2,
+ ME_DRAW_VNORMALS = 1 << 3,
-#define ME_DRAWEIGHT (1 << 4)
-#define ME_HIDDENEDGES (1 << 5)
+ ME_DRAWEIGHT = 1 << 4,
+ /* ME_HIDDENEDGES = 1 << 5, */ /* DEPRECATED */
-#define ME_DRAWCREASES (1 << 6)
-#define ME_DRAWSEAMS (1 << 7)
-#define ME_DRAWSHARP (1 << 8)
-#define ME_DRAWBWEIGHTS (1 << 9)
+ ME_DRAWCREASES = 1 << 6,
+ ME_DRAWSEAMS = 1 << 7,
+ ME_DRAWSHARP = 1 << 8,
+ ME_DRAWBWEIGHTS = 1 << 9,
-#define ME_DRAWEXTRA_EDGELEN (1 << 10)
-#define ME_DRAWEXTRA_FACEAREA (1 << 11)
-#define ME_DRAWEXTRA_FACEANG (1 << 12)
-#define ME_DRAWEXTRA_EDGEANG (1 << 13)
+ ME_DRAWEXTRA_EDGELEN = 1 << 10,
+ ME_DRAWEXTRA_FACEAREA = 1 << 11,
+ ME_DRAWEXTRA_FACEANG = 1 << 12,
+ ME_DRAWEXTRA_EDGEANG = 1 << 13,
/* debug only option */
-#define ME_DRAWEXTRA_INDICES (1 << 14)
+ ME_DRAWEXTRA_INDICES = 1 << 14,
-#define ME_DRAW_FREESTYLE_EDGE (1 << 15)
-#define ME_DRAW_FREESTYLE_FACE (1 << 16)
+ ME_DRAW_FREESTYLE_EDGE = 1 << 15,
+ ME_DRAW_FREESTYLE_FACE = 1 << 16,
/* draw stats */
-#define ME_DRAW_STATVIS (1 << 17)
+ ME_DRAW_STATVIS = 1 << 17,
/* draw loop normals */
-#define ME_DRAW_LNORMALS (1 << 18)
+ ME_DRAW_LNORMALS = 1 << 18,
+};
/* Subsurf Type */
-#define ME_CC_SUBSURF 0
-#define ME_SIMPLE_SUBSURF 1
+enum {
+ ME_CC_SUBSURF = 0,
+ ME_SIMPLE_SUBSURF = 1,
+};
#define MESH_MAX_VERTS 2000000000L
@@ -229,6 +236,6 @@ typedef struct TFace {
#define USE_BMESH_SAVE_WITHOUT_MFACE
/* enable this so meshes get tessfaces calculated by default */
-// #define USE_TESSFACE_DEFAULT
+/* #define USE_TESSFACE_DEFAULT */
#endif
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 3304980f964..59e6f28804a 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -35,7 +35,6 @@
#include "DNA_customdata_types.h"
#include "DNA_listBase.h"
-struct Bone;
struct Image;
/*tessellation face, see MLoop/MPoly for the real face data*/
@@ -90,6 +89,104 @@ typedef struct MLoop {
unsigned int e; /* edge index */
} MLoop;
+/**
+ * #MLoopTri's are lightweight triangulation data, for functionality that doesn't support ngons (#MPoly).
+ * This is cache data created from (#MPoly, #MLoop & #MVert arrays).
+ * There is no attempt to maintain this data's validity over time, any changes to the underlying mesh
+ * invalidate the #MLoopTri array, which will need to be re-calculated.
+ *
+ * Users normally access this via #DerivedMesh.getLoopTriArray.
+ * In rare cases its calculated directly, with #BKE_mesh_recalc_looptri.
+ *
+ * Typical usage includes:
+ * - OpenGL drawing.
+ * - #BVHTree creation.
+ * - Physics/collision detection.
+ *
+ * Storing loop indices (instead of vertex indices) allows us to
+ * directly access UV's, vertex-colors as well as vertices.
+ * The index of the source polygon is stored as well, giving access to materials and polygon normals.
+ *
+ * \note This data is runtime only, never written to disk.
+ *
+ * Usage examples:
+ * \code{.c}
+ * // access original material.
+ * short mat_nr = mpoly[lt->poly].mat_nr;
+ *
+ * // access vertex locations.
+ * float *vtri_co[3] = {
+ * mvert[mloop[lt->tri[0]].v].co,
+ * mvert[mloop[lt->tri[1]].v].co,
+ * mvert[mloop[lt->tri[2]].v].co,
+ * };
+ *
+ * // access UV coordinates (works for all loop data, vertex colors... etc).
+ * float *uvtri_co[3] = {
+ * mloopuv[lt->tri[0]].uv,
+ * mloopuv[lt->tri[1]].uv,
+ * mloopuv[lt->tri[2]].uv,
+ * };
+ * \endcode
+ *
+ * #MLoopTri's are allocated in an array, where each polygon's #MLoopTri's are stored contiguously,
+ * the number of triangles for each polygon is guaranteed to be (#MPoly.totloop - 2),
+ * even for degenerate geometry. See #ME_POLY_TRI_TOT macro.
+ *
+ * It's also possible to perform a reverse lookup (find all #MLoopTri's for any given #MPoly).
+ *
+ * \code{.c}
+ * // loop over all looptri's for a given polygon: i
+ * MPoly *mp = &mpoly[i];
+ * MLoopTri *lt = &looptri[poly_to_tri_count(i, mp->loopstart)];
+ * int j, lt_tot = ME_POLY_TRI_TOT(mp);
+ *
+ * for (j = 0; j < lt_tot; j++, lt++) {
+ * unsigned int vtri[3] = {
+ * mloop[lt->tri[0]].v,
+ * mloop[lt->tri[1]].v,
+ * mloop[lt->tri[2]].v,
+ * };
+ * printf("tri %u %u %u\n", vtri[0], vtri[1], vtri[2]);
+ * };
+ * \endcode
+ *
+ * It may also be useful to check whether or not two vertices of a triangle form an edge in the underlying mesh.
+ *
+ * This can be done by checking the edge of the referenced loop (#MLoop.e),
+ * the winding of the #MLoopTri and the #MLoop's will always match,
+ * however the order of vertices in the edge is undefined.
+ *
+ * \code{.c}
+ * // print real edges from an MLoopTri: lt
+ * int j, j_next;
+ * for (j = 2, j_next = 0; j_next < 3; j = j_next++) {
+ * MEdge *ed = &medge[mloop[lt->tri[j]].e];
+ * unsigned int tri_edge[2] = {mloop[lt->tri[j]].v, mloop[lt->tri[j_next]].v};
+ *
+ * if (ELEM(ed->v1, tri_edge[0], tri_edge[1]) &&
+ * ELEM(ed->v2, tri_edge[0], tri_edge[1]))
+ * {
+ * printf("real edge found %u %u\n", tri_edge[0], tri_edge[1]);
+ * }
+ * }
+ * \endcode
+ *
+ * \note A #MLoopTri may be in the middle of an ngon and not reference **any** edges.
+ */
+#
+#
+typedef struct MLoopTri {
+ unsigned int tri[3];
+ unsigned int poly;
+} MLoopTri;
+#
+#
+typedef struct MVertTri {
+ unsigned int tri[3];
+} MVertTri;
+
+
typedef struct MTexPoly {
struct Image *tpage;
char flag, transp;
@@ -216,7 +313,6 @@ typedef struct MultiresEdge {
unsigned int mid;
} MultiresEdge;
-struct MultiresMapNode;
typedef struct MultiresLevel {
struct MultiresLevel *next, *prev;
@@ -347,6 +443,19 @@ enum {
#define ME_POLY_LOOP_PREV(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + (mp)->totloop - 1) % (mp)->totloop)])
#define ME_POLY_LOOP_NEXT(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + 1) % (mp)->totloop)])
+/* number of tri's that make up this polygon once tessellated */
+#define ME_POLY_TRI_TOT(mp) ((mp)->totloop - 2)
+
+/**
+ * Check out-of-bounds material, note that this is nearly always prevented,
+ * yet its still possible in rare cases.
+ * So usage such as array lookup needs to check.
+ */
+#define ME_MAT_NR_TEST(mat_nr, totmat) \
+ (CHECK_TYPE_ANY(mat_nr, short, const short), \
+ CHECK_TYPE_ANY(totmat, short, const short), \
+ (LIKELY(mat_nr < totmat) ? mat_nr : 0))
+
/* mselect->type */
enum {
ME_VSEL = 0,
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 47782bb3ae1..67ec9fe3db3 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -82,6 +82,9 @@ typedef enum ModifierType {
eModifierType_MeshCache = 46,
eModifierType_LaplacianDeform = 47,
eModifierType_Wireframe = 48,
+ eModifierType_DataTransfer = 49,
+ eModifierType_NormalEdit = 50,
+ eModifierType_CorrectiveSmooth = 51,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -131,6 +134,7 @@ typedef struct SubsurfModifierData {
ModifierData modifier;
short subdivType, levels, renderLevels, flags;
+ short use_opensubdiv, pad[3];
void *emCache, *mCache;
} SubsurfModifierData;
@@ -335,6 +339,7 @@ enum {
/* MOD_BEVEL_EVEN = (1 << 11), */
/* MOD_BEVEL_DIST = (1 << 12), */ /* same as above */
MOD_BEVEL_OVERLAP_OK = (1 << 13),
+ MOD_BEVEL_EVEN_WIDTHS = (1 << 14),
};
/* BevelModifierData->val_flags (not used as flags any more) */
@@ -387,6 +392,7 @@ enum {
MOD_DISP_DIR_Z = 2,
MOD_DISP_DIR_NOR = 3,
MOD_DISP_DIR_RGB_XYZ = 4,
+ MOD_DISP_DIR_CLNOR = 5,
};
/* DisplaceModifierData->texmapping */
@@ -428,10 +434,11 @@ typedef struct DecimateModifierData {
float angle; /* (mode == MOD_DECIM_MODE_DISSOLVE) */
char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ float defgrp_factor;
short flag, mode;
/* runtime only */
- int face_count, pad2;
+ int face_count;
} DecimateModifierData;
enum {
@@ -534,16 +541,39 @@ typedef struct ArmatureModifierData {
char defgrp_name[64]; /* MAX_VGROUP_NAME */
} ArmatureModifierData;
+enum {
+ MOD_HOOK_UNIFORM_SPACE = (1 << 0),
+};
+
+/* same as WarpModifierFalloff */
+typedef enum {
+ eHook_Falloff_None = 0,
+ eHook_Falloff_Curve = 1,
+ eHook_Falloff_Sharp = 2, /* PROP_SHARP */
+ eHook_Falloff_Smooth = 3, /* PROP_SMOOTH */
+ eHook_Falloff_Root = 4, /* PROP_ROOT */
+ eHook_Falloff_Linear = 5, /* PROP_LIN */
+ eHook_Falloff_Const = 6, /* PROP_CONST */
+ eHook_Falloff_Sphere = 7, /* PROP_SPHERE */
+ eHook_Falloff_InvSquare = 8, /* PROP_INVSQUARE */
+ /* PROP_RANDOM not used */
+} HookModifierFalloff;
+
typedef struct HookModifierData {
ModifierData modifier;
struct Object *object;
char subtarget[64]; /* optional name of bone target, MAX_ID_NAME-2 */
+ char flag;
+ char falloff_type; /* use enums from WarpModifier (exact same functionality) */
+ char pad[6];
float parentinv[4][4]; /* matrix making current transform unmodified */
float cent[3]; /* visualization of hook */
float falloff; /* if not zero, falloff is distance where influence zero */
+ struct CurveMapping *curfalloff;
+
int *indexar; /* if NULL, it's using vertexgroup */
int totindex;
float force;
@@ -563,6 +593,15 @@ typedef struct ClothModifierData {
struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
struct PointCache *point_cache; /* definition is in DNA_object_force.h */
struct ListBase ptcaches;
+ /* XXX nasty hack, remove once hair can be separated from cloth modifier data */
+ struct ClothHairData *hairdata;
+ /* grid geometry values of hair continuum */
+ float hair_grid_min[3];
+ float hair_grid_max[3];
+ int hair_grid_res[3];
+ float hair_grid_cellsize;
+
+ struct ClothSolverResult *solver_result;
} ClothModifierData;
typedef struct CollisionModifierData {
@@ -575,10 +614,10 @@ typedef struct CollisionModifierData {
struct MVert *current_x; /* position at the actual inter-frame step */
struct MVert *current_v; /* (xnew - x) at the actual inter-frame step */
- struct MFace *mfaces; /* object face data */
+ struct MVertTri *tri;
- unsigned int numverts;
- unsigned int numfaces;
+ unsigned int mvert_num;
+ unsigned int tri_num;
float time_x, time_xnew; /* cfra time of modifier */
struct BVHTree *bvhtree; /* bounding volume hierarchy for this cloth object */
} CollisionModifierData;
@@ -838,15 +877,13 @@ enum {
MOD_SOLIDIFY_EVEN = (1 << 1),
MOD_SOLIDIFY_NORMAL_CALC = (1 << 2),
MOD_SOLIDIFY_VGROUP_INV = (1 << 3),
+#ifdef DNA_DEPRECATED
MOD_SOLIDIFY_RIM_MATERIAL = (1 << 4), /* deprecated, used in do_versions */
+#endif
MOD_SOLIDIFY_FLIP = (1 << 5),
MOD_SOLIDIFY_NOSHELL = (1 << 6),
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison MOD_SOLIDIFY_RIM_MATERIAL
-#endif
-
typedef struct ScrewModifierData {
ModifierData modifier;
@@ -968,6 +1005,7 @@ typedef enum {
eWarp_Falloff_Linear = 5, /* PROP_LIN */
eWarp_Falloff_Const = 6, /* PROP_CONST */
eWarp_Falloff_Sphere = 7, /* PROP_SPHERE */
+ eWarp_Falloff_InvSquare = 8, /* PROP_INVSQUARE */
/* PROP_RANDOM not used */
} WarpModifierFalloff;
@@ -1214,12 +1252,10 @@ typedef struct TriangulateModifierData {
int pad;
} TriangulateModifierData;
+#ifdef DNA_DEPRECATED
enum {
MOD_TRIANGULATE_BEAUTY = (1 << 0), /* deprecated */
};
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison MOD_TRIANGULATE_BEAUTY
#endif
/* Triangulate methods - NGons */
@@ -1253,6 +1289,48 @@ enum {
MOD_LAPLACIANSMOOTH_NORMALIZED = (1 << 5),
};
+
+typedef struct CorrectiveSmoothModifierData {
+ ModifierData modifier;
+
+ /* positions set during 'bind' operator
+ * use for MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND */
+ float (*bind_coords)[3];
+
+ /* note: -1 is used to bind */
+ unsigned int bind_coords_num;
+
+ float lambda;
+ short repeat, flag;
+ char smooth_type, rest_source;
+ char pad[2];
+
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
+
+ /* runtime-only cache (delta's between),
+ * delta's between the original positions and the smoothed positions */
+ float (*delta_cache)[3];
+ unsigned int delta_cache_num;
+ char pad2[4];
+} CorrectiveSmoothModifierData;
+
+enum {
+ MOD_CORRECTIVESMOOTH_SMOOTH_SIMPLE = 0,
+ MOD_CORRECTIVESMOOTH_SMOOTH_LENGTH_WEIGHT = 1,
+};
+
+enum {
+ MOD_CORRECTIVESMOOTH_RESTSOURCE_ORCO = 0,
+ MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND = 1,
+};
+
+/* Corrective Smooth modifier flags */
+enum {
+ MOD_CORRECTIVESMOOTH_INVERT_VGROUP = (1 << 0),
+ MOD_CORRECTIVESMOOTH_ONLY_SMOOTH = (1 << 1),
+ MOD_CORRECTIVESMOOTH_PIN_BOUNDARY = (1 << 2),
+};
+
typedef struct UVWarpModifierData {
ModifierData modifier;
@@ -1367,5 +1445,79 @@ enum {
};
+typedef struct DataTransferModifierData {
+ ModifierData modifier;
+
+ struct Object *ob_source;
+
+ int data_types; /* See DT_TYPE_ enum in ED_object.h */
+
+ /* See MREMAP_MODE_ enum in BKE_mesh_mapping.h */
+ int vmap_mode;
+ int emap_mode;
+ int lmap_mode;
+ int pmap_mode;
+
+ float map_max_distance;
+ float map_ray_radius;
+ float islands_precision;
+
+ int pad_i1;
+
+ int layers_select_src[4]; /* DT_MULTILAYER_INDEX_MAX; See DT_FROMLAYERS_ enum in ED_object.h */
+ int layers_select_dst[4]; /* DT_MULTILAYER_INDEX_MAX; See DT_TOLAYERS_ enum in ED_object.h */
+
+ int mix_mode; /* See CDT_MIX_ enum in BKE_customdata.h */
+ float mix_factor;
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
+
+ int flags;
+} DataTransferModifierData;
+
+/* DataTransferModifierData.flags */
+enum {
+ MOD_DATATRANSFER_OBSRC_TRANSFORM = 1 << 0,
+ MOD_DATATRANSFER_MAP_MAXDIST = 1 << 1,
+ MOD_DATATRANSFER_INVERT_VGROUP = 1 << 2,
+
+ /* Only for UI really. */
+ MOD_DATATRANSFER_USE_VERT = 1 << 28,
+ MOD_DATATRANSFER_USE_EDGE = 1 << 29,
+ MOD_DATATRANSFER_USE_LOOP = 1 << 30,
+ MOD_DATATRANSFER_USE_POLY = 1 << 31,
+};
+
+/* Set Split Normals modifier */
+typedef struct NormalEditModifierData {
+ ModifierData modifier;
+ char defgrp_name[64]; /* MAX_VGROUP_NAME */
+ struct Object *target; /* Source of normals, or center of ellipsoid. */
+ short mode;
+ short flag;
+ short mix_mode;
+ char pad[2];
+ float mix_factor;
+ float offset[3];
+} NormalEditModifierData;
+
+/* NormalEditModifierData.mode */
+enum {
+ MOD_NORMALEDIT_MODE_RADIAL = 0,
+ MOD_NORMALEDIT_MODE_DIRECTIONAL = 1,
+};
+
+/* NormalEditModifierData.flags */
+enum {
+ MOD_NORMALEDIT_INVERT_VGROUP = (1 << 0),
+ MOD_NORMALEDIT_USE_DIRECTION_PARALLEL = (1 << 1),
+};
+
+/* NormalEditModifierData.mix_mode */
+enum {
+ MOD_NORMALEDIT_MIX_COPY = 0,
+ MOD_NORMALEDIT_MIX_ADD = 1,
+ MOD_NORMALEDIT_MIX_SUB = 2,
+ MOD_NORMALEDIT_MIX_MUL = 3,
+};
#endif /* __DNA_MODIFIER_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index e0d25e763d4..32f766ecae5 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -40,7 +40,6 @@
struct ID;
struct ListBase;
-struct SpaceNode;
struct bNodeLink;
struct bNodeType;
struct bNodeTreeExec;
@@ -192,6 +191,8 @@ typedef struct bNode {
float width, height; /* node custom width and height */
float miniwidth; /* node width if hidden */
float offsetx, offsety; /* additional offset from loc */
+ float anim_init_locx; /* initial locx for insert offset animation */
+ float anim_ofsx; /* offset that will be added to locx for insert offset animation */
int update; /* update flags */
@@ -264,12 +265,12 @@ typedef struct bNode {
*/
#define NODE_UPDATE 0xFFFF /* generic update flag (includes all others) */
#define NODE_UPDATE_ID 1 /* associated id data block has changed */
+#define NODE_UPDATE_OPERATOR 2 /* node update triggered from update operator */
/* Unique hash key for identifying node instances
* Defined as a struct because DNA does not support other typedefs.
*/
-typedef struct bNodeInstanceKey
-{
+typedef struct bNodeInstanceKey {
unsigned int value;
} bNodeInstanceKey;
@@ -383,10 +384,12 @@ typedef struct bNodeTree {
/* callbacks */
void (*progress)(void *, float progress);
- void (*stats_draw)(void *, char *str);
+ void (*stats_draw)(void *, const char *str);
int (*test_break)(void *);
void (*update_draw)(void *);
void *tbh, *prh, *sdh, *udh;
+
+ void *duplilock;
} bNodeTree;
@@ -726,6 +729,8 @@ typedef struct NodeTexImage {
int projection;
float projection_blend;
int interpolation;
+ int extension;
+ int pad;
} NodeTexImage;
typedef struct NodeTexChecker {
@@ -789,6 +794,18 @@ typedef struct NodeShaderVectTransform {
int pad;
} NodeShaderVectTransform;
+typedef struct NodeShaderTexPointDensity {
+ NodeTexBase base;
+ short point_source, pad;
+ int particle_system;
+ float radius;
+ int resolution;
+ short space;
+ short interpolation;
+ short color_source;
+ short pad2;
+} NodeShaderTexPointDensity;
+
/* TEX_output */
typedef struct TexNodeOutput {
char name[64];
@@ -825,6 +842,10 @@ typedef struct NodeTranslateData {
typedef struct NodePlaneTrackDeformData {
char tracking_object[64];
char plane_track_name[64];
+ char flag;
+ char motion_blur_samples;
+ char pad[2];
+ float motion_blur_shutter;
} NodePlaneTrackDeformData;
typedef struct NodeShaderScript {
@@ -959,9 +980,15 @@ typedef struct NodeSunBeams {
#define SHD_PROJ_EQUIRECTANGULAR 0
#define SHD_PROJ_MIRROR_BALL 1
+#define SHD_IMAGE_EXTENSION_REPEAT 0
+#define SHD_IMAGE_EXTENSION_EXTEND 1
+#define SHD_IMAGE_EXTENSION_CLIP 2
+
/* image texture */
#define SHD_PROJ_FLAT 0
#define SHD_PROJ_BOX 1
+#define SHD_PROJ_SPHERE 2
+#define SHD_PROJ_TUBE 3
/* image texture interpolation */
#define SHD_INTERP_LINEAR 0
@@ -985,17 +1012,45 @@ typedef struct NodeSunBeams {
#define SHD_NORMAL_MAP_BLENDER_OBJECT 3
#define SHD_NORMAL_MAP_BLENDER_WORLD 4
+/* math node clamp */
+#define SHD_MATH_CLAMP 1
+
+/* Math node operation/ */
+enum {
+ NODE_MATH_ADD = 0,
+ NODE_MATH_SUB = 1,
+ NODE_MATH_MUL = 2,
+ NODE_MATH_DIVIDE = 3,
+ NODE_MATH_SIN = 4,
+ NODE_MATH_COS = 5,
+ NODE_MATH_TAN = 6,
+ NODE_MATH_ASIN = 7,
+ NODE_MATH_ACOS = 8,
+ NODE_MATH_ATAN = 9,
+ NODE_MATH_POW = 10,
+ NODE_MATH_LOG = 11,
+ NODE_MATH_MIN = 12,
+ NODE_MATH_MAX = 13,
+ NODE_MATH_ROUND = 14,
+ NODE_MATH_LESS = 15,
+ NODE_MATH_GREATER = 16,
+ NODE_MATH_MOD = 17,
+ NODE_MATH_ABS = 18,
+};
+
+/* mix rgb node flags */
+#define SHD_MIXRGB_USE_ALPHA 1
+#define SHD_MIXRGB_CLAMP 2
+
/* subsurface */
enum {
+#ifdef DNA_DEPRECATED
SHD_SUBSURFACE_COMPATIBLE = 0, // Deprecated
+#endif
SHD_SUBSURFACE_CUBIC = 1,
SHD_SUBSURFACE_GAUSSIAN = 2,
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison SHD_SUBSURFACE_COMPATIBLE
-#endif
-
/* blur node */
#define CMP_NODE_BLUR_ASPECT_NONE 0
#define CMP_NODE_BLUR_ASPECT_Y 1
@@ -1048,4 +1103,29 @@ enum {
/* viewer and cmposite output */
#define CMP_NODE_OUTPUT_IGNORE_ALPHA 1
+/* Plane track deform node */
+enum {
+ CMP_NODEFLAG_PLANETRACKDEFORM_MOTION_BLUR = 1,
+};
+
+#define CMP_NODE_PLANETRACKDEFORM_MBLUR_SAMPLES_MAX 64
+
+/* Point Density shader node */
+
+enum {
+ SHD_POINTDENSITY_SOURCE_PSYS = 0,
+ SHD_POINTDENSITY_SOURCE_OBJECT = 1,
+};
+
+enum {
+ SHD_POINTDENSITY_SPACE_OBJECT = 0,
+ SHD_POINTDENSITY_SPACE_WORLD = 1,
+};
+
+enum {
+ SHD_POINTDENSITY_COLOR_PARTAGE = 1,
+ SHD_POINTDENSITY_COLOR_PARTSPEED = 2,
+ SHD_POINTDENSITY_COLOR_PARTVEL = 3,
+};
+
#endif
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 5cc56d861a3..c9c1f618e86 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -297,7 +297,7 @@ typedef struct SoftBody {
char namedVG_Softgoal[64]; /* MAX_VGROUP_NAME */
/* starting to fix old bug .. nastiness that VG are indexes
* rather find them by name tag to find it -> jow20090613 */
-
+
short fuzzyness; /* */
/* springs */
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 0bcc6bfd70e..faae78ab500 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -48,7 +48,6 @@ struct Ipo;
struct BoundBox;
struct Path;
struct Material;
-struct bConstraintChannel;
struct PartDeflect;
struct SoftBody;
struct FluidsimSettings;
@@ -109,7 +108,8 @@ typedef struct LodLevel {
struct LodLevel *next, *prev;
struct Object *source;
int flags;
- float distance;
+ float distance, pad;
+ int obhysteresis;
} LodLevel;
typedef struct Object {
@@ -183,16 +183,17 @@ typedef struct Object {
short transflag, protectflag; /* transformation settings and transform locks */
short trackflag, upflag;
short nlaflag; /* used for DopeSheet filtering settings (expanded/collapsed) */
- short ipoflag; // xxx deprecated... old animation system
short scaflag; /* ui state for game logic */
char scavisflag; /* more display settings for game logic */
char depsflag;
+ /* did last modifier stack generation need mapping support? */
+ char lastNeedMapping; /* bool */
+ char pad[5];
+
/* dupli-frame settings */
int dupon, dupoff, dupsta, dupend;
- int pad;
-
/* during realtime */
/* note that inertia is only called inertia for historical reasons
@@ -213,6 +214,8 @@ typedef struct Object {
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 */
@@ -292,6 +295,8 @@ typedef struct Object {
ListBase lodlevels; /* contains data for levels of detail */
LodLevel *currentlod;
+
+ struct PreviewImage *preview;
} Object;
/* Warning, this is not used anymore because hooks are now modifiers */
@@ -377,8 +382,10 @@ enum {
enum {
PARTYPE = (1 << 4) - 1,
PAROBJECT = 0,
- PARCURVE = 1,
- PARKEY = 2,
+#ifdef DNA_DEPRECATED
+ PARCURVE = 1, /* Deprecated. */
+#endif
+ PARKEY = 2, /* XXX Unused, deprecated? */
PARSKEL = 4,
PARVERT1 = 5,
@@ -397,7 +404,7 @@ enum {
OB_DUPLIVERTS = 1 << 4,
OB_DUPLIROT = 1 << 5,
OB_DUPLINOSPEED = 1 << 6,
-/* OB_POWERTRACK = 1 << 7,*/ /*UNUSED*/
+ OB_DUPLICALCDERIVED = 1 << 7, /* runtime, calculate derivedmesh for dupli before it's used */
OB_DUPLIGROUP = 1 << 8,
OB_DUPLIFACES = 1 << 9,
OB_DUPLIFACES_SCALE = 1 << 10,
@@ -409,13 +416,6 @@ enum {
OB_DUPLI = OB_DUPLIFRAMES | OB_DUPLIVERTS | OB_DUPLIGROUP | OB_DUPLIFACES | OB_DUPLIPARTS,
};
-/* (short) ipoflag */
-/* XXX: many old flags for features removed due to incompatibility
- * with new system and/or other design issues were here
- */
- /* for stride/path editing (XXX: NEEDS REVIEW) */
-#define OB_DISABLE_PATH (1 << 10)
-
/* (short) trackflag / upflag */
enum {
OB_POSX = 0,
@@ -484,6 +484,7 @@ enum {
enum {
OB_LOD_USE_MESH = 1 << 0,
OB_LOD_USE_MAT = 1 << 1,
+ OB_LOD_USE_HYST = 1 << 2,
};
@@ -510,7 +511,7 @@ enum {
#define OB_FROMDUPLI (1 << 9)
-#define OB_DONE (1 << 10)
+#define OB_DONE (1 << 10) /* unknown state, clear before use */
/* #define OB_RADIO (1 << 11) */ /* deprecated */
#define OB_FROMGROUP (1 << 12)
@@ -529,7 +530,7 @@ enum {
#define OB_MAX_STATES 30
/* collision masks */
-#define OB_MAX_COL_MASKS 8
+#define OB_MAX_COL_MASKS 16
/* ob->gameflag */
enum {
diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h
index 53061b55e2d..984e3334414 100644
--- a/source/blender/makesdna/DNA_outliner_types.h
+++ b/source/blender/makesdna/DNA_outliner_types.h
@@ -56,7 +56,55 @@ typedef struct TreeStore {
#define TSE_CHILDSEARCH 8
#define TSE_SEARCHMATCH 16
-/* TreeStoreElem types in BIF_outliner.h */
+/* TreeStoreElem->types */
+#define TSE_NLA 1 /* NO ID */
+#define TSE_NLA_ACTION 2
+#define TSE_DEFGROUP_BASE 3
+#define TSE_DEFGROUP 4
+#define TSE_BONE 5
+#define TSE_EBONE 6
+#define TSE_CONSTRAINT_BASE 7
+#define TSE_CONSTRAINT 8
+#define TSE_MODIFIER_BASE 9
+#define TSE_MODIFIER 10
+#define TSE_LINKED_OB 11
+/* #define TSE_SCRIPT_BASE 12 */ /* UNUSED */
+#define TSE_POSE_BASE 13
+#define TSE_POSE_CHANNEL 14
+#define TSE_ANIM_DATA 15
+#define TSE_DRIVER_BASE 16 /* NO ID */
+/* #define TSE_DRIVER 17 */ /* UNUSED */
+
+#define TSE_PROXY 18
+#define TSE_R_LAYER_BASE 19
+#define TSE_R_LAYER 20
+#define TSE_R_PASS 21
+#define TSE_LINKED_MAT 22
+/* NOTE, is used for light group */
+#define TSE_LINKED_LAMP 23
+#define TSE_POSEGRP_BASE 24
+#define TSE_POSEGRP 25
+#define TSE_SEQUENCE 26 /* NO ID */
+#define TSE_SEQ_STRIP 27 /* NO ID */
+#define TSE_SEQUENCE_DUP 28 /* NO ID */
+#define TSE_LINKED_PSYS 29
+#define TSE_RNA_STRUCT 30 /* NO ID */
+#define TSE_RNA_PROPERTY 31 /* NO ID */
+#define TSE_RNA_ARRAY_ELEM 32 /* NO ID */
+#define TSE_NLA_TRACK 33 /* NO ID */
+#define TSE_KEYMAP 34 /* NO ID */
+#define TSE_KEYMAP_ITEM 35 /* NO ID */
+#define TSE_ID_BASE 36 /* NO ID */
+#define TSE_GP_LAYER 37 /* NO ID */
+
+
+/* Check whether given TreeStoreElem should have a real ID in its ->id member. */
+#define TSE_IS_REAL_ID(_tse) \
+ (!ELEM((_tse)->type, TSE_NLA, TSE_NLA_TRACK, TSE_DRIVER_BASE, \
+ TSE_SEQUENCE, TSE_SEQ_STRIP, TSE_SEQUENCE_DUP, \
+ TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM, \
+ TSE_KEYMAP, TSE_KEYMAP_ITEM, TSE_ID_BASE, TSE_GP_LAYER))
+
#endif
diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h
index ef0a0f642d6..56140c84cb1 100644
--- a/source/blender/makesdna/DNA_packedFile_types.h
+++ b/source/blender/makesdna/DNA_packedFile_types.h
@@ -40,8 +40,7 @@ typedef struct PackedFile {
void *data;
} PackedFile;
-enum PF_FileStatus
-{
+enum PF_FileStatus {
PF_EQUAL = 0,
PF_DIFFERS = 1,
PF_NOFILE = 2,
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index a2a724b6a32..95cb5c84bed 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -44,6 +44,7 @@ typedef struct HairKey {
float weight; /* softbody weight */
short editflag; /* saved particled edit mode flags */
short pad;
+ float world_co[3];
} HairKey;
typedef struct ParticleKey { /* when changed update size of struct to copy_particleKey()!! */
@@ -207,6 +208,8 @@ typedef struct ParticleSettings {
/* length */
float randlength;
/* children */
+ int child_flag;
+ int pad3;
int child_nbr, ren_child_nbr;
float parents, childsize, childrandsize;
float childrad, childflat;
@@ -215,6 +218,8 @@ typedef struct ParticleSettings {
/* kink */
float kink_amp, kink_freq, kink_shape, kink_flat;
float kink_amp_clump;
+ int kink_extra_steps, pad4;
+ float kink_axis_random, kink_amp_random;
/* rough */
float rough1, rough1_size;
float rough2, rough2_size, rough2_thres;
@@ -232,6 +237,12 @@ typedef struct ParticleSettings {
int trail_count;
/* keyed particles */
int keyed_loops;
+ struct CurveMapping *clumpcurve;
+ struct CurveMapping *roughcurve;
+ float clump_noise_size;
+
+ /* hair dynamics */
+ float bending_random;
struct MTex *mtex[18]; /* MAX_MTEX */
@@ -246,7 +257,7 @@ typedef struct ParticleSettings {
/* modified dm support */
short use_modifier_stack;
- short pad[3];
+ short pad5[3];
} ParticleSettings;
@@ -293,7 +304,7 @@ typedef struct ParticleSystem {
short vgroup[12], vg_neg, rt3; /* vertex groups, 0==disable, 1==starting index */
/* temporary storage during render */
- void *renderdata;
+ struct ParticleRenderData *renderdata;
/* point cache */
struct PointCache *pointcache;
@@ -313,6 +324,29 @@ typedef struct ParticleSystem {
float _pad; /* spare capacity */
} ParticleSystem;
+typedef enum eParticleDrawFlag {
+ PART_DRAW_VEL = (1 << 0),
+ PART_DRAW_GLOBAL_OB = (1 << 1),
+ PART_DRAW_SIZE = (1 << 2),
+ PART_DRAW_EMITTER = (1 << 3), /* render emitter also */
+ PART_DRAW_HEALTH = (1 << 4),
+ PART_ABS_PATH_TIME = (1 << 5),
+ PART_DRAW_COUNT_GR = (1 << 6),
+ PART_DRAW_BB_LOCK = (1 << 7), /* used with billboards */
+ PART_DRAW_ROTATE_OB = (1 << 7), /* used with dupliobjects/groups */
+ PART_DRAW_PARENT = (1 << 8),
+ PART_DRAW_NUM = (1 << 9),
+ PART_DRAW_RAND_GR = (1 << 10),
+ PART_DRAW_REN_ADAPT = (1 << 11),
+ PART_DRAW_VEL_LENGTH = (1 << 12),
+ PART_DRAW_MAT_COL = (1 << 13), /* deprecated, but used in do_versions */
+ PART_DRAW_WHOLE_GR = (1 << 14),
+ PART_DRAW_REN_STRAND = (1 << 15),
+ PART_DRAW_NO_SCALE_OB = (1 << 16), /* used with dupliobjects/groups */
+ PART_DRAW_GUIDE_HAIRS = (1 << 17),
+ PART_DRAW_HAIR_GRID = (1 << 18),
+} eParticleDrawFlag;
+
/* part->type */
/* hair is allways baked static in object/geometry space */
/* other types (normal particles) are in global space and not static baked */
@@ -385,31 +419,21 @@ typedef struct ParticleSystem {
#define PART_PHYS_FLUID 4
/* part->kink */
-#define PART_KINK_NO 0
-#define PART_KINK_CURL 1
-#define PART_KINK_RADIAL 2
-#define PART_KINK_WAVE 3
-#define PART_KINK_BRAID 4
-
-/* part->draw */
-#define PART_DRAW_VEL 1
-#define PART_DRAW_GLOBAL_OB 2
-#define PART_DRAW_SIZE 4
-#define PART_DRAW_EMITTER 8 /* render emitter also */
-#define PART_DRAW_HEALTH 16
-#define PART_ABS_PATH_TIME 32
-#define PART_DRAW_COUNT_GR 64
-#define PART_DRAW_BB_LOCK 128 /* used with billboards */
-#define PART_DRAW_ROTATE_OB 128 /* used with dupliobjects/groups */
-#define PART_DRAW_PARENT 256
-#define PART_DRAW_NUM 512
-#define PART_DRAW_RAND_GR 1024
-#define PART_DRAW_REN_ADAPT 2048
-#define PART_DRAW_VEL_LENGTH (1<<12)
-#define PART_DRAW_MAT_COL (1<<13) /* deprecated, but used in do_versions */
-#define PART_DRAW_WHOLE_GR (1<<14)
-#define PART_DRAW_REN_STRAND (1<<15)
-#define PART_DRAW_NO_SCALE_OB (1<<16) /* used with dupliobjects/groups */
+typedef enum eParticleKink {
+ PART_KINK_NO = 0,
+ PART_KINK_CURL = 1,
+ PART_KINK_RADIAL = 2,
+ PART_KINK_WAVE = 3,
+ PART_KINK_BRAID = 4,
+ PART_KINK_SPIRAL = 5,
+} eParticleKink;
+
+/* part->child_flag */
+typedef enum eParticleChildFlag {
+ PART_CHILD_USE_CLUMP_NOISE = (1<<0),
+ PART_CHILD_USE_CLUMP_CURVE = (1<<1),
+ PART_CHILD_USE_ROUGH_CURVE = (1<<2),
+} eParticleChildFlag;
/* part->draw_col */
#define PART_DRAW_COL_NONE 0
@@ -561,24 +585,27 @@ typedef struct ParticleSystem {
#define PTARGET_MODE_ENEMY 2
/* mapto */
-/* init */
-#define PAMAP_INIT (PAMAP_TIME | PAMAP_LIFE | PAMAP_DENS | PAMAP_SIZE)
-#define PAMAP_TIME (1<<0) /* emission time */
-#define PAMAP_LIFE (1<<1) /* life time */
-#define PAMAP_DENS (1<<2) /* density */
-#define PAMAP_SIZE (1<<3) /* physical size */
-/* reset */
-#define PAMAP_IVEL (1<<5) /* initial velocity */
-/* physics */
-#define PAMAP_PHYSICS (PAMAP_FIELD | PAMAP_GRAVITY | PAMAP_DAMP)
-#define PAMAP_FIELD (1<<6) /* force fields */
-#define PAMAP_GRAVITY (1<<10)
-#define PAMAP_DAMP (1<<11)
-/* children */
-#define PAMAP_CHILD (PAMAP_CLUMP | PAMAP_KINK | PAMAP_ROUGH | PAMAP_LENGTH)
-#define PAMAP_CLUMP (1<<7)
-#define PAMAP_KINK (1<<8)
-#define PAMAP_ROUGH (1<<9)
-#define PAMAP_LENGTH (1<<4)
+typedef enum eParticleTextureInfluence {
+ /* init */
+ PAMAP_TIME = (1<<0), /* emission time */
+ PAMAP_LIFE = (1<<1), /* life time */
+ PAMAP_DENS = (1<<2), /* density */
+ PAMAP_SIZE = (1<<3), /* physical size */
+ PAMAP_INIT = (PAMAP_TIME | PAMAP_LIFE | PAMAP_DENS | PAMAP_SIZE),
+ /* reset */
+ PAMAP_IVEL = (1<<5), /* initial velocity */
+ /* physics */
+ PAMAP_FIELD = (1<<6), /* force fields */
+ PAMAP_GRAVITY = (1<<10),
+ PAMAP_DAMP = (1<<11),
+ PAMAP_PHYSICS = (PAMAP_FIELD | PAMAP_GRAVITY | PAMAP_DAMP),
+ /* children */
+ PAMAP_CLUMP = (1<<7),
+ PAMAP_KINK_FREQ = (1<<8),
+ PAMAP_KINK_AMP = (1<<12),
+ PAMAP_ROUGH = (1<<9),
+ PAMAP_LENGTH = (1<<4),
+ PAMAP_CHILD = (PAMAP_CLUMP | PAMAP_KINK_FREQ | PAMAP_KINK_AMP | PAMAP_ROUGH | PAMAP_LENGTH),
+} eParticleTextureInfluence;
#endif
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index c8b8e4d52a4..f9cea3871f6 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -46,7 +46,10 @@ extern "C" {
#include "DNA_listBase.h"
#include "DNA_ID.h"
#include "DNA_freestyle_types.h"
+#include "DNA_gpu_types.h"
+#include "DNA_userdef_types.h"
+struct CurveMapping;
struct Object;
struct Brush;
struct World;
@@ -242,10 +245,78 @@ typedef enum ScenePassType {
SCE_PASS_SUBSURFACE_DIRECT = (1 << 28),
SCE_PASS_SUBSURFACE_INDIRECT = (1 << 29),
SCE_PASS_SUBSURFACE_COLOR = (1 << 30),
+ SCE_PASS_DEBUG = (1 << 31), /* This is a virtual pass. */
} ScenePassType;
/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
+/* View - MultiView */
+typedef struct SceneRenderView {
+ struct SceneRenderView *next, *prev;
+
+ char name[64]; /* MAX_NAME */
+ char suffix[64]; /* MAX_NAME */
+
+ int viewflag;
+ int pad[2];
+ char pad2[4];
+
+} SceneRenderView;
+
+/* srv->viewflag */
+#define SCE_VIEW_DISABLE (1<<0)
+
+/* scene.render.views_format */
+enum {
+ SCE_VIEWS_FORMAT_STEREO_3D = 0,
+ SCE_VIEWS_FORMAT_MULTIVIEW = 1,
+};
+
+/* ImageFormatData.views_output */
+enum {
+ R_IMF_VIEWS_INDIVIDUAL = 0,
+ R_IMF_VIEWS_STEREO_3D = 1,
+ R_IMF_VIEWS_MULTIVIEW = 2,
+};
+
+typedef struct Stereo3dFormat {
+ short flag;
+ char display_mode; /* encoding mode */
+ char anaglyph_type; /* anaglyph scheme for the user display */
+ char interlace_type; /* interlace type for the user display */
+ char pad[3];
+} Stereo3dFormat;
+
+/* Stereo3dFormat.display_mode */
+typedef enum eStereoDisplayMode {
+ S3D_DISPLAY_ANAGLYPH = 0,
+ S3D_DISPLAY_INTERLACE = 1,
+ S3D_DISPLAY_PAGEFLIP = 2,
+ S3D_DISPLAY_SIDEBYSIDE = 3,
+ S3D_DISPLAY_TOPBOTTOM = 4,
+} eStereoDisplayMode;
+
+/* Stereo3dFormat.flag */
+typedef enum eStereo3dFlag {
+ S3D_INTERLACE_SWAP = (1 << 0),
+ S3D_SIDEBYSIDE_CROSSEYED = (1 << 1),
+ S3D_SQUEEZED_FRAME = (1 << 2),
+} eStereo3dFlag;
+
+/* Stereo3dFormat.anaglyph_type */
+typedef enum eStereo3dAnaglyphType {
+ S3D_ANAGLYPH_REDCYAN = 0,
+ S3D_ANAGLYPH_GREENMAGENTA = 1,
+ S3D_ANAGLYPH_YELLOWBLUE = 2,
+} eStereo3dAnaglyphType;
+
+/* Stereo3dFormat.interlace_type */
+typedef enum eStereo3dInterlaceType {
+ S3D_INTERLACE_ROW = 0,
+ S3D_INTERLACE_COLUMN = 1,
+ S3D_INTERLACE_CHECKERBOARD = 2,
+} eStereo3dInterlaceType;
+
/* *************************************************************** */
/* Generic image format settings,
@@ -283,7 +354,11 @@ typedef struct ImageFormatData {
char jp2_flag;
char jp2_codec;
- char pad[6];
+ char pad[5];
+
+ /* Multiview */
+ char views_format;
+ Stereo3dFormat stereo3d_format;
/* color management */
ColorManagedViewSettings view_settings;
@@ -347,6 +422,12 @@ typedef struct ImageFormatData {
#define R_IMF_EXR_CODEC_ZIP 2
#define R_IMF_EXR_CODEC_PIZ 3
#define R_IMF_EXR_CODEC_RLE 4
+#define R_IMF_EXR_CODEC_ZIPS 5
+#define R_IMF_EXR_CODEC_B44 6
+#define R_IMF_EXR_CODEC_B44A 7
+#define R_IMF_EXR_CODEC_DWAA 8
+#define R_IMF_EXR_CODEC_DWAB 9
+#define R_IMF_EXR_CODEC_MAX 10
/* ImageFormatData.jp2_flag */
#define R_IMF_JP2_FLAG_YCC (1<<0) /* when disabled use RGB */ /* was R_JPEG2K_YCC */
@@ -576,8 +657,10 @@ typedef struct RenderData {
/* render simplify */
int simplify_flag;
short simplify_subsurf;
- short simplify_shadowsamples;
+ short simplify_subsurf_render;
+ short simplify_shadowsamples, pad9;
float simplify_particles;
+ float simplify_particles_render;
float simplify_aosss;
/* cineon */
@@ -606,7 +689,19 @@ typedef struct RenderData {
struct BakeData bake;
int preview_start_resolution;
- int pad;
+
+ /* Type of the debug pass to use.
+ * Only used when built with debug passes support.
+ */
+ short debug_pass_type;
+
+ short pad;
+
+ /* MultiView */
+ ListBase views;
+ short actview;
+ short views_format;
+ short pad8[2];
} RenderData;
/* *************************************************************** */
@@ -709,7 +804,12 @@ typedef struct GameData {
short obstacleSimulation;
short raster_storage;
float levelHeight;
- float deactivationtime, lineardeactthreshold, angulardeactthreshold, pad2;
+ float deactivationtime, lineardeactthreshold, angulardeactthreshold;
+
+ /* Scene LoD */
+ short lodflag, pad2;
+ int scehysteresis, pad5;
+
} GameData;
#define STEREO_NOSTEREO 1
@@ -773,14 +873,15 @@ typedef struct GameData {
/* GameData.matmode */
enum {
+#ifdef DNA_DEPRECATED
GAME_MAT_TEXFACE = 0, /* deprecated */
+#endif
GAME_MAT_MULTITEX = 1,
GAME_MAT_GLSL = 2,
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison GAME_MAT_TEXFACE
-#endif
+/* GameData.lodflag */
+#define SCE_LOD_USE_HYST (1 << 0)
/* UV Paint */
#define UV_SCULPT_LOCK_BORDERS 1
@@ -793,6 +894,19 @@ enum {
#define UV_SCULPT_TOOL_RELAX_LAPLACIAN 1
#define UV_SCULPT_TOOL_RELAX_HC 2
+/* Stereo Flags */
+#define STEREO_RIGHT_NAME "right"
+#define STEREO_LEFT_NAME "left"
+#define STEREO_RIGHT_SUFFIX "_R"
+#define STEREO_LEFT_SUFFIX "_L"
+
+typedef enum StereoViews {
+ STEREO_LEFT_ID = 0,
+ STEREO_RIGHT_ID = 1,
+ STEREO_3D_ID = 2,
+ STEREO_MONO_ID = 3,
+} StereoViews;
+
/* Markers */
typedef struct TimeMarker {
@@ -812,6 +926,7 @@ typedef struct TimeMarker {
typedef struct Paint {
struct Brush *brush;
struct Palette *palette;
+ struct CurveMapping *cavity_curve; /* cavity curve */
/* WM Paint cursor */
void *paint_cursor;
@@ -826,6 +941,9 @@ typedef struct Paint {
/* flags used for symmetry */
int symmetry_flags;
+
+ float tile_offset[3];
+ int pad2;
} Paint;
/* ------------------------------------------- */
@@ -835,7 +953,7 @@ typedef struct Paint {
typedef struct ImagePaintSettings {
Paint paint;
- short flag, pad;
+ short flag, missing_data;
/* for projection painting only */
short seam_bleed, normal_angle;
@@ -848,7 +966,7 @@ typedef struct ImagePaintSettings {
struct Image *clone; /* clone layer for image mode for projective texture painting */
struct Image *canvas; /* canvas when the explicit system is used for painting */
float stencil_col[3];
- float pad1;
+ float dither; /* dither amount used when painting on byte images */
} ImagePaintSettings;
/* ------------------------------------------- */
@@ -881,6 +999,7 @@ typedef struct ParticleEditSettings {
struct Scene *scene;
struct Object *object;
+ struct Object *shape_object;
} ParticleEditSettings;
/* ------------------------------------------- */
@@ -909,9 +1028,10 @@ typedef struct Sculpt {
/* scale for constant detail size */
float constant_detail;
+ float detail_percent;
+ float pad;
struct Object *gravity_object;
- void *pad2;
} Sculpt;
typedef struct UvSculpt {
@@ -984,25 +1104,36 @@ typedef struct UnifiedPaintSettings {
/* record movement of mouse so that rake can start at an intuitive angle */
float last_rake[2];
+ float last_rake_angle;
+
+ int last_stroke_valid;
+ float average_stroke_accum[3];
+ int average_stroke_counter;
+
float brush_rotation;
+ float brush_rotation_sec;
/*********************************************************************************
* all data below are used to communicate with cursor drawing and tex sampling *
*********************************************************************************/
- int draw_anchored;
int anchored_size;
- char draw_inverted;
- char pad3[7];
-
float overlap_factor; /* normalization factor due to accumulated value of curve along spacing.
* Calculated when brush spacing changes to dampen strength of stroke
* if space attenuation is used*/
+ char draw_inverted;
+ /* check is there an ongoing stroke right now */
+ char stroke_active;
+
+ char draw_anchored;
+ char do_linear_conversion;
+
float anchored_initial_mouse[2];
- /* check is there an ongoing stroke right now */
- int stroke_active;
+ /* radius of brush, premultiplied with pressure.
+ * In case of anchored brushes contains the anchored radius */
+ float pixel_radius;
/* drawing pressure */
float size_pressure_value;
@@ -1014,13 +1145,7 @@ typedef struct UnifiedPaintSettings {
float mask_tex_mouse[2];
/* ColorSpace cache to avoid locking up during sampling */
- int do_linear_conversion;
struct ColorSpace *colorspace;
-
- /* radius of brush, premultiplied with pressure.
- * In case of anchored brushes contains the anchored radius */
- float pixel_radius;
- int pad4;
} UnifiedPaintSettings;
typedef enum {
@@ -1092,9 +1217,10 @@ typedef struct ToolSettings {
short autoik_chainlen; /* runtime only */
/* Grease Pencil */
- char gpencil_flags;
+ char gpencil_flags; /* flags/options for how the tool works */
+ char gpencil_src; /* for main 3D view Grease Pencil, where data comes from */
- char pad[5];
+ char pad[4];
/* Image Paint (8 byttse aligned please!) */
struct ImagePaintSettings imapaint;
@@ -1153,7 +1279,11 @@ typedef struct ToolSettings {
short snap_flag, snap_target;
short proportional, prop_mode;
char proportional_objects; /* proportional edit, object mode */
- char proportional_mask; /* proportional edit, object mode */
+ char proportional_mask; /* proportional edit, mask editing */
+ char proportional_action; /* proportional edit, action editor */
+ char proportional_fcurve; /* proportional edit, graph editor */
+ char lock_markers; /* lock marker editing */
+ char pad4[5];
char auto_normalize; /*auto normalizing mode in wpaint*/
char multipaint; /* paint multiple bones in wpaint */
@@ -1209,6 +1339,21 @@ typedef struct PhysicsSettings {
int flag, quick_cache_step, rt;
} PhysicsSettings;
+/* ------------------------------------------- */
+/* Safe Area options used in Camera View & VSE
+ */
+typedef struct DisplaySafeAreas {
+ /* each value represents the (x,y) margins as a multiplier.
+ * 'center' in this context is just the name for a different kind of safe-area */
+
+ float title[2]; /* Title Safe */
+ float action[2]; /* Image/Graphics Safe */
+
+ /* use for alternate aspect ratio */
+ float title_center[2];
+ float action_center[2];
+} DisplaySafeAreas;
+
/* *************************************************************** */
/* Scene ID-Block */
@@ -1244,6 +1389,7 @@ typedef struct Scene {
struct ToolSettings *toolsettings; /* default allocated now */
struct SceneStats *stats; /* default allocated now */
+ struct DisplaySafeAreas safe_areas;
/* migrate or replace? depends on some internal things... */
/* no, is on the right place (ton) */
@@ -1254,13 +1400,15 @@ typedef struct Scene {
ListBase transform_spaces;
void *sound_scene;
- void *sound_scene_handle;
+ void *playback_handle;
void *sound_scrub_handle;
void *speaker_handles;
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 recalc; /* recalc = counterpart of ob->recalc */
@@ -1295,6 +1443,8 @@ typedef struct Scene {
/* RigidBody simulation world+settings */
struct RigidBodyWorld *rigidbody_world;
+
+ struct PreviewImage *preview;
} Scene;
/* **************** RENDERDATA ********************* */
@@ -1399,6 +1549,7 @@ typedef struct Scene {
#define R_TEXNODE_PREVIEW 0x40000
#define R_VIEWPORT_PREVIEW 0x80000
#define R_EXR_CACHE_FILE 0x100000
+#define R_MULTIVIEW 0x200000
/* r->stamp */
#define R_STAMP_TIME 0x0001
@@ -1413,6 +1564,7 @@ typedef struct Scene {
#define R_STAMP_SEQSTRIP 0x0200
#define R_STAMP_RENDERTIME 0x0400
#define R_STAMP_CAMERALENS 0x0800
+#define R_STAMP_STRIPMETA 0x1000
#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE| \
R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP| \
R_STAMP_RENDERTIME|R_STAMP_CAMERALENS)
@@ -1428,12 +1580,7 @@ enum {
/*R_COLOR_MANAGEMENT_PREDIVIDE = (1 << 1)*/ /* deprecated, shouldn't be used */
};
-#if 0 /* TODO */
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison R_COLOR_MANAGEMENT
-#endif
-#endif
-
+#ifdef DNA_DEPRECATED
/* subimtype, flag options for imtype */
enum {
R_OPENEXR_HALF = 1, /*deprecated*/
@@ -1448,10 +1595,6 @@ enum {
R_JPEG2K_CINE_PRESET = 256, /*deprecated*/
R_JPEG2K_CINE_48FPS = 512, /*deprecated*/
};
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison R_OPENEXR_HALF R_OPENEXR_ZBUF R_PREVIEW_JPG R_CINEON_LOG R_TIFF_16BIT
-#pragma GCC poison R_JPEG2K_12BIT R_JPEG2K_16BIT R_JPEG2K_YCC R_JPEG2K_CINE_PRESET R_JPEG2K_CINE_48FPS
#endif
/* bake_mode: same as RE_BAKE_xxx defines */
@@ -1483,7 +1626,10 @@ enum {
/* sequencer seq_prev_type seq_rend_type */
-
+/* scene->r.engine (scene.c) */
+extern const char *RE_engine_id_BLENDER_RENDER;
+extern const char *RE_engine_id_BLENDER_GAME;
+extern const char *RE_engine_id_CYCLES;
/* **************** SCENE ********************* */
@@ -1554,6 +1700,8 @@ enum {
#define SCE_SNAP_PEEL_OBJECT 4
#define SCE_SNAP_PROJECT 8
#define SCE_SNAP_NO_SELF 16
+#define SCE_SNAP_ABS_GRID 32
+
/* toolsettings->snap_target */
#define SCE_SNAP_TARGET_CLOSEST 0
#define SCE_SNAP_TARGET_CENTER 1
@@ -1598,7 +1746,8 @@ enum {
#define PROP_LIN 4
#define PROP_CONST 5
#define PROP_RANDOM 6
-#define PROP_MODE_MAX 7
+#define PROP_INVSQUARE 7
+#define PROP_MODE_MAX 8
/* toolsettings->proportional */
#define PROP_EDIT_OFF 0
@@ -1651,21 +1800,19 @@ typedef enum eVGroupSelect {
#define AUDIO_VOLUME_ANIMATED (1<<3)
enum {
+#ifdef DNA_DEPRECATED
FFMPEG_MULTIPLEX_AUDIO = 1, /* deprecated, you can choose none as audiocodec now */
+#endif
FFMPEG_AUTOSPLIT_OUTPUT = 2,
FFMPEG_LOSSLESS_OUTPUT = 4,
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison FFMPEG_MULTIPLEX_AUDIO
-#endif
-
-
/* Paint.flags */
typedef enum {
PAINT_SHOW_BRUSH = (1 << 0),
PAINT_FAST_NAVIGATE = (1 << 1),
- PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2)
+ PAINT_SHOW_BRUSH_ON_SURFACE = (1 << 2),
+ PAINT_USE_CAVITY_MASK = (1 << 3)
} PaintFlags;
/* Paint.symmetry_flags
@@ -1674,7 +1821,10 @@ typedef enum SymmetryFlags {
PAINT_SYMM_X = (1 << 0),
PAINT_SYMM_Y = (1 << 1),
PAINT_SYMM_Z = (1 << 2),
- PAINT_SYMMETRY_FEATHER = (1 << 3)
+ PAINT_SYMMETRY_FEATHER = (1 << 3),
+ PAINT_TILE_X = (1 << 4),
+ PAINT_TILE_Y = (1 << 5),
+ PAINT_TILE_Z = (1 << 6),
} SymmetryFlags;
#define PAINT_SYMM_AXIS_ALL (PAINT_SYMM_X | PAINT_SYMM_Y | PAINT_SYMM_Z)
@@ -1682,10 +1832,12 @@ typedef enum SymmetryFlags {
/* Sculpt.flags */
/* These can eventually be moved to paint flags? */
typedef enum SculptFlags {
+#ifdef DNA_DEPRECATED
/* deprecated, part of paint struct symmetry_flags now */
SCULPT_SYMM_X = (1 << 0),
SCULPT_SYMM_Y = (1 << 1),
SCULPT_SYMM_Z = (1 << 2),
+#endif
SCULPT_LOCK_X = (1 << 3),
SCULPT_LOCK_Y = (1 << 4),
@@ -1707,7 +1859,8 @@ typedef enum SculptFlags {
SCULPT_DYNTOPO_COLLAPSE = (1 << 11),
/* If set, dynamic-topology detail size will be constant in object space */
- SCULPT_DYNTOPO_DETAIL_CONSTANT = (1 << 13)
+ SCULPT_DYNTOPO_DETAIL_CONSTANT = (1 << 13),
+ SCULPT_DYNTOPO_DETAIL_BRUSH = (1 << 14),
} SculptFlags;
typedef enum ImagePaintMode {
@@ -1715,23 +1868,24 @@ typedef enum ImagePaintMode {
IMAGEPAINT_MODE_IMAGE, /* select texture paint image directly */
} ImagePaintMode;
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison SCULPT_SYMM_X SCULPT_SYMM_Y SCULPT_SYMM_Z SCULPT_SYMMETRY_FEATHER
-#endif
-
-
/* ImagePaintSettings.flag */
#define IMAGEPAINT_DRAWING 1
// #define IMAGEPAINT_DRAW_TOOL 2 // deprecated
// #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 // deprecated
/* projection painting only */
-#define IMAGEPAINT_PROJECT_XRAY 16
-#define IMAGEPAINT_PROJECT_BACKFACE 32
-#define IMAGEPAINT_PROJECT_FLAT 64
-#define IMAGEPAINT_PROJECT_LAYER_CLONE 128
-#define IMAGEPAINT_PROJECT_LAYER_STENCIL 256
-#define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV 512
+#define IMAGEPAINT_PROJECT_XRAY (1 << 4)
+#define IMAGEPAINT_PROJECT_BACKFACE (1 << 5)
+#define IMAGEPAINT_PROJECT_FLAT (1 << 6)
+#define IMAGEPAINT_PROJECT_LAYER_CLONE (1 << 7)
+#define IMAGEPAINT_PROJECT_LAYER_STENCIL (1 << 8)
+#define IMAGEPAINT_PROJECT_LAYER_STENCIL_INV (1 << 9)
+
+
+#define IMAGEPAINT_MISSING_UVS (1 << 0)
+#define IMAGEPAINT_MISSING_MATERIAL (1 << 1)
+#define IMAGEPAINT_MISSING_TEX (1 << 2)
+#define IMAGEPAINT_MISSING_STENCIL (1 << 3)
/* toolsettings->uvcalc_flag */
#define UVCALC_FILLHOLES 1
@@ -1760,6 +1914,12 @@ typedef enum ImagePaintMode {
/* toolsettings->gpencil_flags */
#define GP_TOOL_FLAG_PAINTSESSIONS_ON (1<<0)
+/* toolsettings->gpencil_src */
+typedef enum eGPencil_Source_3D {
+ GP_TOOL_SOURCE_SCENE = 0,
+ GP_TOOL_SOURCE_OBJECT = 1
+} eGPencil_Source_3d;
+
/* toolsettings->particle flag */
#define PE_KEEP_LENGTHS 1
#define PE_LOCK_FIRST 2
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 8a900c3946e..45b3aad92e4 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -41,7 +41,6 @@ struct SpaceLink;
struct ARegion;
struct ARegionType;
struct PanelType;
-struct HeaderType;
struct Scene;
struct uiLayout;
struct wmTimer;
@@ -57,24 +56,24 @@ typedef struct bScreen {
struct Scene *scene;
struct Scene *newscene; /* temporary when switching */
- int redraws_flag; /* user-setting for which editors get redrawn during anim playback (used to be time->redraws) */
- int pad1;
-
- short full; /* temp screen for image render display or fileselect */
- short temp; /* temp screen in a temp window, don't save (like user prefs) */
short winid; /* winid from WM, starts with 1 */
- short do_draw; /* notifier for drawing edges */
- short do_refresh; /* notifier for scale screen, changed screen, etc */
- short do_draw_gesture; /* notifier for gesture draw. */
- short do_draw_paintcursor; /* notifier for paint cursor draw. */
- short do_draw_drag; /* notifier for dragging draw. */
- short swap; /* indicator to survive swap-exchange systems */
+ short redraws_flag; /* user-setting for which editors get redrawn during anim playback (used to be time->redraws) */
+
+ char temp; /* temp screen in a temp window, don't save (like user prefs) */
+ char state; /* temp screen for image render display or fileselect */
+ char do_draw; /* notifier for drawing edges */
+ char do_refresh; /* notifier for scale screen, changed screen, etc */
+ 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];
short mainwin; /* screensize subwindow, for screenedges and global menus */
short subwinactive; /* active subwindow */
-
- short pad;
-
+
struct wmTimer *animtimer; /* if set, screen has timer handler added in window */
void *context; /* context callback */
} bScreen;
@@ -215,7 +214,7 @@ typedef struct ScrArea {
short do_refresh; /* private, for spacetype refresh callback */
short flag;
short region_active_win; /* index of last used region of 'RGN_TYPE_WINDOW'
- * runtuime variable, updated by executing operators */
+ * runtime variable, updated by executing operators */
char temp, pad;
struct SpaceType *type; /* callbacks for this space type */
@@ -247,7 +246,8 @@ typedef struct ARegion {
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 pad[2];
+ short flagfullscreen; /* temporary copy of flag settings for clean fullscreen */
+ short pad;
struct ARegionType *type; /* callbacks for this region type */
@@ -271,12 +271,20 @@ typedef struct ARegion {
// #define WIN_EQUAL 3 // UNUSED
/* area->flag */
-#define HEADER_NO_PULLDOWN (1 << 0)
-#define AREA_FLAG_DRAWJOINTO (1 << 1)
-#define AREA_FLAG_DRAWJOINFROM (1 << 2)
-#define AREA_TEMP_INFO (1 << 3)
-#define AREA_FLAG_DRAWSPLIT_H (1 << 4)
-#define AREA_FLAG_DRAWSPLIT_V (1 << 5)
+enum {
+ HEADER_NO_PULLDOWN = (1 << 0),
+ AREA_FLAG_DRAWJOINTO = (1 << 1),
+ AREA_FLAG_DRAWJOINFROM = (1 << 2),
+ AREA_TEMP_INFO = (1 << 3),
+ AREA_FLAG_DRAWSPLIT_H = (1 << 4),
+ AREA_FLAG_DRAWSPLIT_V = (1 << 5),
+ /* used to check if we should switch back to prevspace (of a different type) */
+ AREA_FLAG_TEMP_TYPE = (1 << 6),
+ /* for temporary fullscreens (file browser, image editor render) that are opened above user set fullscreens */
+ AREA_FLAG_STACKED_FULLSCREEN = (1 << 7),
+ /* update action zones (even if the mouse is not intersecting them) */
+ AREA_FLAG_ACTIONZONES_UPDATE = (1 << 8),
+};
#define EDGEWIDTH 1
#define AREAGRID 4
@@ -287,9 +295,12 @@ typedef struct ARegion {
#define HEADERDOWN 1
#define HEADERTOP 2
-/* screen->full */
-#define SCREENNORMAL 0
-#define SCREENFULL 1
+/* screen->state */
+enum {
+ SCREENNORMAL = 0,
+ SCREENMAXIMIZED = 1, /* one editor taking over the screen */
+ SCREENFULL = 2, /* one editor taking over the screen with no bare-minimum UI elements */
+};
/* Panel->flag */
enum {
@@ -364,6 +375,8 @@ enum {
RGN_TYPE_TOOL_PROPS = 6,
RGN_TYPE_PREVIEW = 7
};
+/* use for function args */
+#define RGN_TYPE_ANY -1
/* region alignment */
#define RGN_ALIGN_NONE 0
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
index 8d59a13768b..d886dcf2807 100644
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -164,7 +164,7 @@ 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;
+ short freq, totlinks, pad1, pad2; /* freq makes reference to skipped ticks between 2 active pulses */
char name[64]; /* MAX_NAME */
void *data;
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 4795048d346..69e7fb43fb6 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -53,6 +53,11 @@ struct MovieClip;
/* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
+typedef struct StripAnim {
+ struct StripAnim *next, *prev;
+ struct anim *anim;
+} StripAnim;
+
typedef struct StripElem {
char name[256];
int orig_width, orig_height;
@@ -94,6 +99,9 @@ typedef struct StripProxy {
// to build
short build_tc_flags; // time code flags (see below) of all tc indices
// to build
+ short build_flags;
+ char storage;
+ char pad[5];
} StripProxy;
typedef struct Strip {
@@ -131,10 +139,11 @@ typedef struct Sequence {
int flag, type; /*flags bitmap (see below) and the type of sequence*/
int len; /* the length of the contents of this strip - before handles are applied */
- int start, startofs, endofs;
- int startstill, endstill;
+ int start; /* start frame of contents of strip in absolute frame coordinates. For metastrips start of first strip startdisp */
+ int startofs, endofs; /* frames after the first frame where display starts, frames before the last frame where display ends */
+ int startstill, endstill; /* frames that use the first frame before data begins, frames that use the last frame after data ends */
int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */
- int startdisp, enddisp; /*starting and ending points in the sequence*/
+ int startdisp, enddisp; /* starting and ending points of the strip in the sequence*/
float sat;
float mul, handsize;
@@ -152,8 +161,7 @@ typedef struct Sequence {
struct Object *scene_camera; /* override scene camera */
struct MovieClip *clip; /* for MOVIECLIP strips */
struct Mask *mask; /* for MASK strips */
-
- struct anim *anim; /* for MOVIE strips */
+ ListBase anims; /* for MOVIE strips */
float effect_fader;
float speed_fader;
@@ -183,7 +191,13 @@ typedef struct Sequence {
int sfra; /* starting frame according to the timeline of the scene. */
char alpha_mode;
- char pad[3];
+ char pad[2];
+
+ /* Multiview */
+ char views_format;
+ struct Stereo3dFormat *stereo3d_format;
+
+ struct IDProperty *prop;
/* modifiers */
ListBase modifiers;
@@ -193,6 +207,8 @@ typedef struct MetaStack {
struct MetaStack *next, *prev;
ListBase *oldbasep;
Sequence *parseq;
+ /* the startdisp/enddisp when entering the meta */
+ int disp_range[2];
} MetaStack;
typedef struct Editing {
@@ -204,9 +220,10 @@ typedef struct Editing {
Sequence *act_seq;
char act_imagedir[1024]; /* 1024 = FILE_MAX */
char act_sounddir[1024]; /* 1024 = FILE_MAX */
+ char proxy_dir[1024]; /* 1024 = FILE_MAX */
int over_ofs, over_cfra;
- int over_flag, pad;
+ int over_flag, proxy_storage;
rctf over_border;
} Editing;
@@ -254,6 +271,35 @@ typedef struct GaussianBlurVars {
float size_y;
} GaussianBlurVars;
+typedef struct TextVars {
+ char text[512];
+ int text_size;
+ float loc[2];
+ float wrap_width;
+ char flag;
+ char align, align_y;
+ char pad[5];
+} TextVars;
+
+/* TextVars.flag */
+enum {
+ SEQ_TEXT_SHADOW = (1 << 0),
+};
+
+/* TextVars.align */
+enum {
+ SEQ_TEXT_ALIGN_X_LEFT = 0,
+ SEQ_TEXT_ALIGN_X_CENTER = 1,
+ SEQ_TEXT_ALIGN_X_RIGHT = 2,
+};
+
+/* TextVars.align_y */
+enum {
+ SEQ_TEXT_ALIGN_Y_TOP = 0,
+ SEQ_TEXT_ALIGN_Y_CENTER = 1,
+ SEQ_TEXT_ALIGN_Y_BOTTOM = 2,
+};
+
/* ***************** Sequence modifiers ****************** */
typedef struct SequenceModifierData {
@@ -321,6 +367,10 @@ typedef struct SequencerScopes {
#define SEQ_STRIP_OFSBOTTOM 0.2f
#define SEQ_STRIP_OFSTOP 0.8f
+/* Editor->proxy_storage */
+/* store proxies in project directory */
+#define SEQ_EDIT_PROXY_DIR_STORAGE 1
+
/* SpeedControlVars->flags */
#define SEQ_SPEED_INTEGRATE 1
/* #define SEQ_SPEED_BLEND 2 */ /* DEPRECATED */
@@ -336,7 +386,9 @@ enum {
SEQ_OVERLAP = (1 << 3),
SEQ_FILTERY = (1 << 4),
SEQ_MUTE = (1 << 5),
+#ifdef DNA_DEPRECATED
SEQ_MAKE_PREMUL = (1 << 6), /* deprecated, used for compatibility code only */
+#endif
SEQ_REVERSE_FRAMES = (1 << 7),
SEQ_IPO_FRAME_LOCKED = (1 << 8),
SEQ_EFFECT_NOT_LOADED = (1 << 9),
@@ -349,9 +401,9 @@ enum {
SEQ_USE_TRANSFORM = (1 << 16),
SEQ_USE_CROP = (1 << 17),
/* SEQ_USE_COLOR_BALANCE = (1 << 18), */ /* DEPRECATED */
- SEQ_USE_PROXY_CUSTOM_DIR = (1 << 19),
+ /* SEQ_USE_PROXY_CUSTOM_DIR = (1 << 19), */ /* DEPRECATED */
- SEQ_USE_PROXY_CUSTOM_FILE = (1 << 21),
+ /* SEQ_USE_PROXY_CUSTOM_FILE = (1 << 21), */ /* DEPRECATED */
SEQ_USE_EFFECT_DEFAULT_FADE = (1 << 22),
SEQ_USE_LINEAR_MODIFIERS = (1 << 23),
@@ -360,13 +412,19 @@ enum {
SEQ_AUDIO_PITCH_ANIMATED = (1 << 25),
SEQ_AUDIO_PAN_ANIMATED = (1 << 26),
SEQ_AUDIO_DRAW_WAVEFORM = (1 << 27),
+
+ /* don't include Grease Pencil in OpenGL previews of Scene strips */
+ SEQ_SCENE_NO_GPENCIL = (1 << 28),
+ SEQ_USE_VIEWS = (1 << 29),
SEQ_INVALID_EFFECT = (1 << 31),
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison SEQ_MAKE_PREMUL
-#endif
+/* StripProxy->storage */
+enum {
+ SEQ_STORAGE_PROXY_CUSTOM_FILE = (1 << 1), /* store proxy in custom directory */
+ SEQ_STORAGE_PROXY_CUSTOM_DIR = (1 << 2), /* store proxy in custom file */
+};
/* convenience define for all selection flags */
#define SEQ_ALLSEL (SELECT + SEQ_LEFTSEL + SEQ_RIGHTSEL)
@@ -392,6 +450,11 @@ enum {
#define SEQ_PROXY_TC_RECORD_RUN_NO_GAPS 8
#define SEQ_PROXY_TC_ALL 15
+/* SeqProxy->build_flags */
+enum {
+ SEQ_PROXY_SKIP_EXISTING = 1,
+};
+
/* seq->alpha_mode */
enum {
SEQ_ALPHA_STRAIGHT = 0,
@@ -427,7 +490,9 @@ enum {
SEQ_TYPE_MULTICAM = 30,
SEQ_TYPE_ADJUSTMENT = 31,
SEQ_TYPE_GAUSSIAN_BLUR = 40,
- SEQ_TYPE_EFFECT_MAX = 40
+ SEQ_TYPE_TEXT = 41,
+
+ SEQ_TYPE_MAX = 41
};
#define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1 << 0)
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index 25c98b4f07e..5e011678fee 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -38,15 +38,13 @@ enum {
MOD_SMOKE_DISSOLVE = (1 << 2), /* let smoke dissolve */
MOD_SMOKE_DISSOLVE_LOG = (1 << 3), /* using 1/x for dissolve */
+#ifdef DNA_DEPRECATED
MOD_SMOKE_HIGH_SMOOTH = (1 << 5), /* -- Deprecated -- */
+#endif
MOD_SMOKE_FILE_LOAD = (1 << 6), /* flag for file load */
MOD_SMOKE_ADAPTIVE_DOMAIN = (1 << 7),
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison MOD_SMOKE_HIGH_SMOOTH
-#endif
-
/* noise */
#define MOD_SMOKE_NOISEWAVE (1<<0)
#define MOD_SMOKE_NOISEFFT (1<<1)
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
index d7a51359777..aefe1a7d5a3 100644
--- a/source/blender/makesdna/DNA_sound_types.h
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -41,7 +41,6 @@
struct Ipo;
struct PackedFile;
-struct SpaceLink;
typedef struct bSound {
ID id;
@@ -95,6 +94,8 @@ typedef struct bSound {
*/
void *playback_handle;
+ /* spinlock for asynchronous loading of sounds */
+ void *spinlock;
/* XXX unused currently (SOUND_TYPE_LIMITER) */
/* float start, end; */
} bSound;
@@ -116,14 +117,13 @@ enum {
};
enum {
- SOUND_FLAGS_3D = (1 << 3), /* deprecated! used for sound actuator loading */
- SOUND_FLAGS_CACHING = (1 << 4),
- SOUND_FLAGS_MONO = (1 << 5),
-};
-
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison SOUND_FLAGS_3D
+#ifdef DNA_DEPRECATED
+ SOUND_FLAGS_3D = (1 << 3), /* deprecated! used for sound actuator loading */
#endif
+ SOUND_FLAGS_CACHING = (1 << 4),
+ SOUND_FLAGS_MONO = (1 << 5),
+ SOUND_FLAGS_WAVEFORM_LOADING = (1 << 6),
+};
/* to DNA_sound_types.h*/
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 6f57f549efb..b8f2ce1b2ea 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -50,29 +50,21 @@
struct ID;
struct Text;
struct Script;
-struct bSound;
-struct ImBuf;
struct Image;
struct Scopes;
struct Histogram;
struct SpaceIpo;
-struct BlendHandle;
-struct RenderInfo;
struct bNodeTree;
-struct uiBlock;
struct FileList;
struct bGPdata;
struct bDopeSheet;
struct FileSelectParams;
struct FileLayout;
-struct bScreen;
-struct Scene;
struct wmOperator;
struct wmTimer;
struct MovieClip;
struct MovieClipScopes;
struct Mask;
-struct GHash;
struct BLI_mempool;
@@ -274,6 +266,7 @@ typedef enum eSpaceOutliner_Flag {
SO_NEWSELECTED = (1 << 1),
SO_HIDE_RESTRICTCOLS = (1 << 2),
SO_HIDE_KEYINGSETINFO = (1 << 3),
+ SO_SKIP_SORT_ALPHA = (1 << 4),
} eSpaceOutliner_Flag;
/* SpaceOops->outlinevis */
@@ -292,14 +285,18 @@ typedef enum eSpaceOutliner_Mode {
SO_DATABLOCKS = 11,
SO_USERDEF = 12,
/* SO_KEYMAP = 13, */ /* deprecated! */
+ SO_ID_ORPHANS = 14,
} eSpaceOutliner_Mode;
/* SpaceOops->storeflag */
typedef enum eSpaceOutliner_StoreFlag {
- /* rebuild tree */
+ /* cleanup tree */
SO_TREESTORE_CLEANUP = (1 << 0),
/* if set, it allows redraws. gets set for some allqueue events */
SO_TREESTORE_REDRAW = (1 << 1),
+ /* rebuild the tree, similar to cleanup,
+ * but defer a call to BKE_outliner_treehash_rebuild_from_treestore instead */
+ SO_TREESTORE_REBUILD = (1 << 2),
} eSpaceOutliner_StoreFlag;
/* outliner search flags (SpaceOops->search_flags) */
@@ -462,6 +459,8 @@ typedef enum eScreen_Redraws_Flag {
// TIME_CONTINUE_PHYSICS = (1 << 7), /* UNUSED */
TIME_NODES = (1 << 8),
TIME_CLIPS = (1 << 9),
+
+ TIME_FOLLOW = (1 << 15),
} eScreen_Redraws_Flag;
/* time->cache */
@@ -491,17 +490,22 @@ typedef struct SpaceSeq {
float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
- short render_size;
+ short render_size; /* eSpaceSeq_Proxy_RenderSize */
short chanshown;
short zebra;
int flag;
float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
int view; /* see SEQ_VIEW_* below */
int overlay_type;
+ int draw_flag; /* overlay an image of the editing on below the strips */
+ int pad;
struct bGPdata *gpd; /* grease-pencil data */
struct SequencerScopes scopes; /* different scoped displayed in space */
+
+ char multiview_eye; /* multiview current eye - for internal use */
+ char pad2[7];
} SpaceSeq;
@@ -514,15 +518,26 @@ typedef enum eSpaceSeq_RegionType {
SEQ_DRAW_IMG_HISTOGRAM = 4,
} eSpaceSeq_RegionType;
+/* sseq->draw_flag */
+typedef enum eSpaceSeq_DrawFlag {
+ SEQ_DRAW_BACKDROP = (1 << 0),
+ SEQ_DRAW_OFFSET_EXT = (1 << 1),
+} eSpaceSeq_DrawFlag;
+
+
/* sseq->flag */
typedef enum eSpaceSeq_Flag {
SEQ_DRAWFRAMES = (1 << 0),
SEQ_MARKER_TRANS = (1 << 1),
SEQ_DRAW_COLOR_SEPARATED = (1 << 2),
- SEQ_DRAW_SAFE_MARGINS = (1 << 3),
+ SEQ_SHOW_SAFE_MARGINS = (1 << 3),
SEQ_SHOW_GPENCIL = (1 << 4),
SEQ_NO_DRAW_CFRANUM = (1 << 5),
SEQ_USE_ALPHA = (1 << 6), /* use RGBA display mode for preview */
+ SEQ_ALL_WAVEFORMS = (1 << 7), /* draw all waveforms */
+ SEQ_NO_WAVEFORMS = (1 << 8), /* draw no waveforms */
+ SEQ_SHOW_SAFE_CENTER = (1 << 9),
+ SEQ_SHOW_METADATA = (1 << 10),
} eSpaceSeq_Flag;
/* sseq->view */
@@ -543,8 +558,7 @@ typedef enum eSpaceSeq_Proxy_RenderSize {
SEQ_PROXY_RENDER_SIZE_FULL = 100
} eSpaceSeq_Proxy_RenderSize;
-typedef struct MaskSpaceInfo
-{
+typedef struct MaskSpaceInfo {
/* **** mask editing **** */
struct Mask *mask;
/* draw options */
@@ -566,24 +580,33 @@ typedef enum eSpaceSeq_OverlayType {
/* Config and Input for File Selector */
typedef struct FileSelectParams {
char title[96]; /* title, also used for the text of the execute button */
- char dir[1056]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 32, this is for extreme case when 1023 length path
+ char dir[1090]; /* directory, FILE_MAX_LIBEXTRA, 1024 + 66, this is for extreme case when 1023 length path
* needs to be linked in, where foo.blend/Armature need adding */
+ char pad_c1[2];
char file[256]; /* file */
char renamefile[256];
char renameedit[256]; /* annoying but the first is only used for initialization */
char filter_glob[64]; /* list of filetypes to filter */
- int active_file;
+ char filter_search[64]; /* text items' name must match to be shown. */
+ int filter_id; /* same as filter, but for ID types (aka library groups). */
+
+ int active_file; /* active file used for keyboard navigation */
+ int highlight_file; /* file under cursor */
int sel_first;
int sel_last;
+ unsigned short thumbnail_size;
+ short pad;
/* short */
short type; /* XXXXX for now store type here, should be moved to the operator */
short flag; /* settings for filter, hiding dots files,... */
short sort; /* sort order */
short display; /* display mode flag */
- short filter; /* filter when (flags & FILE_FILTER) is true */
+ int filter; /* filter when (flags & FILE_FILTER) is true */
+
+ short recursion_level; /* max number of levels in dirtree to show at once, 0 to disable recursion. */
/* XXX --- still unused -- */
short f_fp; /* show font preview */
@@ -615,13 +638,24 @@ typedef struct SpaceFile {
struct wmOperator *op;
struct wmTimer *smoothscroll_timer;
+ struct wmTimer *previews_timer;
struct FileLayout *layout;
short recentnr, bookmarknr;
- short systemnr, pad2;
+ short systemnr, system_bookmarknr;
} SpaceFile;
+/* FSMenuEntry's without paths indicate seperators */
+typedef struct FSMenuEntry {
+ struct FSMenuEntry *next;
+
+ char *path;
+ char name[256]; /* FILE_MAXFILE */
+ short save;
+ short valid;
+ short pad[2];
+} FSMenuEntry;
/* FileSelectParams.display */
enum FileDisplayTypeE {
@@ -679,32 +713,151 @@ typedef enum eFileSel_Params_Flag {
} eFileSel_Params_Flag;
-/* files in filesel list: file types */
+/* files in filesel list: file types
+ * Note we could use mere values (instead of bitflags) for file types themselves,
+ * but since we do not lack of bytes currently...
+ */
typedef enum eFileSel_File_Types {
- BLENDERFILE = (1 << 2),
- BLENDERFILE_BACKUP = (1 << 3),
- IMAGEFILE = (1 << 4),
- MOVIEFILE = (1 << 5),
- PYSCRIPTFILE = (1 << 6),
- FTFONTFILE = (1 << 7),
- SOUNDFILE = (1 << 8),
- TEXTFILE = (1 << 9),
- MOVIEFILE_ICON = (1 << 10), /* movie file that preview can't load */
- FOLDERFILE = (1 << 11), /* represents folders for filtering */
- BTXFILE = (1 << 12),
- COLLADAFILE = (1 << 13),
- OPERATORFILE = (1 << 14), /* from filter_glob operator property */
- APPLICATIONBUNDLE = (1 << 15),
+ FILE_TYPE_BLENDER = (1 << 2),
+ FILE_TYPE_BLENDER_BACKUP = (1 << 3),
+ FILE_TYPE_IMAGE = (1 << 4),
+ FILE_TYPE_MOVIE = (1 << 5),
+ FILE_TYPE_PYSCRIPT = (1 << 6),
+ FILE_TYPE_FTFONT = (1 << 7),
+ FILE_TYPE_SOUND = (1 << 8),
+ FILE_TYPE_TEXT = (1 << 9),
+ /* 1 << 10 was FILE_TYPE_MOVIE_ICON, got rid of this so free slot for future type... */
+ FILE_TYPE_FOLDER = (1 << 11), /* represents folders for filtering */
+ FILE_TYPE_BTX = (1 << 12),
+ FILE_TYPE_COLLADA = (1 << 13),
+ FILE_TYPE_OPERATOR = (1 << 14), /* from filter_glob operator property */
+ FILE_TYPE_APPLICATIONBUNDLE = (1 << 15),
+
+ FILE_TYPE_DIR = (1 << 30), /* An FS directory (i.e. S_ISDIR on its path is true). */
+ FILE_TYPE_BLENDERLIB = (1 << 31),
} eFileSel_File_Types;
/* Selection Flags in filesel: struct direntry, unsigned char selflag */
typedef enum eDirEntry_SelectFlag {
-/* ACTIVE_FILE = (1 << 1), */ /* UNUSED */
- HILITED_FILE = (1 << 2),
- SELECTED_FILE = (1 << 3),
- EDITING_FILE = (1 << 4),
+/* FILE_SEL_ACTIVE = (1 << 1), */ /* UNUSED */
+ FILE_SEL_HIGHLIGHTED = (1 << 2),
+ FILE_SEL_SELECTED = (1 << 3),
+ FILE_SEL_EDITING = (1 << 4),
} eDirEntry_SelectFlag;
+#define FILE_LIST_MAX_RECURSION 4
+
+/* ***** Related to file browser, but never saved in DNA, only here to help with RNA. ***** */
+
+/* About Unique identifier.
+ * Stored in a CustomProps once imported.
+ * Each engine is free to use it as it likes - it will be the only thing passed to it by blender to identify
+ * asset/variant/version (concatenating the three into a single 48 bytes one).
+ * Assumed to be 128bits, handled as four integers due to lack of real bytes proptype in RNA :|.
+ */
+#define ASSET_UUID_LENGTH 16
+
+/* Used to communicate with asset engines outside of 'import' context. */
+typedef struct AssetUUID {
+ int uuid_asset[4];
+ int uuid_variant[4];
+ int uuid_revision[4];
+} AssetUUID;
+
+typedef struct AssetUUIDList {
+ AssetUUID *uuids;
+ int nbr_uuids, pad;
+} AssetUUIDList;
+
+/* Container for a revision, only relevant in asset context. */
+typedef struct FileDirEntryRevision {
+ struct FileDirEntryRevision *next, *prev;
+
+ char *comment;
+ void *pad;
+
+ int uuid[4];
+
+ uint64_t size;
+ int64_t time;
+ /* Temp caching of UI-generated strings... */
+ char size_str[16];
+ char time_str[8];
+ char date_str[16];
+} FileDirEntryRevision;
+
+/* Container for a variant, only relevant in asset context.
+ * In case there are no variants, a single one shall exist, with NULL name/description. */
+typedef struct FileDirEntryVariant {
+ struct FileDirEntryVariant *next, *prev;
+
+ int uuid[4];
+ char *name;
+ char *description;
+
+ ListBase revisions;
+ int nbr_revisions;
+ int act_revision;
+} FileDirEntryVariant;
+
+/* Container for mere direntry, with additional asset-related data. */
+typedef struct FileDirEntry {
+ struct FileDirEntry *next, *prev;
+
+ int uuid[4];
+ char *name;
+ char *description;
+
+ /* Either point to active variant/revision if available, or own entry (in mere filebrowser case). */
+ FileDirEntryRevision *entry;
+
+ int typeflag; /* eFileSel_File_Types */
+ int blentype; /* ID type, in case typeflag has FILE_TYPE_BLENDERLIB set. */
+
+ char *relpath;
+
+ void *poin; /* TODO: make this a real ID pointer? */
+ struct ImBuf *image;
+
+ /* Tags are for info only, most of filtering is done in asset engine. */
+ char **tags;
+ int nbr_tags;
+
+ short status;
+ short flags;
+
+ ListBase variants;
+ int nbr_variants;
+ int act_variant;
+} FileDirEntry;
+
+/* Array of direntries. */
+/* This struct is used in various, different contexts.
+ * In Filebrowser UI, it stores the total number of available entries, the number of visible (filtered) entries,
+ * and a subset of those in 'entries' ListBase, from idx_start (included) to idx_end (excluded).
+ * In AssetEngine context (i.e. outside of 'browsing' context), entries contain all needed data, there is no filtering,
+ * so nbr_entries_filtered, entry_idx_start and entry_idx_end should all be set to -1.
+ */
+typedef struct FileDirEntryArr {
+ ListBase entries;
+ int nbr_entries;
+ int nbr_entries_filtered;
+ int entry_idx_start, entry_idx_end;
+
+ char root[1024]; /* FILE_MAX */
+} FileDirEntryArr;
+
+/* FileDirEntry.status */
+enum {
+ ASSET_STATUS_LOCAL = 1 << 0, /* If active uuid is available localy/immediately. */
+ ASSET_STATUS_LATEST = 1 << 1, /* If active uuid is latest available version. */
+};
+
+/* FileDirEntry.flags */
+enum {
+ FILE_ENTRY_INVALID_PREVIEW = 1 << 0, /* The preview for this entry could not be generated. */
+};
+
/* Image/UV Editor ======================================== */
/* Image/UV Editor */
@@ -810,7 +963,8 @@ typedef enum eSpaceImage_Flag {
SI_COLOR_CORRECTION = (1 << 24),
- SI_NO_DRAW_TEXPAINT = (1 << 25)
+ SI_NO_DRAW_TEXPAINT = (1 << 25),
+ SI_DRAW_METADATA = (1 << 26)
} eSpaceImage_Flag;
/* Text Editor ============================================ */
@@ -919,7 +1073,7 @@ typedef struct bNodeTreePath {
bNodeInstanceKey parent_key; /* base key for nodes in this tree instance */
int pad;
float view_center[2]; /* v2d center point, so node trees can have different offsets in editors */
- /* XXX this is not automatically updated when node names are changed! */
+
char node_name[64]; /* MAX_NAME */
} bNodeTreePath;
@@ -954,12 +1108,17 @@ typedef struct SpaceNode {
int treetype DNA_DEPRECATED; /* treetype: as same nodetree->type */
int pad3;
- short texfrom; /* texfrom object, world or brush */
- short shaderfrom; /* shader from object or world */
- short recalc; /* currently on 0/1, for auto compo */
- short pad4;
- ListBase linkdrag; /* temporary data for modal linking operator */
-
+ short texfrom; /* texfrom object, world or brush */
+ short shaderfrom; /* shader from object or world */
+ short recalc; /* currently on 0/1, for auto compo */
+
+ char insert_ofs_dir; /* direction for offsetting nodes on insertion */
+ char pad4;
+
+ ListBase linkdrag; /* temporary data for modal linking operator */
+ /* XXX hack for translate_attach op-macros to pass data from transform op to insert_offset op */
+ struct NodeInsertOfsData *iofsd; /* temporary data for node insert offset (in UI called Auto-offset) */
+
struct bGPdata *gpd; /* grease-pencil data */
} SpaceNode;
@@ -975,8 +1134,9 @@ typedef enum eSpaceNode_Flag {
SNODE_AUTO_RENDER = (1 << 5),
SNODE_SHOW_HIGHLIGHT = (1 << 6),
// SNODE_USE_HIDDEN_PREVIEW = (1 << 10), DNA_DEPRECATED December2013
- SNODE_NEW_SHADERS = (1 << 11),
+ SNODE_NEW_SHADERS = (1 << 11),
SNODE_PIN = (1 << 12),
+ SNODE_SKIP_INSOFFSET = (1 << 13), /* automatically offset following nodes in a chain on insertion */
} eSpaceNode_Flag;
/* snode->texfrom */
@@ -994,6 +1154,12 @@ typedef enum eSpaceNode_ShaderFrom {
SNODE_SHADER_LINESTYLE = 2,
} eSpaceNode_ShaderFrom;
+/* snode->insert_ofs_dir */
+enum {
+ SNODE_INSERTOFS_DIR_RIGHT = 0,
+ SNODE_INSERTOFS_DIR_LEFT = 1,
+};
+
/* Game Logic Editor ===================================== */
/* Logic Editor */
@@ -1134,6 +1300,7 @@ typedef enum eSpaceClip_Flag {
SC_SHOW_GRAPH_SEL_ONLY = (1 << 19),
SC_SHOW_GRAPH_HIDDEN = (1 << 20),
SC_SHOW_GRAPH_TRACKS_ERROR = (1 << 21),
+ SC_SHOW_METADATA = (1 << 22),
} eSpaceClip_Flag;
/* SpaceClip->mode */
@@ -1172,10 +1339,13 @@ typedef enum eSpace_Type {
SPACE_INFO = 7,
SPACE_SEQ = 8,
SPACE_TEXT = 9,
+#ifdef DNA_DEPRECATED
SPACE_IMASEL = 10, /* deprecated */
SPACE_SOUND = 11, /* Deprecated */
+#endif
SPACE_ACTION = 12,
SPACE_NLA = 13,
+ /* TODO: fully deprecate */
SPACE_SCRIPT = 14, /* Deprecated */
SPACE_TIME = 15,
SPACE_NODE = 16,
@@ -1187,10 +1357,9 @@ typedef enum eSpace_Type {
SPACEICONMAX = SPACE_CLIP
} eSpace_Type;
-// TODO: SPACE_SCRIPT
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison SPACE_IMASEL SPACE_SOUND
-#endif
+/* use for function args */
+#define SPACE_TYPE_ANY -1
+
#define IMG_SIZE_FALLBACK 256
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index d256cfb2e85..af6adbecd83 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -62,11 +62,12 @@ typedef struct MTex {
char uvname[64]; /* MAX_CUSTOMDATA_LAYER_NAME */
char projx, projy, projz, mapping;
- float ofs[3], size[3], rot;
-
+ char brush_map_mode, brush_angle_mode;
+ char pad[2];
+ float ofs[3], size[3], rot, random_angle;
+
short texflag, colormodel, pmapto, pmaptoneg;
short normapspace, which_output;
- char brush_map_mode, pad[7];
float r, g, b, k;
float def_var, rt;
@@ -83,8 +84,9 @@ typedef struct MTex {
/* particles */
float timefac, lengthfac, clumpfac, dampfac;
- float kinkfac, roughfac, padensfac, gravityfac;
+ float kinkfac, kinkampfac, roughfac, padensfac, gravityfac;
float lifefac, sizefac, ivelfac, fieldfac;
+ int pad2;
/* lamp */
float shadowfac;
@@ -174,8 +176,8 @@ typedef struct VoxelData {
short flag;
short extend;
short smoked_type;
+ short hair_type;
short data_type;
- short pad;
int _pad;
struct Object *object; /* for rendering smoke sims */
@@ -512,6 +514,10 @@ typedef struct ColorMapping {
#define MTEX_MAP_MODE_RANDOM 4
#define MTEX_MAP_MODE_STENCIL 5
+/* brush_angle_mode */
+#define MTEX_ANGLE_RANDOM 1
+#define MTEX_ANGLE_RAKE 2
+
/* **************** ColorBand ********************* */
/* colormode */
@@ -612,6 +618,7 @@ enum {
#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))
@@ -621,6 +628,11 @@ enum {
#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
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h
index c471cb26892..9888b735b8b 100644
--- a/source/blender/makesdna/DNA_tracking_types.h
+++ b/source/blender/makesdna/DNA_tracking_types.h
@@ -43,11 +43,9 @@
/* match-moving data */
struct bGPdata;
-struct ImBuf;
struct Image;
struct MovieReconstructedCamera;
struct MovieTrackingCamera;
-struct MovieTrackingBundle;
struct MovieTrackingMarker;
struct MovieTrackingTrack;
struct MovieTracking;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index ed59014cf75..00dc1c1205e 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -74,7 +74,8 @@ typedef struct uiFontStyle {
short uifont_id; /* saved in file, 0 is default */
short points; /* actual size depends on 'global' dpi */
short kerning; /* unfitted or default kerning value. */
- char pad[6];
+ char word_wrap; /* enable word-wrap when drawing */
+ char pad[5];
short italic, bold; /* style hint */
short shadow; /* value is amount of pixels blur */
short shadx, shady; /* shadow offset in pixels */
@@ -168,11 +169,13 @@ typedef struct ThemeUI {
uiPanelColors panel; /* depricated, but we keep it for do_versions (2.66.1) */
+ char widget_emboss[4];
+
/* fac: 0 - 1 for blend factor, width in pixels */
float menu_shadow_fac;
short menu_shadow_width;
- short pad;
+ short pad[3];
char iconfile[256]; // FILE_MAXFILE length
float icon_alpha;
@@ -249,6 +252,7 @@ typedef struct ThemeSpace {
char bone_solid[4], bone_pose[4], bone_pose_active[4];
char strip[4], strip_select[4];
char cframe[4];
+ char time_keyframe[4], time_gp_keyframe[4];
char freestyle_edge_mark[4], freestyle_face_mark[4];
char nurb_uline[4], nurb_vline[4];
@@ -285,15 +289,19 @@ typedef struct ThemeSpace {
char handle_vertex[4];
char handle_vertex_select[4];
- char pad2[4];
char handle_vertex_size;
+
+ char clipping_border_3d[4];
char marker_outline[4], marker[4], act_marker[4], sel_marker[4], dis_marker[4], lock_marker[4];
char bundle_solid[4];
char path_before[4], path_after[4];
char camera_path[4];
- char hpad[3];
+ char hpad[2];
+
+ char gp_vertex_size;
+ char gp_vertex[4], gp_vertex_select[4];
char preview_back[4];
char preview_stitch_face[4];
@@ -331,6 +339,9 @@ typedef struct ThemeSpace {
char paint_curve_pivot[4];
char paint_curve_handle[4];
+
+ char metadatabg[4];
+ char metadatatext[4];
} ThemeSpace;
@@ -455,7 +466,8 @@ typedef struct UserDef {
int scrollback; /* console scrollback limit */
int dpi; /* range 48-128? */
- short encoding;
+ char node_margin; /* node insert offset (aka auto-offset) margin, but might be useful for later stuff as well */
+ char pad2;
short transopts;
short menuthreshold1, menuthreshold2;
@@ -480,8 +492,9 @@ typedef struct UserDef {
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 pad_rot_angle; /* control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use */
+ short pad4;
short obcenter_dia;
short rvisize; /* rotating view icon size */
short rvibright; /* rotating view icon brightness */
@@ -493,7 +506,10 @@ typedef struct UserDef {
char ipo_new; /* interpolation mode for newly added F-Curves */
char keyhandles_new; /* handle types for newly added keyframes */
char gpu_select_method;
- char pad1;
+ char view_frame_type;
+
+ int view_frame_keyframes; /* number of keyframes to zoom around current frame */
+ float view_frame_seconds; /* seconds to zoom around current frame */
short scrcastfps; /* frame rate for screencast to be played back */
short scrcastwait; /* milliseconds between screencast snapshots */
@@ -504,6 +520,7 @@ typedef struct UserDef {
float ndof_sensitivity; /* overall sensitivity of 3D mouse */
float ndof_orbit_sensitivity;
+ float ndof_deadzone; /* deadzone of 3D mouse */
int ndof_flag; /* flags for 3D mouse */
short ogl_multisamples; /* amount of samples for OpenGL FSA, if zero no FSA */
@@ -534,17 +551,21 @@ typedef struct UserDef {
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 */
short pie_initial_timeout; /* direction in the pie menu will always be calculated from the initial position
* within this time limit */
- int pie_animation_timeout;
- int pad2;
+ short pie_animation_timeout;
+ short pie_menu_confirm;
short pie_menu_radius; /* pie menu radius */
short pie_menu_threshold; /* pie menu distance from center before a direction is set */
struct WalkNavigation walk_navigation;
+
+ short opensubdiv_compute_type;
+ char pad5[6];
} UserDef;
extern UserDef U; /* from blenkernel blender.c */
@@ -659,9 +680,10 @@ typedef enum eUserpref_UI_Flag {
/* uiflag2 */
typedef enum eUserpref_UI_Flag2 {
- USER_KEEP_SESSION = (1 << 0),
- USER_REGION_OVERLAP = (1 << 1),
- USER_TRACKPAD_NATURAL = (1 << 2)
+ USER_KEEP_SESSION = (1 << 0),
+ USER_REGION_OVERLAP = (1 << 1),
+ USER_TRACKPAD_NATURAL = (1 << 2),
+ USER_OPENGL_NO_WARN_SUPPORT = (1 << 3)
} eUserpref_UI_Flag2;
/* Auto-Keying mode */
@@ -674,6 +696,13 @@ typedef enum eAutokey_Mode {
AUTOKEY_MODE_EDITKEYS = 5
} eAutokey_Mode;
+/* Zoom to frame mode */
+typedef enum eZoomFrame_Mode {
+ ZOOM_FRAME_MODE_KEEP_RANGE = 0,
+ ZOOM_FRAME_MODE_SECONDS = 1,
+ ZOOM_FRAME_MODE_KEYFRAMES = 2
+} eZoomFrame_Mode;
+
/* Auto-Keying flag
* U.autokey_flag (not strictly used when autokeying only - is also used when keyframing these days)
* note: AUTOKEY_FLAG_* is used with a macro, search for lines like IS_AUTOKEY_FLAG(INSERTAVAIL)
@@ -854,6 +883,21 @@ typedef enum eImageDrawMethod {
IMAGE_DRAW_METHOD_DRAWPIXELS = 3,
} eImageDrawMethod;
+typedef enum eUserpref_VirtualPixel {
+ VIRTUAL_PIXEL_NATIVE = 0,
+ VIRTUAL_PIXEL_DOUBLE = 1,
+} eUserpref_VirtualPixel;
+
+typedef enum eOpensubdiv_Computee_Type {
+ USER_OPENSUBDIV_COMPUTE_NONE = 0,
+ USER_OPENSUBDIV_COMPUTE_CPU = 1,
+ USER_OPENSUBDIV_COMPUTE_OPENMP = 2,
+ USER_OPENSUBDIV_COMPUTE_OPENCL = 3,
+ USER_OPENSUBDIV_COMPUTE_CUDA = 4,
+ USER_OPENSUBDIV_COMPUTE_GLSL_TRANSFORM_FEEDBACK = 5,
+ USER_OPENSUBDIV_COMPUTE_GLSL_COMPUTE = 6,
+} eOpensubdiv_Computee_Type;
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h
index a7921be44d5..6f2e347c84d 100644
--- a/source/blender/makesdna/DNA_view2d_types.h
+++ b/source/blender/makesdna/DNA_view2d_types.h
@@ -43,7 +43,7 @@ typedef struct View2D {
rcti mask; /* mask - region (in screenspace) within which 'cur' can be viewed */
float min[2], max[2]; /* min/max sizes of 'cur' rect (only when keepzoom not set) */
- float minzoom, maxzoom; /* self explanatory. allowable zoom factor range (only when keepzoom set) */
+ float minzoom, maxzoom; /* allowable zoom factor range (only when (keepzoom & V2D_LIMITZOOM)) is set */
short scroll; /* scroll - scrollbars to display (bitflag) */
short scroll_ui; /* scroll_ui - temp settings used for UI drawing of scrollers */
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 98c12e9cc11..0ba6c4dcf01 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -35,18 +35,16 @@
struct ViewDepths;
struct Object;
struct Image;
-struct Tex;
struct SpaceLink;
-struct Base;
struct BoundBox;
struct MovieClip;
struct MovieClipUser;
-struct RenderInfo;
struct RenderEngine;
struct bGPdata;
struct SmoothView3DStore;
struct wmTimer;
struct Material;
+struct GPUFX;
/* This is needed to not let VC choke on near and far... old
* proprietary MS extensions... */
@@ -61,6 +59,7 @@ struct Material;
#include "DNA_listBase.h"
#include "DNA_image_types.h"
#include "DNA_movieclip_types.h"
+#include "DNA_gpu_types.h"
/* ******************************** */
@@ -75,10 +74,11 @@ typedef struct BGpic {
struct ImageUser iuser;
struct MovieClip *clip;
struct MovieClipUser cuser;
- float xof, yof, size, blend;
+ float xof, yof, size, blend, rotation;
short view;
short flag;
- short source, pad;
+ short source;
+ char pad[6];
} BGpic;
/* ********************************* */
@@ -90,19 +90,18 @@ typedef struct RegionView3D {
float viewinv[4][4]; /* inverse of viewmat */
float persmat[4][4]; /* viewmat*winmat */
float persinv[4][4]; /* inverse of persmat */
+ float viewcamtexcofac[4]; /* offset/scale for camera glsl texcoords */
/* viewmat/persmat multiplied with object matrix, while drawing and selection */
float viewmatob[4][4];
float persmatob[4][4];
-
/* user defined clipping planes */
float clip[6][4];
float clip_local[6][4]; /* clip in object space, means we can test for clipping in editmode without first going into worldspace */
struct BoundBox *clipbb;
struct RegionView3D *localvd; /* allocated backup of its self while in localview */
- struct RenderInfo *ri;
struct RenderEngine *render_engine;
struct ViewDepths *depths;
void *gpuoffscreen;
@@ -147,6 +146,7 @@ typedef struct RegionView3D {
float rot_angle;
float rot_axis[3];
+ struct GPUFX *compositor;
} RegionView3D;
/* 3D ViewPort Struct */
@@ -203,16 +203,26 @@ typedef struct View3D {
char gridflag;
/* transform widget info */
- char twtype, twmode, twflag, pad2[2];
+ char twtype, twmode, 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 pad3[5];
+
+ 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,
+ * instead set (temporarily) from camera */
+ struct GPUFXSettings fx_settings;
void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */
struct Material *defmaterial; /* used by matcap now */
@@ -220,9 +230,21 @@ typedef struct View3D {
/* XXX deprecated? */
struct bGPdata *gpd DNA_DEPRECATED; /* Grease-Pencil Data (annotation layers) */
+ /* multiview - stereo 3d */
+ short stereo3d_flag;
+ char stereo3d_camera;
+ char pad4;
+ float stereo3d_convergence_factor;
+ float stereo3d_volume_alpha;
+ float stereo3d_convergence_alpha;
} View3D;
+/* View3D->stereo_flag (short) */
+#define V3D_S3D_DISPCAMERAS (1 << 0)
+#define V3D_S3D_DISPPLANE (1 << 1)
+#define V3D_S3D_DISPVOLUME (1 << 2)
+
/* View3D->flag (short) */
/*#define V3D_DISPIMAGE 1*/ /*UNUSED*/
#define V3D_DISPBGPICS 2
@@ -246,6 +268,11 @@ typedef struct View3D {
#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 */
+/**
+ * Disable zbuffer offset, skip calls to #ED_view3d_polygon_offset.
+ * Use when precise surface depth is needed and picking bias isn't, see T45434).
+ */
+#define RV3D_ZOFFSET_DISABLED 64
/* RegionView3d->viewlock */
#define RV3D_LOCKED (1 << 0)
@@ -269,21 +296,24 @@ typedef struct View3D {
((view >= RV3D_VIEW_FRONT) && (view <= RV3D_VIEW_BOTTOM))
/* View3d->flag2 (short) */
-#define V3D_RENDER_OVERRIDE 4
-#define V3D_SOLID_TEX 8
-#define V3D_SHOW_GPENCIL 16
-#define V3D_LOCK_CAMERA 32
-#define V3D_RENDER_SHADOW 64 /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */
-#define V3D_SHOW_RECONSTRUCTION 128
-#define V3D_SHOW_CAMERAPATH 256
-#define V3D_SHOW_BUNDLENAME 512
-#define V3D_BACKFACE_CULLING 1024
-#define V3D_RENDER_BORDER 2048
-#define V3D_SOLID_MATCAP 4096 /* user flag */
-#define V3D_SHOW_SOLID_MATCAP 8192 /* runtime flag */
-#define V3D_OCCLUDE_WIRE 16384
-#define V3D_SHADELESS_TEX 32768
-
+#define V3D_RENDER_OVERRIDE (1 << 2)
+#define V3D_SOLID_TEX (1 << 3)
+#define V3D_SHOW_GPENCIL (1 << 4)
+#define V3D_LOCK_CAMERA (1 << 5)
+#define V3D_RENDER_SHADOW (1 << 6) /* This is a runtime only flag that's used to tell draw_mesh_object() that we're doing a shadow pass instead of a regular draw */
+#define V3D_SHOW_RECONSTRUCTION (1 << 7)
+#define V3D_SHOW_CAMERAPATH (1 << 8)
+#define V3D_SHOW_BUNDLENAME (1 << 9)
+#define V3D_BACKFACE_CULLING (1 << 10)
+#define V3D_RENDER_BORDER (1 << 11)
+#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)
+
+
+/* View3d->flag3 (short) */
+#define V3D_SHOW_WORLD (1 << 0)
/* View3D->around */
#define V3D_CENTER 0
@@ -337,7 +367,11 @@ enum {
/* 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 */
+ 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),
};
#define V3D_BGPIC_EXPANDED (V3D_BGPIC_EXPANDED | V3D_BGPIC_CAMERACLIP)
@@ -350,6 +384,9 @@ enum {
#define RV3D_CAMZOOM_MIN -30
#define RV3D_CAMZOOM_MAX 600
-#endif
+/* #BKE_screen_view3d_zoom_to_fac() values above */
+#define RV3D_CAMZOOM_MIN_FACTOR 0.1657359312880714853f
+#define RV3D_CAMZOOM_MAX_FACTOR 44.9852813742385702928f
+#endif
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index a17e416b5bd..51ed8bb6c0d 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -33,6 +33,7 @@
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
+#include "DNA_userdef_types.h"
#include "DNA_ID.h"
@@ -49,16 +50,14 @@ struct wmKeyConfig;
/* forwards */
struct bContext;
-struct wmLocal;
struct bScreen;
-struct uiBlock;
struct wmSubWindow;
struct wmTimer;
-struct StructRNA;
struct PointerRNA;
struct ReportList;
struct Report;
struct uiLayout;
+struct Stereo3dFormat;
#define OP_MAX_TYPENAME 64
#define KMAP_MAX_NAME 64
@@ -165,17 +164,19 @@ enum {
WM_INIT_KEYMAP = (1<<1),
};
+/* IME is win32 only! */
+#ifndef WIN32
+# ifdef __GNUC__
+# define ime_data ime_data __attribute__ ((deprecated))
+# endif
+#endif
+
/* the savable part, rest of data is local in ghostwinlay */
typedef struct wmWindow {
struct wmWindow *next, *prev;
void *ghostwin; /* don't want to include ghost.h stuff */
- int winid; /* winid also in screens, is for retrieving this window after read */
-
- short grabcursor; /* cursor grab mode */
- short pad;
-
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 */
@@ -187,8 +188,14 @@ typedef struct wmWindow {
short cursor; /* current mouse cursor type */
short lastcursor; /* previous cursor when setting modal one */
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 pad2;
+
+ int winid; /* winid also in screens, is for retrieving this window after read */
+
+ short lock_pie_event; /* internal, lock pie creation from this event until released */
+ short last_pie_event; /* exception to the above rule for nested pies, store last pie event for operators
+ * that spawn a new pie right after destruction of last pie */
struct wmEvent *eventstate; /* storage for event system */
@@ -196,8 +203,12 @@ typedef struct wmWindow {
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 */
- void *drawdata; /* 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 */
@@ -205,8 +216,14 @@ typedef struct wmWindow {
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 */
} wmWindow;
+#ifdef ime_data
+# undef ime_data
+#endif
+
/* These two Lines with # tell makesdna this struct can be excluded. */
/* should be something like DNA_EXCLUDE
* but the preprocessor first removes all comments, spaces etc */
@@ -351,23 +368,38 @@ enum {
OPERATOR_RUNNING_MODAL = (1 << 0),
OPERATOR_CANCELLED = (1 << 1),
OPERATOR_FINISHED = (1 << 2),
-/* add this flag if the event should pass through */
+ /* add this flag if the event should pass through */
OPERATOR_PASS_THROUGH = (1 << 3),
-/* in case operator got executed outside WM code... like via fileselect */
+ /* in case operator got executed outside WM code... like via fileselect */
OPERATOR_HANDLED = (1 << 4),
+ /* used for operators that act indirectly (eg. popup menu)
+ * note: this isn't great design (using operators to trigger UI) avoid where possible. */
+ OPERATOR_INTERFACE = (1 << 5),
};
-#define OPERATOR_FLAGS_ALL (OPERATOR_RUNNING_MODAL | OPERATOR_CANCELLED | OPERATOR_FINISHED | \
- OPERATOR_PASS_THROUGH | OPERATOR_HANDLED)
+#define OPERATOR_FLAGS_ALL ( \
+ OPERATOR_RUNNING_MODAL | \
+ OPERATOR_CANCELLED | \
+ OPERATOR_FINISHED | \
+ OPERATOR_PASS_THROUGH | \
+ OPERATOR_HANDLED | \
+ OPERATOR_INTERFACE | \
+ 0)
/* sanity checks for debug mode only */
#define OPERATOR_RETVAL_CHECK(ret) (void)ret, BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret)
/* wmOperator flag */
enum {
- OP_GRAB_POINTER = (1 << 0),
/* low level flag so exec() operators can tell if they were invoked, use with care.
* typically this shouldn't make any difference, but it rare cases its needed (see smooth-view) */
- OP_IS_INVOKE = (1 << 1),
+ OP_IS_INVOKE = (1 << 0),
+
+ /* When the cursor is grabbed */
+ OP_IS_MODAL_GRAB_CURSOR = (1 << 1),
+
+ /* allow modal operators to have the region under the cursor for their context
+ * (the regiontype is maintained to prevent errors) */
+ OP_IS_MODAL_CURSOR_REGION = (1 << 2),
};
#endif /* __DNA_WINDOWMANAGER_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 50542797f0b..73bfa7a36fe 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -128,6 +128,7 @@ typedef struct World {
/* nodes */
struct bNodeTree *nodetree;
+ ListBase gpumaterial; /* runtime */
} World;
/* **************** WORLD ********************* */
@@ -153,15 +154,13 @@ typedef struct World {
/* aomix */
enum {
WO_AOADD = 0,
+#ifdef DNA_DEPRECATED
WO_AOSUB = 1, /* deprecated */
WO_AOADDSUB = 2, /* deprecated */
+#endif
WO_AOMUL = 3,
};
-#if (DNA_DEPRECATED_GCC_POISON == 1)
-#pragma GCC poison WO_AOSUB WO_AOADDSUB
-#endif
-
/* ao_samp_method - methods for sampling the AO hemi */
#define WO_AOSAMP_CONSTANT 0
#define WO_AOSAMP_HALTON 1
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 317141b14e3..52487edfd2b 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -57,7 +57,7 @@ add_executable(makesdna ${SRC} ${SRC_DNA_INC})
# Output dna.c
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
- COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
+ COMMAND "$<TARGET_FILE:makesdna>" ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/
DEPENDS makesdna
)
@@ -74,7 +74,7 @@ set(INC_SYS
set(SRC
dna_genfile.c
- dna.c
+ ${CMAKE_CURRENT_BINARY_DIR}/dna.c
${SRC_DNA_INC}
)
@@ -97,6 +97,7 @@ set(SRC
../../blenlib/intern/BLI_mempool.c
../../blenlib/intern/listbase.c
../../blenlib/intern/BLI_ghash.c
+ ../../blenlib/intern/hash_mm2a.c
)
blender_add_lib(bf_dna_blenlib "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index f60562f1ac9..16fbcbebe50 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -64,7 +64,7 @@
*
* Create a structDNA: only needed when one of the input include (.h) files change.
* File Syntax:
- * <pre>
+ * \code{.unparsed}
* SDNA (4 bytes) (magic number)
* NAME (4 bytes)
* <nr> (4 bytes) amount of names (int)
@@ -86,13 +86,13 @@
* STRC (4 bytes)
* <nr> amount of structs (int)
* <typenr><nr_of_elems> <typenr><namenr> <typenr><namenr> ...
- *</pre>
+ * \endcode
*
* **Remember to read/write integer and short aligned!**
*
* While writing a file, the names of a struct is indicated with a type number,
* to be found with: ``type = DNA_struct_find_nr(SDNA *, const char *)``
- * The value of ``type`` corresponds with the the index within the structs array
+ * The value of ``type`` corresponds with the index within the structs array
*
* For the moment: the complete DNA file is included in a .blend file. For
* the future we can think of smarter methods, like only included the used
@@ -311,7 +311,21 @@ int DNA_struct_find_nr(SDNA *sdna, const char *str)
}
#ifdef WITH_DNA_GHASH
- return (intptr_t)BLI_ghash_lookup(sdna->structs_map, str) - 1;
+ {
+ void **index_p;
+ int a;
+
+ index_p = BLI_ghash_lookup_p(sdna->structs_map, str);
+
+ if (index_p) {
+ a = GET_INT_FROM_POINTER(*index_p);
+ sdna->lastfind = a;
+ }
+ else {
+ a = -1;
+ }
+ return a;
+ }
#else
{
int a;
@@ -525,7 +539,7 @@ static void init_structDNA(SDNA *sdna, bool do_endian_swap)
for (nr = 0; nr < sdna->nr_structs; nr++) {
sp = sdna->structs[nr];
- BLI_ghash_insert(sdna->structs_map, (void *)sdna->types[sp[0]], (void *)(nr + 1));
+ BLI_ghash_insert(sdna->structs_map, sdna->types[sp[0]], SET_INT_IN_POINTER(nr));
}
#endif
}
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 51a0c5a7b0f..a7ff4244d5f 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -73,6 +73,7 @@ static const char *includefiles[] = {
"DNA_key_types.h",
"DNA_text_types.h",
"DNA_packedFile_types.h",
+ "DNA_gpu_types.h",
"DNA_camera_types.h",
"DNA_image_types.h",
"DNA_texture_types.h",
@@ -538,6 +539,11 @@ static void *read_file_data(char *filename, int *r_len)
*r_len = ftell(fp);
fseek(fp, 0L, SEEK_SET);
+ if (*r_len == -1) {
+ fclose(fp);
+ return NULL;
+ }
+
data = MEM_mallocN(*r_len, "read_file_data");
if (!data) {
*r_len = -1;
@@ -909,7 +915,7 @@ static void dna_write(FILE *file, const void *pntr, const int size)
int i;
const char *data;
- data = (char *) pntr;
+ data = (const char *)pntr;
for (i = 0; i < size; i++) {
fprintf(file, "%d, ", data[i]);