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:
authorBenoit Bolsee <benoit.bolsee@online.be>2011-09-07 19:34:04 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2011-09-07 19:34:04 +0400
commitdbd6658d737b1592a633ddf6397be14e50e434d9 (patch)
tree57081721d70622a3c3141909b258f9bce8a5b1e3 /source/blender/makesdna
parentb5bd86e5907c3fa98546dabeda9703dfb15862f4 (diff)
parent884fc84793be1c5fdd6643ad267331381f8e1c6b (diff)
svn merge -r 37306:39975 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h1
-rw-r--r--source/blender/makesdna/DNA_action_types.h13
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h6
-rw-r--r--source/blender/makesdna/DNA_anim_types.h34
-rw-r--r--source/blender/makesdna/DNA_armature_types.h15
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h7
-rw-r--r--source/blender/makesdna/DNA_curve_types.h2
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h2
-rw-r--r--source/blender/makesdna/DNA_image_types.h6
-rw-r--r--source/blender/makesdna/DNA_ipo_types.h2
-rw-r--r--source/blender/makesdna/DNA_material_types.h2
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h5
-rw-r--r--source/blender/makesdna/DNA_nla_types.h2
-rw-r--r--source/blender/makesdna/DNA_node_types.h171
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h5
-rw-r--r--source/blender/makesdna/DNA_object_force.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h11
-rw-r--r--source/blender/makesdna/DNA_particle_types.h5
-rw-r--r--source/blender/makesdna/DNA_scene_types.h44
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h5
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h48
-rw-r--r--source/blender/makesdna/DNA_sound_types.h9
-rw-r--r--source/blender/makesdna/DNA_space_types.h30
-rw-r--r--source/blender/makesdna/DNA_speaker_types.h69
-rw-r--r--source/blender/makesdna/DNA_texture_types.h1
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h51
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h14
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h42
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt26
-rw-r--r--source/blender/makesdna/intern/SConscript1
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c42
-rw-r--r--source/blender/makesdna/intern/makesdna.c48
32 files changed, 524 insertions, 197 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 4cf9f47041b..8fd9f49cd0a 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -178,6 +178,7 @@ typedef struct PreviewImage {
#define ID_SCRN MAKE_ID2('S', 'N') /* (depreciated?) */
#define ID_VF MAKE_ID2('V', 'F') /* VectorFont */
#define ID_TXT MAKE_ID2('T', 'X') /* Text */
+#define ID_SPK MAKE_ID2('S', 'K') /* Speaker */
#define ID_SO MAKE_ID2('S', 'O') /* Sound */
#define ID_GR MAKE_ID2('G', 'R') /* Group */
#define ID_ID MAKE_ID2('I', 'D') /* (internal use only) */
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 0716d1ddbf2..a820e59779f 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -1,6 +1,4 @@
-/*
- * $Id$
- *
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -519,6 +517,9 @@ typedef struct bDopeSheet {
int filterflag; /* flags to use for filtering data */
int flag; /* standard flags */
+
+ int renameIndex; /* index+1 of channel to rename - only gets set by renaming operator */
+ int pad;
} bDopeSheet;
@@ -552,6 +553,7 @@ typedef enum eDopeSheet_FilterFlag {
ADS_FILTER_NOARM = (1<<18),
ADS_FILTER_NONTREE = (1<<19),
ADS_FILTER_NOTEX = (1<<20),
+ ADS_FILTER_NOSPK = (1<<21),
/* 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 */
@@ -561,12 +563,13 @@ typedef enum eDopeSheet_FilterFlag {
ADS_FILTER_BY_FCU_NAME = (1<<27), /* for F-Curves, filter by the displayed name (i.e. to isolate all Location curves only) */
/* combination filters (some only used at runtime) */
- ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM)
+ ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM|ADS_FILTER_NOSPK)
} eDopeSheet_FilterFlag;
/* DopeSheet general flags */
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_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 */
} eDopeSheet_Flag;
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 7aa8e59effb..239903208ec 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -56,9 +56,12 @@ typedef struct bActionActuator {
char frameProp[32]; /* Set this property to the actions current frame */
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 strideaxis; /* Displacement axis */
+ short pad;
float stridelength; /* Displacement incurred by cycle */ // not in use
+ float layer_weight; /* How much of the previous layer to use for blending. (<0 = disable, 0 = add mode) */
} bActionActuator;
typedef struct Sound3D
@@ -120,6 +123,7 @@ typedef struct bObjectActuator {
struct Object *reference;
} bObjectActuator;
+/* deprecated, handled by bActionActuator now */
typedef struct bIpoActuator {
short flag, type;
float sta, end;
@@ -133,7 +137,7 @@ typedef struct bIpoActuator {
typedef struct bCameraActuator {
struct Object *ob;
float height, min, max;
- float pad;
+ float damping;
short pad1, axis;
float pad2;
} bCameraActuator ;
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index 4b649031f97..e1dfd652900 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -62,6 +60,11 @@ typedef struct FModifier {
short flag; /* settings for the modifier */
float influence; /* the amount that the modifier should influence the value */
+
+ float sfra; /* start frame of restricted frame-range */
+ float efra; /* end frame of restricted frame-range */
+ float blendin; /* number of frames from sfra before modifier takes full influence */
+ float blendout; /* number of frames from efra before modifier fades out */
} FModifier;
/* Types of F-Curve modifier
@@ -86,13 +89,17 @@ typedef enum eFModifier_Types {
/* F-Curve Modifier Settings */
typedef enum eFModifier_Flags {
/* modifier is not able to be evaluated for some reason, and should be skipped (internal) */
- FMODIFIER_FLAG_DISABLED = (1<<0),
+ FMODIFIER_FLAG_DISABLED = (1<<0),
/* modifier's data is expanded (in UI) */
- FMODIFIER_FLAG_EXPANDED = (1<<1),
+ FMODIFIER_FLAG_EXPANDED = (1<<1),
/* modifier is active one (in UI) for editing purposes */
- FMODIFIER_FLAG_ACTIVE = (1<<2),
+ FMODIFIER_FLAG_ACTIVE = (1<<2),
/* user wants modifier to be skipped */
- FMODIFIER_FLAG_MUTED = (1<<3)
+ FMODIFIER_FLAG_MUTED = (1<<3),
+ /* restrict range that F-Modifier can be considered over */
+ FMODIFIER_FLAG_RANGERESTRICT = (1<<4),
+ /* use influence control */
+ FMODIFIER_FLAG_USEINFLUENCE = (1<<5)
} eFModifier_Flags;
/* --- */
@@ -280,8 +287,12 @@ typedef enum eDriverTarget_Flag {
DTAR_FLAG_STRUCT_REF = (1<<0),
/* idtype can only be 'Object' */
DTAR_FLAG_ID_OB_ONLY = (1<<1),
- /* toggles localspace (where transforms are manually obtained) */
+
+ /* "localspace" flags */
+ /* base flag - basically "pre parent+constraints" */
DTAR_FLAG_LOCALSPACE = (1<<2),
+ /* include constraints transformed to space including parents */
+ DTAR_FLAG_LOCAL_CONSTS = (1<<3),
} eDriverTarget_Flag;
/* Transform Channels for Driver Targets */
@@ -460,7 +471,9 @@ typedef enum eFCurve_Flags {
FCURVE_PROTECTED = (1<<3),
/* fcurve will not be evaluated for the next round */
FCURVE_MUTED = (1<<4),
+
/* fcurve uses 'auto-handles', which stay horizontal... */
+ // DEPRECATED
FCURVE_AUTO_HANDLES = (1<<5),
/* skip evaluation, as RNA-path cannot be resolved (similar to muting, but cannot be set by user) */
@@ -570,6 +583,8 @@ typedef struct NlaStrip {
short type; /* type of NLA strip */
+ void *speaker_handle; /* handle for speaker objects */
+
int flag; /* settings */
int pad2;
} NlaStrip;
@@ -636,7 +651,10 @@ typedef enum eNlaStrip_Type {
/* 'transition' - blends between the adjacent strips */
NLASTRIP_TYPE_TRANSITION,
/* 'meta' - a strip which acts as a container for a few others */
- NLASTRIP_TYPE_META
+ NLASTRIP_TYPE_META,
+
+ /* 'emit sound' - a strip which is used for timing when speaker emits sounds */
+ NLASTRIP_TYPE_SOUND
} eNlaStrip_Type;
/* NLA Tracks ------------------------------------- */
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 3547101612f..442fc3ddcce 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -96,7 +94,9 @@ typedef struct bArmature {
void *sketch; /* sketch struct for etch-a-ton */
int flag;
- int drawtype;
+ int drawtype;
+ int gevertdeformer; /* how vertex deformation is handled in the ge */
+ int pad;
short deformflag;
short pathflag;
@@ -136,9 +136,16 @@ typedef enum eArmature_Drawtype {
ARM_OCTA = 0,
ARM_LINE,
ARM_B_BONE,
- ARM_ENVELOPE
+ ARM_ENVELOPE,
+ ARM_WIRE
} eArmature_Drawtype;
+/* armature->gevertdeformer */
+typedef enum eArmature_VertDeformer {
+ ARM_VDEF_BLENDER,
+ ARM_VDEF_BGE_CPU
+} eArmature_VertDeformer;
+
/* armature->deformflag */
typedef enum eArmature_DeformFlag {
ARM_DEF_VGROUP = (1<<0),
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 1d752fce4ef..1be2c811a1b 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -677,7 +675,10 @@ typedef enum eRotLimit_Flags {
/* distance limit constraint */
/* bDistLimitConstraint->flag */
typedef enum eDistLimit_Flag {
- LIMITDIST_USESOFT = (1<<0)
+ /* "soft" cushion effect when reaching the limit sphere */ // NOT IMPLEMENTED!
+ LIMITDIST_USESOFT = (1<<0),
+ /* as for all Limit constraints - allow to be used during transform? */
+ LIMITDIST_TRANSFORM = (1<<1)
} eDistLimit_Flag;
/* bDistLimitConstraint->mode */
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index b51612037fc..a38b33e6640 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -314,7 +314,7 @@ typedef enum eBezTriple_Handle {
HD_AUTO,
HD_VECT,
HD_ALIGN,
- HD_AUTO_ANIM /* not real handle type, but is just used as dummy item for anim code */
+ HD_AUTO_ANIM /* auto-clamped handles for animation */
} eBezTriple_Handle;
/* interpolation modes (used only for BezTriple->ipo) */
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 6eb5f64ffc3..b259d592864 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 99ed2319415..dd033339ca4 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -102,7 +102,8 @@ typedef struct Image {
short animspeed;
/* for generated images */
- short gen_x, gen_y, gen_type;
+ short gen_x, gen_y;
+ char gen_type, gen_flag;
/* display aspect - for UV editing images resized for faster openGL display */
float aspx, aspy;
@@ -136,5 +137,8 @@ typedef struct Image {
#define IMA_MAX_RENDER_TEXT 512
#define IMA_MAX_RENDER_SLOT 8
+/* gen_flag */
+#define IMA_GEN_FLOAT 1
+
#endif
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index 5dba9154a3a..43a4b99bc33 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 1489593f7f6..060b1bf42d1 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -161,7 +161,7 @@ typedef struct Material {
int mapto_textured; /* render-time cache to optimise texture lookups */
short shadowonly_flag; /* "shadowsonly" type */
- short pad;
+ short index; /* custom index for render passes */
ListBase gpumaterial; /* runtime */
} Material;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index ac5e411e18b..d41d23f1ee6 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -625,6 +625,7 @@ typedef struct MultiresModifierData {
typedef enum {
eMultiresModifierFlag_ControlEdges = (1<<0),
+ eMultiresModifierFlag_PlainUv = (1<<1),
} MultiresModifierFlag;
typedef struct FluidsimModifierData {
@@ -712,16 +713,16 @@ typedef struct ShapeKeyModifierData {
typedef struct SolidifyModifierData {
ModifierData modifier;
- char defgrp_name[32]; /* name of vertex group to use */
+ char defgrp_name[32]; /* name of vertex group to use */
float offset; /* new surface offset level*/
float offset_fac; /* midpoint of the offset */
+ float offset_fac_vg; /* factor for the minimum weight to use when vgroups are used, avoids 0.0 weights giving duplicate geometry */
float crease_inner;
float crease_outer;
float crease_rim;
int flag;
short mat_ofs;
short mat_ofs_rim;
- int pad;
} SolidifyModifierData;
#define MOD_SOLIDIFY_RIM (1<<0)
diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h
index c64dda2afd0..b92cf5c67e4 100644
--- a/source/blender/makesdna/DNA_nla_types.h
+++ b/source/blender/makesdna/DNA_nla_types.h
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 03387c3a63a..3a51a6a56a4 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -38,26 +38,29 @@
#include "DNA_vec_types.h"
#include "DNA_listBase.h"
+struct ID;
struct ListBase;
struct SpaceNode;
struct bNodeLink;
struct bNodeType;
-struct bNodeGroup;
+struct bNodeTreeExec;
struct AnimData;
struct bGPdata;
struct uiBlock;
#define NODE_MAXSTR 32
-
typedef struct bNodeStack {
float vec[4];
- float min, max; /* min/max for values (UI writes it, execute might use it) */
+ float min, max;
void *data;
short hasinput; /* when input has link, tagged before executing */
short hasoutput; /* when output is linked, tagged before executing */
short datatype; /* type of data pointer */
short sockettype; /* type of socket stack comes from, to remap linking different sockets */
+ short is_copy; /* data is a copy of external data (no freeing) */
+ short external; /* data is used by external nodes (no freeing) */
+ short pad[2];
} bNodeStack;
/* ns->datatype, shadetree only */
@@ -68,50 +71,58 @@ typedef struct bNodeSocket {
struct bNodeSocket *next, *prev, *new_sock;
char name[32];
- bNodeStack ns; /* custom data for inputs, only UI writes in this */
+
+ void *storage; /* custom storage */
short type, flag;
short limit; /* max. number of links */
-
- /* stack data info (only during execution!) */
- short stack_type; /* type of stack reference */
- /* XXX only one of stack_ptr or stack_index is used (depending on stack_type).
- * could store the index in the pointer with SET_INT_IN_POINTER (a bit ugly).
- * (union won't work here, not supported by DNA)
- */
- struct bNodeStack *stack_ptr; /* constant input value */
- short stack_index; /* local stack index or external input number */
short pad1;
float locx, locy;
- /* internal data to retrieve relations and groups */
+ void *default_value; /* default input value used for unlinked sockets */
+
+ /* execution data */
+ short stack_index; /* local stack index */
+ short pad2;
+ int pad3;
+ void *cache; /* cached data from execution */
+ /* internal data to retrieve relations and groups */
int own_index; /* group socket identifiers, to find matching pairs after reading files */
- struct bNodeSocket *groupsock;
int to_index; /* XXX deprecated, only used for restoring old group node links */
- int pad2;
+ struct bNodeSocket *groupsock;
- struct bNodeLink *link; /* a link pointer, set in nodeSolveOrder() */
+ struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */
+
+ /* DEPRECATED only needed for do_versions */
+ bNodeStack ns; /* custom data for inputs, only UI writes in this */
} bNodeSocket;
/* sock->type */
-#define SOCK_VALUE 0
-#define SOCK_VECTOR 1
-#define SOCK_RGBA 2
+#define SOCK_FLOAT 0
+#define SOCK_VECTOR 1
+#define SOCK_RGBA 2
+#define SOCK_INT 3
+#define SOCK_BOOLEAN 4
+#define SOCK_MESH 5
+#define NUM_SOCKET_TYPES 6 /* must be last! */
+
+/* socket side (input/output) */
+#define SOCK_IN 1
+#define SOCK_OUT 2
/* sock->flag, first bit is select */
- /* hidden is user defined, to hide unused */
+ /* hidden is user defined, to hide unused */
#define SOCK_HIDDEN 2
- /* only used now for groups... */
-#define SOCK_IN_USE 4
- /* unavailable is for dynamic sockets */
+ /* only used now for groups... */
+#define SOCK_IN_USE 4 /* XXX deprecated */
+ /* unavailable is for dynamic sockets */
#define SOCK_UNAVAIL 8
-
-/* sock->stack_type */
-#define SOCK_STACK_LOCAL 1 /* part of the local tree stack */
-#define SOCK_STACK_EXTERN 2 /* use input stack pointer */
-#define SOCK_STACK_CONST 3 /* use pointer to constant input value */
+ /* dynamic socket (can be modified by user) */
+#define SOCK_DYNAMIC 16
+ /* group socket should not be exposed */
+#define SOCK_INTERNAL 32
typedef struct bNodePreview {
unsigned char *rect;
@@ -119,7 +130,6 @@ typedef struct bNodePreview {
int pad;
} bNodePreview;
-
/* limit data in bNode to what we want to see saved? */
typedef struct bNode {
struct bNode *next, *prev, *new_node;
@@ -132,11 +142,14 @@ typedef struct bNode {
short nr; /* number of this node in list, used for UI exec events */
ListBase inputs, outputs;
+ struct bNode *parent; /* parent node */
struct ID *id; /* optional link to libdata */
void *storage; /* custom data, must be struct, for storage in file */
float locx, locy; /* root offset for drawing */
- float width, miniwidth;
+ float width, height; /* node custom width and height */
+ float miniwidth; /* node width if hidden */
+ int pad;
char label[32]; /* custom user-defined label */
short custom1, custom2; /* to be abused for buttons */
float custom3, custom4;
@@ -151,7 +164,6 @@ typedef struct bNode {
struct uiBlock *block; /* runtime during drawing */
struct bNodeType *typeinfo; /* lookup of callbacks and defaults */
-
} bNode;
/* node->flag */
@@ -163,11 +175,17 @@ typedef struct bNode {
#define NODE_ACTIVE_ID 32
#define NODE_DO_OUTPUT 64
#define NODE_GROUP_EDIT 128
- /* free test flag, undefined */
+ /* free test flag, undefined */
#define NODE_TEST 256
- /* composite: don't do node but pass on buffer(s) */
+ /* composite: don't do node but pass on buffer(s) */
#define NODE_MUTED 512
-#define NODE_CUSTOM_NAME 1024 /* deprecated! */
+#define NODE_CUSTOM_NAME 1024 /* deprecated! */
+ /* group node types: use const outputs by default */
+#define NODE_CONST_OUTPUT (1<<11)
+ /* node is always behind others */
+#define NODE_BACKGROUND (1<<12)
+ /* automatic flag for nodes included in transforms */
+#define NODE_TRANSFORM (1<<13)
typedef struct bNodeLink {
struct bNodeLink *next, *prev;
@@ -175,10 +193,14 @@ typedef struct bNodeLink {
bNode *fromnode, *tonode;
bNodeSocket *fromsock, *tosock;
- int flag, pad;
-
+ int flag;
+ int pad;
} bNodeLink;
+/* link->flag */
+#define NODE_LINK_VALID 1 /* link has been successfully validated */
+#define NODE_LINKFLAG_HILITE 2
+
/* the basis for a Node tree, all links and nodes reside internal here */
/* only re-usable node trees are in the library though, materials and textures allocate own tree struct */
typedef struct bNodeTree {
@@ -189,19 +211,24 @@ typedef struct bNodeTree {
ListBase nodes, links;
- bNodeStack *stack; /* stack is only while executing, no read/write in file */
- struct ListBase *threadstack; /* same as above */
-
int type, init; /* set init on fileread */
- int stacksize; /* amount of elements in stack */
int cur_index; /* sockets in groups have unique identifiers, adding new sockets always
will increase this counter */
- int flag, pad;
+ int flag;
+ int update; /* update flags */
+
+ int nodetype; /* specific node type this tree is used for */
- ListBase alltypes; /* type definitions */
ListBase inputs, outputs; /* external sockets for group nodes */
-
- int pad2[2];
+
+ /* execution data */
+ /* XXX It would be preferable to completely move this data out of the underlying node tree,
+ * so node tree execution could finally run independent of the tree itself. This would allow node trees
+ * to be merely linked by other data (materials, textures, etc.), as ID data is supposed to.
+ * Execution data is generated from the tree once at execution start and can then be used
+ * as long as necessary, even while the tree is being modified.
+ */
+ struct bNodeTreeExec *execdata;
/* callbacks */
void (*progress)(void *, float progress);
@@ -212,20 +239,59 @@ typedef struct bNodeTree {
} bNodeTree;
/* ntree->type, index */
-#define NTREE_SHADER 0
-#define NTREE_COMPOSIT 1
-#define NTREE_TEXTURE 2
+#define NTREE_SHADER 0
+#define NTREE_COMPOSIT 1
+#define NTREE_TEXTURE 2
+#define NUM_NTREE_TYPES 3
/* ntree->init, flag */
-#define NTREE_TYPE_INIT 1
-#define NTREE_EXEC_INIT 2
+#define NTREE_TYPE_INIT 1
/* ntree->flag */
#define NTREE_DS_EXPAND 1 /* for animation editors */
-/* XXX not nice, but needed as a temporary flag
+/* XXX not nice, but needed as a temporary flags
* for group updates after library linking.
*/
-#define NTREE_DO_VERSIONS 1024
+#define NTREE_DO_VERSIONS_GROUP_EXPOSE 1024
+
+/* ntree->update */
+#define NTREE_UPDATE 0xFFFF /* generic update flag (includes all others) */
+#define NTREE_UPDATE_LINKS 1 /* links have been added or removed */
+#define NTREE_UPDATE_NODES 2 /* nodes or sockets have been added or removed */
+#define NTREE_UPDATE_GROUP_IN 16 /* group inputs have changed */
+#define NTREE_UPDATE_GROUP_OUT 32 /* group outputs have changed */
+#define NTREE_UPDATE_GROUP 48 /* group has changed (generic flag including all other group flags) */
+
+
+/* socket value structs for input buttons */
+
+typedef struct bNodeSocketValueInt {
+ int subtype; /* RNA subtype */
+ int value;
+ int min, max;
+} bNodeSocketValueInt;
+
+typedef struct bNodeSocketValueFloat {
+ int subtype; /* RNA subtype */
+ float value;
+ float min, max;
+} bNodeSocketValueFloat;
+
+typedef struct bNodeSocketValueBoolean {
+ char value;
+ char pad[3];
+} bNodeSocketValueBoolean;
+
+typedef struct bNodeSocketValueVector {
+ int subtype; /* RNA subtype */
+ float value[3];
+ float min, max;
+} bNodeSocketValueVector;
+
+typedef struct bNodeSocketValueRGBA {
+ float value[4];
+} bNodeSocketValueRGBA;
+
/* data structs, for node->storage */
@@ -350,7 +416,6 @@ typedef struct TexNodeOutput {
char name[32];
} TexNodeOutput;
-
/* comp channel matte */
#define CMP_NODE_CHANNEL_MATTE_CS_RGB 1
#define CMP_NODE_CHANNEL_MATTE_CS_HSV 2
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index 6f4c16cb7f3..578bf8dd415 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -69,7 +69,7 @@ typedef struct FluidsimSettings {
short viscosityMode;
short viscosityExponent;
/* gravity strength */
- float gravx,gravy,gravz;
+ float grav[3];
/* anim start end time (in seconds) */
float animStart, animEnd;
/* bake start end time (in blender frames) */
@@ -161,6 +161,9 @@ typedef struct FluidsimSettings {
#define OB_FSBND_FREESLIP (1<<(OB_TYPEFLAG_START+4))
#define OB_FSINFLOW_LOCALCOORD (1<<(OB_TYPEFLAG_START+5))
+/* surface generation flag (part of enabling chapter 6 of "Free Surface Flows with Moving and Deforming Objects for LBM") */
+#define OB_FSSG_NOOBS (1<<(OB_TYPEFLAG_START+6))
+
// guiDisplayMode particle flags
#define OB_FSDOM_GEOM 1
#define OB_FSDOM_PREVIEW 2
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 37568a22f54..fc8ce1b5820 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -420,7 +420,7 @@ typedef struct SoftBody {
#define OB_SB_SELF 512
#define OB_SB_FACECOLL 1024
#define OB_SB_EDGECOLL 2048
-#define OB_SB_COLLFINAL 4096
+#define OB_SB_COLLFINAL 4096 /* deprecated */
#define OB_SB_BIG_UI 8192
#define OB_SB_AERO_ANGLE 16384
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index f75dab9440c..8750ee9e906 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -252,12 +252,11 @@ typedef struct Object {
struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */
struct DerivedMesh *derivedDeform, *derivedFinal;
- int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
+ unsigned int lastDataMask; /* the custom data layer mask that was last used to calculate derivedDeform and derivedFinal */
+ unsigned int customdata_mask; /* (extra) custom data layer mask to use for creating derivedmesh, set by depsgraph */
unsigned int state; /* bit masks of game controllers that are active */
unsigned int init_state; /* bit masks of initial state as recorded by the users */
- int pad2;
-
ListBase gpulamp; /* runtime, for lamps only */
ListBase pc_ids;
ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */
@@ -293,10 +292,6 @@ typedef struct DupliObject {
float orco[3], uv[2];
} DupliObject;
-/* this work object is defined in object.c */
-extern Object workob;
-
-
/* **************** OBJECT ********************* */
/* used many places... should be specialized */
@@ -313,6 +308,8 @@ extern Object workob;
#define OB_LAMP 10
#define OB_CAMERA 11
+#define OB_SPEAKER 12
+
// #define OB_WAVE 21
#define OB_LATTICE 22
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 09053848b28..69ee530c0b6 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -89,7 +89,8 @@ typedef struct ParticleDupliWeight {
struct ParticleDupliWeight *next, *prev;
struct Object *ob;
short count;
- short flag, rt[2];
+ short flag;
+ short index, rt; /* only updated on file save and used on file load */
} ParticleDupliWeight;
typedef struct ParticleData {
@@ -168,7 +169,7 @@ typedef struct ParticleSettings {
/* billboards */
short bb_align, bb_uv_split, bb_anim, bb_split_offset;
- float bb_tilt, bb_rand_tilt, bb_offset[2];
+ float bb_tilt, bb_rand_tilt, bb_offset[2], bb_size[2], bb_vel_head, bb_vel_tail;
/* draw color */
float color_vec_max;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index ccc306e777b..be44b87d48e 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -126,6 +126,8 @@ typedef struct FFMpegCodecData {
int video_bitrate;
int audio_bitrate;
int audio_mixrate;
+ int audio_channels;
+ int audio_pad;
float audio_volume;
int gop_size;
int flags;
@@ -147,6 +149,8 @@ typedef struct AudioData {
int distance_model;
short flag;
short pad;
+ float volume;
+ float pad2;
} AudioData;
typedef struct SceneRenderLayer {
@@ -201,6 +205,7 @@ typedef struct SceneRenderLayer {
#define SCE_PASS_RAYHITS (1<<15)
#define SCE_PASS_EMIT (1<<16)
#define SCE_PASS_ENVIRONMENT (1<<17)
+#define SCE_PASS_INDEXMA (1<<18)
/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
@@ -253,19 +258,12 @@ typedef struct RenderData {
*/
short yparts;
- short winpos, planes, imtype, subimtype;
-
- /** Mode bits: */
- /* 0: Enable backbuffering for images */
- short bufflag;
- short quality;
+ short planes, imtype, subimtype, quality;
/**
* Render to image editor, fullscreen or to new window.
*/
short displaymode;
-
- short rpad1, rpad2;
/**
* Flags for render settings. Use bit-masking to access the settings.
@@ -322,11 +320,7 @@ typedef struct RenderData {
/**
* Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
*/
- float xasp;
- /**
- * Adjustment factors for the aspect ratio in the x direction, was a short in 2.45
- */
- float yasp;
+ float xasp, yasp;
float frs_sec_base;
@@ -349,8 +343,8 @@ typedef struct RenderData {
short bake_normal_space, bake_quad_split;
float bake_maxdist, bake_biasdist, bake_pad;
- /* paths to backbufffer, output */
- char backbuf[160], pic[160];
+ /* path to render output */
+ char pic[240];
/* stamps flags. */
int stamp;
@@ -457,7 +451,8 @@ typedef struct GameData {
/*
* Radius of the activity bubble, in Manhattan length. Objects
* outside the box are activity-culled. */
- float activityBoxRadius; //it's not being used ANYWHERE !!!!!!!!!!!!!!
+ float activityBoxRadius;
+
/*
* bit 3: (gameengine): Activity culling is enabled.
* bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
@@ -477,7 +472,8 @@ typedef struct GameData {
/* stereo/dome mode */
struct GameDome dome;
- short stereoflag, stereomode, xsch, ysch; //xsch and ysch used for backwards compat.
+ short stereoflag, stereomode;
+ short pad2, pad3;
float eyeseparation, pad1;
RecastData recastData;
} GameData;
@@ -509,6 +505,7 @@ typedef struct GameData {
#define OBSTSIMULATION_TOI_cells 2
/* GameData.flag */
+#define GAME_RESTRICT_ANIM_UPDATES (1 << 0)
#define GAME_ENABLE_ALL_FRAMES (1 << 1)
#define GAME_SHOW_DEBUG_PROPS (1 << 2)
#define GAME_SHOW_FRAMERATE (1 << 3)
@@ -525,6 +522,7 @@ typedef struct GameData {
#define GAME_SHOW_MOUSE (1 << 14)
#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 15)
#define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15)
+/* Note: GameData.flag is a short (max 16 flags). To add more flags, GameData.flag needs to be an int */
/* GameData.matmode */
#define GAME_MAT_TEXFACE 0
@@ -837,6 +835,7 @@ typedef struct Scene {
void *sound_scene;
void *sound_scene_handle;
void *sound_scrub_handle;
+ void *speaker_handles;
void *fps_info; /* (runtime) info/cache used for presenting playback framerate info to the user */
@@ -1109,6 +1108,7 @@ typedef struct Scene {
#define SCE_SNAP_ROTATE 2
#define SCE_SNAP_PEEL_OBJECT 4
#define SCE_SNAP_PROJECT 8
+#define SCE_SNAP_NO_SELF 16
/* toolsettings->snap_target */
#define SCE_SNAP_TARGET_CLOSEST 0
#define SCE_SNAP_TARGET_CENTER 1
@@ -1141,7 +1141,8 @@ typedef struct Scene {
#define PROP_SHARP 3
#define PROP_LIN 4
#define PROP_CONST 5
-#define PROP_RANDOM 6
+#define PROP_RANDOM 6
+#define PROP_MODE_MAX 7
/* toolsettings->proportional */
#define PROP_EDIT_OFF 0
@@ -1162,9 +1163,10 @@ typedef struct Scene {
#define F_DUPLI 3
/* audio->flag */
-#define AUDIO_MUTE 1
-#define AUDIO_SYNC 2
-#define AUDIO_SCRUB 4
+#define AUDIO_MUTE (1<<0)
+#define AUDIO_SYNC (1<<1)
+#define AUDIO_SCRUB (1<<2)
+#define AUDIO_VOLUME_ANIMATED (1<<3)
#define FFMPEG_MULTIPLEX_AUDIO 1 /* deprecated, you can choose none as audiocodec now */
#define FFMPEG_AUTOSPLIT_OUTPUT 2
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index e5f924b5fa6..829d1eee03b 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -54,7 +54,10 @@ typedef struct SDNA {
(sp[2], sp[3]), (sp[4], sp[5]), .. are the member
type and name numbers respectively */
-
+
+ struct GHash *structs_map; /* ghash for faster lookups,
+ requires WITH_DNA_GHASH to be used for now */
+
/* wrong place for this really, its a simple
* cache for findstruct_nr.
*/
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 3e7654bcf47..588e8458de1 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -71,12 +71,19 @@ typedef struct StripColorBalance {
} StripColorBalance;
typedef struct StripProxy {
- char dir[160];
- char file[80];
- struct anim *anim;
- short size;
- short quality;
- int pad;
+ char dir[160]; // custom directory for index and proxy files
+ // (defaults to BL_proxy)
+
+ char file[80]; // custom file
+ struct anim *anim; // custom proxy anim file
+
+ short tc; // time code in use
+
+ short quality; // proxy build quality
+ short build_size_flags;// size flags (see below) of all proxies
+ // to build
+ short build_tc_flags; // time code flags (see below) of all tc indices
+ // to build
} StripProxy;
typedef struct Strip {
@@ -128,11 +135,12 @@ typedef struct Sequence {
int startstill, endstill;
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*/
- float sat, pad;
+ float sat;
float mul, handsize;
/* is sfra needed anymore? - it looks like its only used in one place */
int sfra; /* starting frame according to the timeline of the scene. */
int anim_preseek;
+ int streamindex; /* streamindex for movie or sound files with several streams */
Strip *strip;
@@ -155,7 +163,7 @@ typedef struct Sequence {
void *scene_sound;
float volume;
- float level, pan; /* level in dB (0=full), pan -1..1 */
+ float pitch, pan; /* pitch (-0.1..10), pan -2..2 */
int scenenr; /* for scene selection */
int multicam_source; /* for multicam source selection */
float strobe;
@@ -209,14 +217,9 @@ typedef struct GlowVars {
typedef struct TransformVars {
float ScalexIni;
float ScaleyIni;
- float ScalexFin; /* deprecated - old transform strip */
- float ScaleyFin; /* deprecated - old transform strip */
float xIni;
- float xFin; /* deprecated - old transform strip */
float yIni;
- float yFin; /* deprecated - old transform strip */
float rotIni;
- float rotFin; /* deprecated - old transform strip */
int percent;
int interpolation;
int uniform_scale; /* preserve aspect/ratio when scaling */
@@ -276,6 +279,12 @@ typedef struct SpeedControlVars {
#define SEQ_USE_PROXY_CUSTOM_FILE (1<<21)
#define SEQ_USE_EFFECT_DEFAULT_FADE (1<<22)
+// flags for whether those properties are animated or not
+#define SEQ_AUDIO_VOLUME_ANIMATED (1<<24)
+#define SEQ_AUDIO_PITCH_ANIMATED (1<<25)
+#define SEQ_AUDIO_PAN_ANIMATED (1<<26)
+#define SEQ_AUDIO_DRAW_WAVEFORM (1<<27)
+
#define SEQ_INVALID_EFFECT (1<<31)
/* convenience define for all selection flags */
@@ -288,6 +297,19 @@ typedef struct SpeedControlVars {
#define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2
#define SEQ_COLOR_BALANCE_INVERSE_LIFT 4
+/* !!! has to be same as IMB_imbuf.h IMB_PROXY_... and IMB_TC_... */
+
+#define SEQ_PROXY_IMAGE_SIZE_25 1
+#define SEQ_PROXY_IMAGE_SIZE_50 2
+#define SEQ_PROXY_IMAGE_SIZE_75 4
+#define SEQ_PROXY_IMAGE_SIZE_100 8
+
+#define SEQ_PROXY_TC_NONE 0
+#define SEQ_PROXY_TC_RECORD_RUN 1
+#define SEQ_PROXY_TC_FREE_RUN 2
+#define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN 4
+#define SEQ_PROXY_TC_ALL 7
+
/* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */
#define SEQ_IMAGE 0
#define SEQ_META 1
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
index 3e5f82a8052..4f727b3586b 100644
--- a/source/blender/makesdna/DNA_sound_types.h
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -85,6 +85,11 @@ typedef struct bSound {
void *cache;
/**
+ * Waveform display data.
+ */
+ void *waveform;
+
+ /**
* The audaspace handle that should actually be played back.
* Should be cache if cache != NULL; otherwise it's handle
*/
@@ -106,7 +111,9 @@ typedef enum eSound_Type {
#define SND_DRAWFRAMES 1
#define SND_CFRA_NUM 2
-#define SOUND_FLAGS_3D (1 << 3)
+#define SOUND_FLAGS_3D (1 << 3) /* deprecated! used for sound actuator loading */
+#define SOUND_FLAGS_CACHING (1 << 4)
+#define SOUND_FLAGS_MONO (1 << 5)
/* to DNA_sound_types.h*/
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index e120cd14775..66b10bcbf21 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -267,7 +267,7 @@ typedef struct SpaceImage {
float centx, centy; /* storage for offset while render drawing */
short curtile; /* the currently active tile of the image when tile is enabled, is kept in sync with the active faces tile */
- short imtypenr;
+ short pad;
short lock;
short pin;
char dt_uv; /* UV draw type */
@@ -696,18 +696,19 @@ enum FileSortTypeE {
#define FILE_OPENFILE 0
#define FILE_SAVE 1
-/* sfile->flag and simasel->flag */
-#define FILE_SHOWSHORT 1
-#define FILE_RELPATH 2 /* was FILE_STRINGCODE */
-#define FILE_LINK 4
-#define FILE_HIDE_DOT 8
-#define FILE_AUTOSELECT 16
-#define FILE_ACTIVELAY 32
-#define FILE_ATCURSOR 64
-#define FILE_SYNCPOSE 128
-#define FILE_FILTER 256
-#define FILE_BOOKMARKS 512
-#define FILE_GROUP_INSTANCE 1024
+/* sfile->params->flag and simasel->flag */
+#define FILE_SHOWSHORT (1<<0)
+#define FILE_RELPATH (1<<1) /* was FILE_STRINGCODE */
+#define FILE_LINK (1<<2)
+#define FILE_HIDE_DOT (1<<3)
+#define FILE_AUTOSELECT (1<<4)
+#define FILE_ACTIVELAY (1<<5)
+/* #define FILE_ATCURSOR (1<<6) */ /* deprecated */
+#define FILE_DIRSEL_ONLY (1<<7)
+#define FILE_FILTER (1<<8)
+#define FILE_BOOKMARKS (1<<9)
+#define FILE_GROUP_INSTANCE (1<<10)
+
/* files in filesel list: file types */
#define BLENDERFILE (1<<2)
@@ -753,7 +754,7 @@ enum FileSortTypeE {
#define SI_EDITTILE (1<<1)
#define SI_CLIP_UV (1<<2)
#define SI_DRAWTOOL (1<<3)
-#define SI_DEPRECATED1 (1<<4) /* stick UVs to others in the same location */
+#define SI_NO_DRAWFACES (1<<4)
#define SI_DRAWSHADOW (1<<5)
#define SI_SELACTFACE (1<<6) /* deprecated */
#define SI_DEPRECATED2 (1<<7)
@@ -929,6 +930,7 @@ enum {
#define SEQ_PROXY_RENDER_SIZE_25 25
#define SEQ_PROXY_RENDER_SIZE_50 50
#define SEQ_PROXY_RENDER_SIZE_75 75
+#define SEQ_PROXY_RENDER_SIZE_100 99
#define SEQ_PROXY_RENDER_SIZE_FULL 100
diff --git a/source/blender/makesdna/DNA_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h
new file mode 100644
index 00000000000..fecc65885c5
--- /dev/null
+++ b/source/blender/makesdna/DNA_speaker_types.h
@@ -0,0 +1,69 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Jörg Müller.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+#ifndef DNA_SPEAKER_TYPES_H
+#define DNA_SPEAKER_TYPES_H
+
+/** \file DNA_speaker_types.h
+ * \ingroup DNA
+ */
+
+#include "DNA_ID.h"
+
+struct AnimData;
+struct bSound;
+
+typedef struct Speaker {
+ ID id;
+ struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
+
+ struct bSound *sound;
+
+ // not animatable properties
+ float volume_max;
+ float volume_min;
+ float distance_max;
+ float distance_reference;
+ float attenuation;
+ float cone_angle_outer;
+ float cone_angle_inner;
+ float cone_volume_outer;
+
+ // animatable properties
+ float volume;
+ float pitch;
+
+ // flag
+ short flag;
+ short pad1[3];
+} Speaker;
+
+/* **************** SPEAKER ********************* */
+
+/* flag */
+#define SPK_DS_EXPAND (1<<0)
+#define SPK_MUTED (1<<1)
+#define SPK_RELATIVE (1<<2)
+
+#endif /* DNA_SPEAKER_TYPES_H */
+
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index e81a9979c12..6e850a07d94 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -342,6 +342,7 @@ typedef struct TexMapping {
#define TEX_NORMALMAP 2048
#define TEX_GAUSS_MIP 4096
#define TEX_FILTER_MIN 8192
+#define TEX_DERIVATIVEMAP 16384
/* texfilter */
// TXF_BOX -> blender's old texture filtering method
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 50e66f91028..43dc532d4f6 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -197,7 +197,7 @@ typedef struct ThemeSpace {
char grid[4];
char wire[4], select[4];
- char lamp[4];
+ char lamp[4], speaker[4], pad2[4];
char active[4], group[4], group_active[4], transform[4];
char vertex[4], vertex_select[4];
char edge[4], edge_select[4];
@@ -210,17 +210,20 @@ typedef struct ThemeSpace {
char bone_solid[4], bone_pose[4];
char strip[4], strip_select[4];
char cframe[4];
+
char nurb_uline[4], nurb_vline[4];
char act_spline[4], nurb_sel_uline[4], nurb_sel_vline[4], lastsel_point[4];
- char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4];
- char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4];
+
+ char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], handle_auto_clamped[4];
+ char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], handle_sel_auto_clamped[4];
+
char ds_channel[4], ds_subchannel[4]; // dopesheet
char console_output[4], console_input[4], console_info[4], console_error[4];
char console_cursor[4];
char vertex_size, outline_width, facedot_size;
- char bpad;
+ char noodle_curving;
char syntaxl[4], syntaxn[4], syntaxb[4]; // syntax for textwindow and nodes
char syntaxv[4], syntaxc[4];
@@ -305,7 +308,7 @@ typedef struct UserDef {
int savetime;
char tempdir[160]; // FILE_MAXDIR length
char fontdir[160];
- char renderdir[160];
+ char renderdir[240]; // FILE_MAX length
char textudir[160];
char plugtexdir[160];
char plugseqdir[160];
@@ -341,7 +344,8 @@ typedef struct UserDef {
struct ListBase themes;
struct ListBase uifonts;
struct ListBase uistyles;
- struct ListBase keymaps;
+ struct ListBase keymaps; /* deprecated in favor of user_keymaps */
+ struct ListBase user_keymaps;
struct ListBase addons;
char keyconfigstr[64];
@@ -365,7 +369,6 @@ typedef struct UserDef {
short recent_files; /* maximum number of recently used files to remember */
short smooth_viewtx; /* miliseconds to spend spinning the view */
short glreslimit;
- short ndof_pan, ndof_rotate;
short curssize;
short color_picker_type;
short ipo_new; /* interpolation mode for newly added F-Curves */
@@ -375,7 +378,11 @@ typedef struct UserDef {
short scrcastwait; /* milliseconds between screencast snapshots */
short widget_unit; /* defaults to 20 for 72 DPI setting */
- short pad[3];
+ short anisotropic_filter;
+ /*short pad[3]; */
+
+ float ndof_sensitivity; /* overall sensitivity of 3D mouse */
+ int ndof_flag; /* flags for 3D mouse */
char versemaster[160];
char verseuser[160];
@@ -384,8 +391,7 @@ typedef struct UserDef {
short autokey_mode; /* autokeying mode */
short autokey_flag; /* flags for autokeying */
- short text_render, pad9; /*options for text rendering*/
- float pad10;
+ short text_render, pad9[3]; /*options for text rendering*/
struct ColorBand coba_weight; /* from texture.h */
@@ -578,6 +584,31 @@ extern UserDef U; /* from blenkernel blender.c */
#define TH_OLDSKOOL 3
#define TH_SHADED 4
+/* ndof_flag (3D mouse options) */
+#define NDOF_SHOW_GUIDE (1 << 0)
+#define NDOF_FLY_HELICOPTER (1 << 1)
+#define NDOF_LOCK_HORIZON (1 << 2)
+/* the following might not need to be saved between sessions,
+ but they do need to live somewhere accessible... */
+#define NDOF_SHOULD_PAN (1 << 3)
+#define NDOF_SHOULD_ZOOM (1 << 4)
+#define NDOF_SHOULD_ROTATE (1 << 5)
+/* orbit navigation modes
+ only two options, so it's sort of a hyrbrid bool/enum
+ if ((U.ndof_flag & NDOF_ORBIT_MODE) == NDOF_OM_OBJECT)... */
+/*
+#define NDOF_ORBIT_MODE (1 << 6)
+#define NDOF_OM_TARGETCAMERA 0
+#define NDOF_OM_OBJECT NDOF_ORBIT_MODE
+*/
+/* actually... users probably don't care about what the mode
+ is called, just that it feels right */
+#define NDOF_ORBIT_INVERT_AXES (1 << 6)
+/* zoom is up/down if this flag is set (otherwise forward/backward) */
+#define NDOF_ZOOM_UPDOWN (1 << 7)
+#define NDOF_ZOOM_INVERT (1 << 8)
+
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 7379493003d..3c8d20a6f16 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -130,7 +130,11 @@ typedef struct RegionView3D {
float twangle[3];
- float padf;
+ /* active rotation from NDOF or elsewhere */
+ float rot_angle;
+ float rot_axis[3];
+
+ char pad2[4];
} RegionView3D;
@@ -190,11 +194,10 @@ typedef struct View3D {
/* drawflags, denoting state */
short zbuf, transp, xray;
- char ndofmode; /* mode of transform for 6DOF devices -1 not found, 0 normal, 1 fly, 2 ob transform */
- char ndoffilter; /* filter for 6DOF devices 0 normal, 1 dominant */
-
+ char pad3[2];
+
void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */
-
+
/* XXX depricated? */
struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */
@@ -244,6 +247,7 @@ typedef struct View3D {
#define V3D_SOLID_TEX 8
#define V3D_DISPGP 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 */
/* View3D->around */
#define V3D_CENTER 0
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 31e59f18626..47ebf111eba 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -144,7 +144,9 @@ typedef struct wmWindowManager {
ListBase drags; /* active dragged items */
ListBase keyconfigs; /* known key configurations */
- struct wmKeyConfig *defaultconf; /* default configuration, not saved */
+ struct wmKeyConfig *defaultconf; /* default configuration */
+ struct wmKeyConfig *addonconf; /* addon configuration */
+ struct wmKeyConfig *userconf; /* user configuration */
ListBase timers; /* active timers */
struct wmTimer *autosavetimer; /* timer for auto save */
@@ -239,15 +241,26 @@ typedef struct wmKeyMapItem {
struct PointerRNA *ptr; /* rna pointer to access properties */
} wmKeyMapItem;
+/* used instead of wmKeyMapItem for diff keymaps */
+typedef struct wmKeyMapDiffItem {
+ struct wmKeyMapDiffItem *next, *prev;
+
+ wmKeyMapItem *remove_item;
+ wmKeyMapItem *add_item;
+} wmKeyMapDiffItem;
+
/* wmKeyMapItem.flag */
-#define KMI_INACTIVE 1
-#define KMI_EXPANDED 2
+#define KMI_INACTIVE 1
+#define KMI_EXPANDED 2
+#define KMI_USER_MODIFIED 4
+#define KMI_UPDATE 8
/* stored in WM, the actively used keymaps */
typedef struct wmKeyMap {
struct wmKeyMap *next, *prev;
ListBase items;
+ ListBase diff_items;
char idname[64]; /* global editor keymaps, or for more per space/region */
short spaceid; /* same IDs as in DNA_space_types.h */
@@ -263,9 +276,12 @@ typedef struct wmKeyMap {
/* wmKeyMap.flag */
#define KEYMAP_MODAL 1 /* modal map, not using operatornames */
-#define KEYMAP_USER 2 /* user created keymap */
+#define KEYMAP_USER 2 /* user keymap */
#define KEYMAP_EXPANDED 4
#define KEYMAP_CHILDREN_EXPANDED 8
+#define KEYMAP_DIFF 16 /* diff keymap for user preferences */
+#define KEYMAP_USER_MODIFIED 32 /* keymap has user modifications */
+#define KEYMAP_UPDATE 64
typedef struct wmKeyConfig {
struct wmKeyConfig *next, *prev;
@@ -304,14 +320,20 @@ typedef struct wmOperator {
} wmOperator;
-/* operator type exec(), invoke() modal(), return values */
-#define OPERATOR_RUNNING_MODAL 1
-#define OPERATOR_CANCELLED 2
-#define OPERATOR_FINISHED 4
+
+/* operator type return flags: exec(), invoke() modal(), return values */
+#define OPERATOR_RUNNING_MODAL (1<<0)
+#define OPERATOR_CANCELLED (1<<1)
+#define OPERATOR_FINISHED (1<<2)
/* add this flag if the event should pass through */
-#define OPERATOR_PASS_THROUGH 8
+#define OPERATOR_PASS_THROUGH (1<<3)
/* in case operator got executed outside WM code... like via fileselect */
-#define OPERATOR_HANDLED 16
+#define OPERATOR_HANDLED (1<<4)
+
+#define OPERATOR_FLAGS_ALL ((1<<5)-1)
+
+/* sanity checks for debug mode only */
+#define OPERATOR_RETVAL_CHECK(ret) BLI_assert(ret != 0 && (ret & OPERATOR_FLAGS_ALL) == ret)
/* wmOperator flag */
#define OP_GRAB_POINTER 1
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 429db63b526..5edebfe3903 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -27,12 +27,17 @@
# message(STATUS "Configuring makesdna")
+# add_definitions(-DWITH_DNA_GHASH)
+
blender_include_dirs(
../../../../intern/guardedalloc
../../blenloader
+ ../../blenlib
..
)
+
+# -----------------------------------------------------------------------------
# Build makesdna executable
set(SRC
makesdna.c
@@ -56,6 +61,8 @@ add_custom_command(
DEPENDS makesdna
)
+
+# -----------------------------------------------------------------------------
# Build bf_dna library
set(INC
@@ -72,3 +79,22 @@ set(SRC
)
blender_add_lib(bf_dna "${SRC}" "${INC}" "${INC_SYS}")
+
+
+# -----------------------------------------------------------------------------
+# Build bf_dna_blenlib library
+set(INC
+
+)
+
+set(INC_SYS
+
+)
+
+set(SRC
+ ../../blenlib/intern/BLI_mempool.c
+ ../../blenlib/intern/listbase.c
+ ../../blenlib/intern/BLI_ghash.c
+)
+
+blender_add_lib(bf_dna_blenlib "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index e51ee53e078..8185676cbfc 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -67,5 +67,6 @@ else:
else:
dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
+# TODO, get WITH_DNA_GHASH working, see CMake's 'WITH_DNA_GHASH'
obj = ['intern/dna.c', 'intern/dna_genfile.c']
Return ('obj')
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index 4e9b023b326..ebcfce84e37 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -42,6 +42,10 @@
#include "MEM_guardedalloc.h" // for MEM_freeN MEM_mallocN MEM_callocN
+#ifdef WITH_DNA_GHASH
+# include "BLI_ghash.h"
+#endif
+
#include "DNA_genfile.h"
#include "DNA_sdna_types.h" // for SDNA ;-)
@@ -197,7 +201,11 @@ void DNA_sdna_free(SDNA *sdna)
MEM_freeN((void *)sdna->names);
MEM_freeN(sdna->types);
MEM_freeN(sdna->structs);
-
+
+#ifdef WITH_DNA_GHASH
+ BLI_ghash_free(sdna->structs_map, NULL, NULL);
+#endif
+
MEM_freeN(sdna);
}
@@ -275,24 +283,30 @@ static short *findstruct_name(SDNA *sdna, const char *str)
int DNA_struct_find_nr(SDNA *sdna, const char *str)
{
short *sp= NULL;
- int a;
if(sdna->lastfind<sdna->nr_structs) {
sp= sdna->structs[sdna->lastfind];
if(strcmp( sdna->types[ sp[0] ], str )==0) return sdna->lastfind;
}
- for(a=0; a<sdna->nr_structs; a++) {
+#ifdef WITH_DNA_GHASH
+ return (intptr_t)BLI_ghash_lookup(sdna->structs_map, str) - 1;
+#else
+ {
+ int a;
- sp= sdna->structs[a];
-
- if(strcmp( sdna->types[ sp[0] ], str )==0) {
- sdna->lastfind= a;
- return a;
+ for(a=0; a<sdna->nr_structs; a++) {
+
+ sp= sdna->structs[a];
+
+ if(strcmp( sdna->types[ sp[0] ], str )==0) {
+ sdna->lastfind= a;
+ return a;
+ }
}
}
-
return -1;
+#endif
}
/* ************************* END DIV ********************** */
@@ -481,6 +495,16 @@ static void init_structDNA(SDNA *sdna, int do_endian_swap)
sp[10]= 9;
}
}
+
+#ifdef WITH_DNA_GHASH
+ /* create a ghash lookup to speed up */
+ sdna->structs_map= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "init_structDNA gh");
+
+ 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));
+ }
+#endif
}
}
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 8b841b67e54..694b403c7c5 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -132,23 +132,24 @@ const char *includefiles[] = {
"DNA_anim_types.h",
"DNA_boid_types.h",
"DNA_smoke_types.h",
+ "DNA_speaker_types.h",
// empty string to indicate end of includefiles
""
};
-int maxdata= 500000, maxnr= 50000;
-int nr_names=0;
-int nr_types=0;
-int nr_structs=0;
-char **names, *namedata; /* at address names[a] is string a */
-char **types, *typedata; /* at address types[a] is string a */
-short *typelens; /* at typelens[a] is de length of type a */
-short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits) */
-short **structs, *structdata; /* at sp= structs[a] is the first address of a struct definition
- sp[0] is type number
- sp[1] is amount of elements
- sp[2] sp[3] is typenr, namenr (etc) */
+static int maxdata= 500000, maxnr= 50000;
+static int nr_names=0;
+static int nr_types=0;
+static int nr_structs=0;
+static char **names, *namedata; /* at address names[a] is string a */
+static char **types, *typedata; /* at address types[a] is string a */
+static short *typelens; /* at typelens[a] is de length of type a */
+static short *alphalens; /* contains sizes as they are calculated on the DEC Alpha (64 bits), infact any 64bit system */
+static short **structs, *structdata;/* at sp= structs[a] is the first address of a struct definition
+ sp[0] is type number
+ sp[1] is amount of elements
+ sp[2] sp[3] is typenr, namenr (etc) */
/**
* Variable to control debug output of makesdna.
* debugSDNA:
@@ -157,8 +158,8 @@ short **structs, *structdata; /* at sp= structs[a] is the first address of a str
* - 2 = full trace, tell which names and types were found
* - 4 = full trace, plus all gritty details
*/
-int debugSDNA = 0;
-int additional_slen_offset;
+static int debugSDNA = 0;
+static int additional_slen_offset;
/* ************************************************************************** */
/* Functions */
@@ -670,6 +671,8 @@ int arraysize(char *astr, int len)
}
else if( str[a]==']' && cp) {
str[a]= 0;
+ /* if 'cp' is a preprocessor definition, it will evaluate to 0,
+ * the caller needs to check for this case and throw an error */
mul*= atoi(cp);
}
}
@@ -713,7 +716,12 @@ static int calculate_structlens(int firststruct)
/* has the name an extra length? (array) */
mul= 1;
if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
-
+
+ if (mul == 0) {
+ printf("Zero array size found or could not parse %s: '%.*s'\n", types[structtype], namelen + 1, cp);
+ dna_error = 1;
+ }
+
/* 4-8 aligned/ */
if(sizeof(void *) == 4) {
if (len % 4) {
@@ -743,7 +751,12 @@ static int calculate_structlens(int firststruct)
/* has the name an extra length? (array) */
mul= 1;
if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
-
+
+ if (mul == 0) {
+ printf("Zero array size found or could not parse %s: '%.*s'\n", types[structtype], namelen + 1, cp);
+ dna_error = 1;
+ }
+
/* struct alignment */
if(type >= firststruct) {
if(sizeof(void *)==8 && (len % 8) ) {
@@ -877,7 +890,7 @@ void printStructLenghts(void)
}
-int make_structDNA(char *baseDirectory, FILE *file)
+static int make_structDNA(char *baseDirectory, FILE *file)
{
int len, i;
short *sp;
@@ -1184,4 +1197,5 @@ int main(int argc, char ** argv)
#include "DNA_anim_types.h"
#include "DNA_boid_types.h"
#include "DNA_smoke_types.h"
+#include "DNA_speaker_types.h"
/* end of list */