From e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Apr 2019 06:17:24 +0200 Subject: ClangFormat: apply to source, most of intern Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat --- source/blender/makesdna/DNA_key_types.h | 179 ++++++++++++++++---------------- 1 file changed, 89 insertions(+), 90 deletions(-) (limited to 'source/blender/makesdna/DNA_key_types.h') diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h index d35ed7a755f..b57f88f39af 100644 --- a/source/blender/makesdna/DNA_key_types.h +++ b/source/blender/makesdna/DNA_key_types.h @@ -35,119 +35,118 @@ struct AnimData; struct Ipo; typedef struct KeyBlock { - struct KeyBlock *next, *prev; - - /** - * 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 pos; - /** influence (typically [0 - 1] but can be more), (Key->type == KEY_RELATIVE) only.*/ - float curval; - - /** interpolation type (Key->type == KEY_NORMAL) only. */ - short type; - char _pad1[2]; - - /** relative == 0 means first key is reference, otherwise the index of Key->blocks */ - short relative; - short flag; - - /** total number if items in the keyblock (compare with mesh/curve verts to check we match) */ - int totelem; - /** for meshes only, match the unique number with the customdata layer */ - int uid; - - /** array of shape key values, size is (Key->elemsize * KeyBlock->totelem) */ - void *data; - /** MAX_NAME (unique name, user assigned) */ - char name[64]; - /** MAX_VGROUP_NAME (optional vertex group), array gets allocated into 'weights' when set */ - char vgroup[64]; - - /** ranges, for RNA and UI only to clamp 'curval' */ - float slidermin; - float slidermax; + struct KeyBlock *next, *prev; + + /** + * 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 pos; + /** influence (typically [0 - 1] but can be more), (Key->type == KEY_RELATIVE) only.*/ + float curval; + + /** interpolation type (Key->type == KEY_NORMAL) only. */ + short type; + char _pad1[2]; + + /** relative == 0 means first key is reference, otherwise the index of Key->blocks */ + short relative; + short flag; + + /** total number if items in the keyblock (compare with mesh/curve verts to check we match) */ + int totelem; + /** for meshes only, match the unique number with the customdata layer */ + int uid; + + /** array of shape key values, size is (Key->elemsize * KeyBlock->totelem) */ + void *data; + /** MAX_NAME (unique name, user assigned) */ + char name[64]; + /** MAX_VGROUP_NAME (optional vertex group), array gets allocated into 'weights' when set */ + char vgroup[64]; + + /** ranges, for RNA and UI only to clamp 'curval' */ + float slidermin; + float slidermax; } KeyBlock; - typedef struct Key { - ID id; - /** Animation data (must be immediately after id for utilities to use it). */ - struct AnimData *adt; - - /** - * 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; - - /** - * 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]; - /** Size of each element in #KeyBlock.data, use for allocation and stride. */ - int elemsize; - char _pad[4]; - - /** list of KeyBlock's */ - ListBase block; - /** old animation system, deprecated for 2.5 */ - struct Ipo *ipo DNA_DEPRECATED; - - ID *from; - - /** (totkey == BLI_listbase_count(&key->block)) */ - int totkey; - short flag; - /** absolute or relative shape key */ - char type; - 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 */ - float ctime; - - /** - * Can never be 0, this is used for detecting old data. - * current free uid for keyblocks - */ - int uidgen; + ID id; + /** Animation data (must be immediately after id for utilities to use it). */ + struct AnimData *adt; + + /** + * 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; + + /** + * 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]; + /** Size of each element in #KeyBlock.data, use for allocation and stride. */ + int elemsize; + char _pad[4]; + + /** list of KeyBlock's */ + ListBase block; + /** old animation system, deprecated for 2.5 */ + struct Ipo *ipo DNA_DEPRECATED; + + ID *from; + + /** (totkey == BLI_listbase_count(&key->block)) */ + int totkey; + short flag; + /** absolute or relative shape key */ + char type; + 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 */ + float ctime; + + /** + * Can never be 0, this is used for detecting old data. + * current free uid for keyblocks + */ + int uidgen; } Key; /* **************** KEY ********************* */ /* Key->type: KeyBlocks are interpreted as... */ enum { - /* Sequential positions over time (using KeyBlock->pos and Key->ctime) */ - KEY_NORMAL = 0, + /* Sequential positions over time (using KeyBlock->pos and Key->ctime) */ + KEY_NORMAL = 0, - /* States to blend between (default) */ - KEY_RELATIVE = 1, + /* States to blend between (default) */ + KEY_RELATIVE = 1, }; /* Key->flag */ enum { - KEY_DS_EXPAND = 1, + KEY_DS_EXPAND = 1, }; /* KeyBlock->type */ enum { - KEY_LINEAR = 0, - KEY_CARDINAL = 1, - KEY_BSPLINE = 2, - KEY_CATMULL_ROM = 3, + KEY_LINEAR = 0, + KEY_CARDINAL = 1, + KEY_BSPLINE = 2, + KEY_CATMULL_ROM = 3, }; /* KeyBlock->flag */ enum { - KEYBLOCK_MUTE = (1 << 0), - KEYBLOCK_SEL = (1 << 1), - KEYBLOCK_LOCKED = (1 << 2), + KEYBLOCK_MUTE = (1 << 0), + KEYBLOCK_SEL = (1 << 1), + KEYBLOCK_LOCKED = (1 << 2), }; #define KEYELEM_FLOAT_LEN_COORD 3 -- cgit v1.2.3