diff options
author | Joshua Leung <aligorith@gmail.com> | 2012-05-05 09:46:45 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2012-05-05 09:46:45 +0400 |
commit | f1e3c31d4ffa86b695fddd45d9ccc6ce9ac62ea7 (patch) | |
tree | 2cad885a3d9066191ef96edc0490bb268366e6f4 /source/blender | |
parent | 3b4c9f50415ac87b8c5a1d8e4503b056ed17314e (diff) |
Style Cleanup: Wrapping with parens for safety and whitespace edits
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/RNA_types.h | 54 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_mask.c | 10 |
2 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index c3beffbe223..47b25720373 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -147,49 +147,49 @@ typedef enum PropertyFlag { /* editable means the property is editable in the user * interface, properties are editable by default except * for pointers and collections. */ - PROP_EDITABLE = 1<<0, + PROP_EDITABLE = (1<<0), /* this property is editable even if it is lib linked, * meaning it will get lost on reload, but it's useful * for editing. */ - PROP_LIB_EXCEPTION = 1<<16, + PROP_LIB_EXCEPTION = (1<<16), /* animatable means the property can be driven by some * other input, be it animation curves, expressions, .. * properties are animatable by default except for pointers * and collections */ - PROP_ANIMATABLE = 1<<1, + PROP_ANIMATABLE = (1<<1), /* icon */ - PROP_ICONS_CONSECUTIVE = 1<<12, + PROP_ICONS_CONSECUTIVE = (1<<12), /* hidden in the user interface */ - PROP_HIDDEN = 1<<19, + PROP_HIDDEN = (1<<19), /* do not write in presets */ - PROP_SKIP_SAVE = 1<<28, + PROP_SKIP_SAVE = (1<<28), /* function paramater flags */ - PROP_REQUIRED = 1<<2, - PROP_OUTPUT = 1<<3, - PROP_RNAPTR = 1<<11, + PROP_REQUIRED = (1<<2), + PROP_OUTPUT = (1<<3), + PROP_RNAPTR = (1<<11), /* registering */ - PROP_REGISTER = 1<<4, + PROP_REGISTER = (1<<4), PROP_REGISTER_OPTIONAL = (1<<4)|(1<<5), /* pointers */ - PROP_ID_REFCOUNT = 1<<6, + PROP_ID_REFCOUNT = (1<<6), /* disallow assigning a variable to its self, eg an object tracking its self * only apply this to types that are derived from an ID ()*/ - PROP_ID_SELF_CHECK = 1<<20, + PROP_ID_SELF_CHECK = (1<<20), /* use for... * - pointers: in the UI and python so unsetting or setting to None won't work * - strings: so our internal generated get/length/set functions know to do NULL checks before access [#30865] */ - PROP_NEVER_NULL = 1<<18, + PROP_NEVER_NULL = (1<<18), /* currently only used for UI, this is similar to PROP_NEVER_NULL * except that the value may be NULL at times, used for ObData, where an Empty's will be NULL * but setting NULL on a mesh object is not possible. So, if its not NULL, setting NULL cant be done! */ - PROP_NEVER_UNLINK = 1<<25, + PROP_NEVER_UNLINK = (1<<25), /* flag contains multiple enums. * note: not to be confused with prop->enumbitflags @@ -197,32 +197,32 @@ typedef enum PropertyFlag { * * note: these can't be animated so use with care. */ - PROP_ENUM_FLAG = 1<<21, + PROP_ENUM_FLAG = (1<<21), /* need context for update function */ - PROP_CONTEXT_UPDATE = 1<<22, + PROP_CONTEXT_UPDATE = (1<<22), PROP_CONTEXT_PROPERTY_UPDATE = (1<<22)|(1<<27), /* Use for arrays or for any data that should not have a referene kept * most common case is functions that return arrays where the array */ - PROP_THICK_WRAP = 1<<23, + PROP_THICK_WRAP = (1<<23), /* Reject values outside limits, use for python api only so far * this is for use when silently clamping string length will give * bad behavior later. Could also enforce this for INT's and other types. * note: currently no support for function arguments or non utf8 paths (filepaths) */ - PROP_NEVER_CLAMP = 1<<26, + PROP_NEVER_CLAMP = (1<<26), /* internal flags */ - PROP_BUILTIN = 1<<7, - PROP_EXPORT = 1<<8, - PROP_RUNTIME = 1<<9, - PROP_IDPROPERTY = 1<<10, - PROP_RAW_ACCESS = 1<<13, - PROP_RAW_ARRAY = 1<<14, - PROP_FREE_POINTERS = 1<<15, - PROP_DYNAMIC = 1<<17, /* for dynamic arrays, and retvals of type string */ - PROP_ENUM_NO_CONTEXT = 1<<24 /* for enum that shouldn't be contextual */ + PROP_BUILTIN = (1<<7), + PROP_EXPORT = (1<<8), + PROP_RUNTIME = (1<<9), + PROP_IDPROPERTY = (1<<10), + PROP_RAW_ACCESS = (1<<13), + PROP_RAW_ARRAY = (1<<14), + PROP_FREE_POINTERS = (1<<15), + PROP_DYNAMIC = (1<<17), /* for dynamic arrays, and retvals of type string */ + PROP_ENUM_NO_CONTEXT = (1<<24) /* for enum that shouldn't be contextual */ } PropertyFlag; typedef struct CollectionPropertyIterator { diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index a8f5f008e0c..9faca7bddc5 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -146,13 +146,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, char *bone_select_array; int bone_select_tot= 0; const int defbase_tot= BLI_countlist(&ob->defbase); - + /* check that there is armature object with bones to use, otherwise return original mesh */ if (ELEM3(NULL, mmd->ob_arm, mmd->ob_arm->pose, ob->defbase.first)) return derivedData; - + bone_select_array= MEM_mallocN(defbase_tot * sizeof(char), "mask array"); - + for (i = 0, def = ob->defbase.first; def; def = def->next, i++) { pchan = get_pose_channel(oba->pose, def->name); if (pchan && pchan->bone && (pchan->bone->flag & BONE_SELECTED)) { @@ -198,7 +198,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, for (i= 0, dv= dvert; i < maxVerts; i++, dv++) { MDeformWeight *dw= dv->dw; int j; - + for (j= dv->totweight; j > 0; j--, dw++) { if (dw->def_nr < defbase_tot) { if (bone_select_array[dw->def_nr]) { @@ -291,7 +291,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, MLoop *ml = mloop + mp->loopstart; int ok = TRUE; int j; - + for (j = 0; j < mp->totloop; j++, ml++) { if (!BLI_ghash_haskey(vertHash, SET_INT_IN_POINTER(ml->v))) { ok = FALSE; |