diff options
Diffstat (limited to 'source/blender/editors/armature/editarmature.c')
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index cc3d0c6e184..cd698bbf09f 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -755,8 +755,7 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op) * * TODO, loop over children before parents if multiple bones * at once are to be predictable*/ - CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones) - { + CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) { float delta_mat[4][4]; /* chan_mat already contains the delta transform from rest pose to pose-mode pose @@ -922,7 +921,7 @@ int join_armature_exec(bContext *C, wmOperator *UNUSED(op)) pose= ob->pose; ob->mode &= ~OB_MODE_POSE; - CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { + CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) { if ((base->object->type==OB_ARMATURE) && (base->object!=ob)) { bArmature *curarm= base->object->data; @@ -1193,7 +1192,7 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op)) /* 1) only edit-base selected */ // TODO: use context iterators for this? - CTX_DATA_BEGIN(C, Base *, base, visible_bases) { + CTX_DATA_BEGIN (C, Base *, base, visible_bases) { if (base->object==obedit) base->flag |= 1; else base->flag &= ~1; } @@ -2458,8 +2457,7 @@ void preEditBoneDuplicate(ListBase *editbones) EditBone *eBone; /* clear temp */ - for (eBone = editbones->first; eBone; eBone = eBone->next) - { + for (eBone = editbones->first; eBone; eBone = eBone->next) { eBone->temp = NULL; } } @@ -2817,8 +2815,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* loop over all bones, and only consider if visible */ - CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) - { + CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones) { if (!(ebone->flag & BONE_CONNECTED) && (ebone->flag & BONE_ROOTSEL)) fill_add_joint(ebone, 0, &points); if (ebone->flag & BONE_TIPSEL) @@ -3531,8 +3528,7 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op) /* loop over all editable bones */ // XXX the old code did this in reverse order though! - CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) - { + CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) { for (i=numcuts+1; i>1; i--) { /* compute cut ratio first */ float cutratio= 1.0f / (float)i; @@ -3820,7 +3816,7 @@ static int armature_parent_set_exec(bContext *C, wmOperator *op) */ /* parent selected bones to the active one */ - CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) { + CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) { if (ELEM(ebone, actbone, actmirb) == 0) { if (ebone->flag & BONE_SELECTED) bone_connect_to_new_parent(arm->edbo, ebone, actbone, val); @@ -3845,7 +3841,7 @@ static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEve uiLayout *layout= uiPupMenuLayout(pup); int allchildbones = 0; - CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) { + CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) { if (ebone != actbone) { if (ebone->parent != actbone) allchildbones= 1; } @@ -3904,7 +3900,7 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op) bArmature *arm= (bArmature *)ob->data; int val = RNA_enum_get(op->ptr, "type"); - CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) { + CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) { editbone_clear_parent(ebone, val); } CTX_DATA_END; @@ -3940,7 +3936,7 @@ void ARMATURE_OT_parent_clear(wmOperatorType *ot) static int armature_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) { /* Set the flags */ - CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) { + CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones) { /* ignore bone if selection can't change */ if ((ebone->flag & BONE_UNSELECTABLE) == 0) { /* select bone */ @@ -3982,7 +3978,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op) } /* Set the flags */ - CTX_DATA_BEGIN(C, EditBone *, ebone, visible_bones) { + CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones) { /* ignore bone if selection can't change */ if ((ebone->flag & BONE_UNSELECTABLE) == 0) { switch (action) { @@ -4216,7 +4212,7 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op) */ /* align selected bones to the active one */ - CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) { + CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) { if (ELEM(ebone, actbone, actmirb) == 0) { if (ebone->flag & BONE_SELECTED) bone_align_to_bone(arm->edbo, ebone, actbone); @@ -4905,8 +4901,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op, } /* only clear relevant transforms for selected bones */ - CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) - { + CTX_DATA_BEGIN (C, bPoseChannel*, pchan, selected_pose_bones) { /* run provided clearing function */ clear_func(pchan); @@ -5047,7 +5042,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op) } /* Set the flags */ - CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) { + CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones) { /* select pchan only if selectable, but deselect works always */ switch (action) { case SEL_SELECT: @@ -5436,8 +5431,7 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op)) arm= ob->data; /* loop through selected bones, auto-naming them */ - CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) - { + CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) { flip_side_name(newname, ebone->name, TRUE); // 1 = do strip off number extensions ED_armature_bone_rename(arm, ebone->name, newname); } @@ -5481,8 +5475,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op) arm= ob->data; /* loop through selected bones, auto-naming them */ - CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones) - { + CTX_DATA_BEGIN (C, EditBone *, ebone, selected_editable_bones) { BLI_strncpy(newname, ebone->name, sizeof(newname)); if (bone_autoside_name(newname, 1, axis, ebone->head[axis], ebone->tail[axis])) ED_armature_bone_rename(arm, ebone->name, newname); @@ -5800,7 +5793,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg) /* Loop over subdivision methods */ for (i = 0; lastBone == NULL && i < SKGEN_SUB_TOTAL; i++) { - switch(scene->toolsettings->skgen_subdivisions[i]) { + switch (scene->toolsettings->skgen_subdivisions[i]) { case SKGEN_SUB_LENGTH: lastBone = test_subdivideByLength(scene, obedit, arc, head, tail); break; |