diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-04-14 14:38:11 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-04-14 14:38:11 +0400 |
commit | 4a19ccfa5fb5cae359269ecaac389f6aace9f959 (patch) | |
tree | 78aa22e116cf7aed6d10d851978a5bdcf807fa84 /source/blender/makesdna | |
parent | 5f02b167d191969474c8f3575abdd6dbaeffeb57 (diff) | |
parent | 9a79bd38ade00fc663c27ffda9892629ef5ca755 (diff) |
Merged changes in the trunk up to revision 45619.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_action_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_armature_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_genfile.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_key_types.h | 102 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_smoke_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 2 |
9 files changed, 76 insertions, 41 deletions
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index f495b1b4336..9ca67372703 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -219,7 +219,8 @@ typedef struct bPoseChannel { short pad; float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */ - float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat */ + float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat + * this matrix is object space */ float constinv[4][4]; /* inverse result of constraints. * doesn't include effect of restposition, parent, and local transform*/ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 8b254b3b044..ea564e8c499 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -182,7 +182,7 @@ typedef enum eBone_Flag { 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 */ - BONE_DONE = (1<<7), /* For detecting cyclic dependancies */ + BONE_DONE = (1<<7), /* For detecting cyclic dependencies */ BONE_DRAW_ACTIVE = (1<<8), /* active is on mouse clicks only - deprecated, ONLY USE FOR DRAWING */ BONE_HINGE = (1<<9), /* No parent rotation or scale */ BONE_HIDDEN_A = (1<<10), /* hidden Bones when drawing Armature Editmode */ diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h index d4cfccaef70..20f7bb44e92 100644 --- a/source/blender/makesdna/DNA_genfile.h +++ b/source/blender/makesdna/DNA_genfile.h @@ -70,4 +70,4 @@ int DNA_elem_offset(struct SDNA *sdna, const char *stype, const char *vartype, c int DNA_elem_type_size(const eSDNA_Type elem_nr); -#endif +#endif /* __DNA_GENFILE_H__ */ diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index 611f4c2a25f..847d0b2cbbe 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -40,63 +40,95 @@ struct Ipo; typedef struct KeyBlock { struct KeyBlock *next, *prev; + + float pos; /* point in time (Key->type == KEY_NORMAL) only, + * for historic reasons this is relative to (Key->ctime / 100), + * so this value increments by 0.1f per frame. */ + float curval; /* influence (typically [0 - 1] but can be more), (Key->type == KEY_RELATIVE) only.*/ + + short type; /* interpolation type (Key->type == KEY_NORMAL) only. */ + short pad1; + + short relative; /* relative == 0 means first key is reference, otherwise the index of Key->blocks */ + short flag; + + int totelem; /* total number if items in the keyblock (compare with mesh/curve verts to chech we match) */ + int uid; /* for meshes only, match the unique number with the customdata layer */ - float pos; - float curval; - short type, adrcode, relative, flag; /* relative == 0 means first key is reference */ - int totelem, pad2; - - void *data; - float *weights; - char name[64]; /* MAX_NAME */ - char vgroup[64]; /* MAX_VGROUP_NAME */ + void *data; /* array of shape key values, size is (Key->elemsize * KeyBlock->totelem) */ + float *weights; /* store an aligned array of weights from 'vgroup' */ + char name[64]; /* MAX_NAME (unique name, user assigned) */ + char vgroup[64]; /* MAX_VGROUP_NAME (optional vertex group), array gets allocated into 'weights' when set */ + /* ranges, for RNA and UI only to clamp 'curval' */ float slidermin; float slidermax; - int uid, pad3; } KeyBlock; typedef struct Key { ID id; struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ - + + /* commonly called 'Basis', (Key->type == KEY_RELATIVE) only. + * Looks like this is _always_ 'key->block.first', + * perhaps later on it could be defined as some other KeyBlock - campbell */ KeyBlock *refkey; - char elemstr[64]; /* MAX_NAME */ - int elemsize; - float curval DNA_DEPRECATED; + + /* this is not a regular string, although it is \0 terminated + * this is an array of (element_array_size, element_type) pairs + * (each one char) used for calculating shape key-blocks */ + char elemstr[32]; + int elemsize; /* size of each element in #KeyBlock.data, use for allocation and stride */ + int pad; - ListBase block; + ListBase block; /* list of KeyBlock's */ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ - + ID *from; - short type, totkey; - short slurph, flag; + 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 */ + short flag; + + /* 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 */ float ctime; - /*can never be 0, this is used for detecting old data*/ - int uidgen; /*current free uid for keyblocks*/ + /* can never be 0, this is used for detecting old data */ + int uidgen; /* current free uid for keyblocks */ } Key; /* **************** KEY ********************* */ -/* key->type */ -#define KEY_NORMAL 0 -#define KEY_RELATIVE 1 +/* Key->type: KeyBlocks are interpreted as... */ +enum { + /* Sequencial positions over time (using KeyBlock->pos and Key->ctime) */ + KEY_NORMAL = 0, + + /* States to blend between (default) */ + KEY_RELATIVE = 1 +}; + +/* Key->flag */ +enum { + KEY_DS_EXPAND = 1 +}; -/* key->flag */ -#define KEY_DS_EXPAND 1 +/* KeyBlock->type */ +enum { + KEY_LINEAR = 0, + KEY_CARDINAL = 1, + KEY_BSPLINE = 2 +}; -/* keyblock->type */ -#define KEY_LINEAR 0 -#define KEY_CARDINAL 1 -#define KEY_BSPLINE 2 +/* KeyBlock->flag */ +enum { + KEYBLOCK_MUTE = (1 << 0), + KEYBLOCK_SEL = (1 << 1), + KEYBLOCK_LOCKED = (1 << 2) +}; -/* keyblock->flag */ -#define KEYBLOCK_MUTE (1<<0) -#define KEYBLOCK_SEL (1<<1) -#define KEYBLOCK_LOCKED (1<<2) -#define KEYBLOCK_MISSING (1<<3) /*temporary flag*/ -#endif +#endif /* __DNA_KEY_TYPES_H__ */ diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index eac6fc0d5e0..316b90b69de 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -67,6 +67,7 @@ typedef struct Mesh { struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ struct Key *key; struct Material **mat; + struct MSelect *mselect; /* BMESH ONLY */ /*new face structures*/ @@ -91,7 +92,6 @@ typedef struct Mesh { struct MCol *mcol; struct MSticky *msticky; struct Mesh *texcomesh; - struct MSelect *mselect; struct BMEditMesh *edit_btmesh; /* not saved in file! */ diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h index 053c0c8f7d3..26b3a3e6c62 100644 --- a/source/blender/makesdna/DNA_smoke_types.h +++ b/source/blender/makesdna/DNA_smoke_types.h @@ -110,6 +110,7 @@ typedef struct SmokeDomainSettings { /* flags */ #define MOD_SMOKE_FLOW_ABSOLUTE (1<<1) /*old style emission*/ #define MOD_SMOKE_FLOW_INITVELOCITY (1<<2) /* passes particles speed to the smoke */ +#define MOD_SMOKE_FLOW_INIT (1 << 3) /* is the flow object already initialized? */ typedef struct SmokeFlowSettings { diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 940a5bbb20e..1938c63d474 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -705,7 +705,7 @@ enum FileSortTypeE { #define SI_DRAWTOOL (1<<3) #define SI_NO_DRAWFACES (1<<4) #define SI_DRAWSHADOW (1<<5) -#define SI_SELACTFACE (1<<6) /* deprecated */ +/* #define SI_SELACTFACE (1<<6) */ /* deprecated */ #define SI_DEPRECATED2 (1<<7) #define SI_DEPRECATED3 (1<<8) /* stick UV selection to mesh vertex (UVs wont always be touching) */ #define SI_COORDFLOATS (1<<9) diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 610513ca860..fb4d4202b31 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -314,6 +314,7 @@ typedef struct View3D { #define V3D_BGPIC_EXPANDED 2 #define V3D_BGPIC_CAMERACLIP 4 #define V3D_BGPIC_DISABLED 8 +#define V3D_BGPIC_FOREGROUND 16 /* BGPic->source */ /* may want to use 1 for select ?*/ diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 510f7423814..a8877ccf943 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -1181,7 +1181,7 @@ int main(int argc, char ** argv) return(return_status); } -// include files for automatic dependancies +/* include files for automatic dependencies */ #include "DNA_listBase.h" #include "DNA_vec_types.h" #include "DNA_ID.h" |