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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-06 22:40:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-06 22:40:15 +0400
commit31d2ee9bf77bb991ea4779c47379b2cee84b27ed (patch)
treefd6f021356fc78d6dfeff9f18f601ce645dd7ffe /source/blender/modifiers/intern/MOD_mask.c
parent7b7214c72233f72268f72d31fd8626a0f94e557e (diff)
style cleanup, brackets in else/if, some indentation.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_mask.c')
-rw-r--r--source/blender/modifiers/intern/MOD_mask.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c
index edef19fd032..b9768ff9999 100644
--- a/source/blender/modifiers/intern/MOD_mask.c
+++ b/source/blender/modifiers/intern/MOD_mask.c
@@ -85,12 +85,10 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
{
MaskModifierData *mmd = (MaskModifierData *)md;
- if (mmd->ob_arm)
- {
+ if (mmd->ob_arm) {
DagNode *armNode = dag_get_node(forest, mmd->ob_arm);
- dag_add_relation(forest, armNode, obNode,
- DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Mask Modifier");
+ dag_add_relation(forest, armNode, obNode, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Mask Modifier");
}
}
@@ -140,8 +138,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
/* if mode is to use selected armature bones, aggregate the bone groups */
- if (mmd->mode == MOD_MASK_MODE_ARM) /* --- using selected bones --- */
- {
+ if (mmd->mode == MOD_MASK_MODE_ARM) { /* --- using selected bones --- */
GHash *vgroupHash;
Object *oba= mmd->ob_arm;
bPoseChannel *pchan;
@@ -156,10 +153,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
bone_select_array= MEM_mallocN(defbase_tot * sizeof(char), "mask array");
- for (i = 0, def = ob->defbase.first; def; def = def->next, i++)
- {
- if (((pchan= get_pose_channel(oba->pose, def->name)) && pchan->bone && (pchan->bone->flag & BONE_SELECTED)))
- {
+ 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)) {
bone_select_array[i]= TRUE;
bone_select_tot++;
}
@@ -179,8 +175,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
BLI_ghash_insert(vgroupHash, def->name, SET_INT_IN_POINTER(i));
/* if no bones selected, free hashes and return original mesh */
- if (bone_select_tot == 0)
- {
+ if (bone_select_tot == 0) {
BLI_ghash_free(vgroupHash, NULL, NULL);
MEM_freeN(bone_select_array);
@@ -189,8 +184,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* repeat the previous check, but for dverts */
dvert= dm->getVertDataArray(dm, CD_MDEFORMVERT);
- if (dvert == NULL)
- {
+ if (dvert == NULL) {
BLI_ghash_free(vgroupHash, NULL, NULL);
MEM_freeN(bone_select_array);
@@ -311,8 +305,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
/* all verts must be available */
- if (ok)
- {
+ if (ok) {
BLI_ghash_insert(polyHash, SET_INT_IN_POINTER(i), SET_INT_IN_POINTER(numPolys));
loop_mapping[numPolys] = numLoops;
numPolys++;