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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-26 03:38:50 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-29 20:49:01 +0400
commitcedc90b6077a01a60f589f09a5c82f4b7a359a4b (patch)
treee6c24bf3fdb0aa2286c744e30ce45b10c8cb0085 /source/blender/editors/armature/armature_edit.c
parent77719bfd0669cc675ad729f4c51672173842faca (diff)
Fix errors and inconsistencies in confirmation popup removal.
* Improve some clip editor messages * Remove popup for metastrips, seems unnecessary * Renamed some variables for consistency * Avoid unnecessary call to CTX_DATA_COUNT Reviewed By: sergey, campbellbarton, aligorith Differential Revision: http://developer.blender.org/D44
Diffstat (limited to 'source/blender/editors/armature/armature_edit.c')
-rw-r--r--source/blender/editors/armature/armature_edit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index e5fc6c910c0..c284769ff5c 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -989,6 +989,7 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
bArmature *arm = (bArmature *)ob->data;
EditBone *actbone = CTX_data_active_bone(C);
EditBone *actmirb = NULL;
+ int num_selected_bones;
/* there must be an active bone */
if (actbone == NULL) {
@@ -1011,7 +1012,8 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
/* if there is only 1 selected bone, we assume that that is the active bone,
* since a user will need to have clicked on a bone (thus selecting it) to make it active
*/
- if (CTX_DATA_COUNT(C, selected_editable_bones) <= 1) {
+ num_selected_bones = CTX_DATA_COUNT(C, selected_editable_bones);
+ if (num_selected_bones <= 1) {
/* When only the active bone is selected, and it has a parent,
* align it to the parent, as that is the only possible outcome.
*/
@@ -1045,7 +1047,7 @@ static int armature_align_bones_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- BKE_reportf(op->reports, RPT_INFO, "%d bones aligned to bone '%s'", CTX_DATA_COUNT(C, selected_editable_bones), actbone->name);
+ BKE_reportf(op->reports, RPT_INFO, "%d bones aligned to bone '%s'", num_selected_bones, actbone->name);
}
/* note, notifier might evolve */
@@ -1117,7 +1119,7 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *op)
EditBone *curBone, *ebone_next;
bConstraint *con;
Object *obedit = CTX_data_edit_object(C); // XXX get from context
- int removed_tot = 0;
+ int num_deleted = 0;
arm = obedit->data;
/* cancel if nothing selected */
@@ -1174,12 +1176,12 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *op)
if (curBone->flag & BONE_SELECTED) {
if (curBone == arm->act_edbone) arm->act_edbone = NULL;
ED_armature_edit_bone_remove(arm, curBone);
- removed_tot++;
+ num_deleted++;
}
}
}
- BKE_reportf(op->reports, RPT_INFO, "Deleted %d bones", removed_tot);
+ BKE_reportf(op->reports, RPT_INFO, "Deleted %d bones", num_deleted);
ED_armature_sync_selection(arm->edbo);