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>2018-02-28 23:33:40 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-28 23:34:09 +0300
commit33b6f944c673bf76de9d5ed955f0e6ab1fe10aac (patch)
tree55897a3c771de37a85dcc3b9e24c8ef73234cb63 /source/blender/editors/armature/pose_edit.c
parent382218beb29f52e1ea5c10803edf95a937878308 (diff)
parent03d10703783a0d233517aac558ac3f0a7d55d302 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/armature/pose_edit.c')
-rw-r--r--source/blender/editors/armature/pose_edit.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index 119a27cd4a7..83eb1225c4c 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -601,7 +601,7 @@ static void pose_copy_menu(Scene *scene)
/* ********************************************** */
-static int pose_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
+static int pose_flip_names_exec(bContext *C, wmOperator *op)
{
Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
bArmature *arm;
@@ -610,6 +610,8 @@ static int pose_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
+ const bool do_strip_numbers = RNA_boolean_get(op->ptr, "do_strip_numbers");
+
arm = ob->data;
ListBase bones_names = {NULL};
@@ -620,7 +622,7 @@ static int pose_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
}
CTX_DATA_END;
- ED_armature_bones_flip_names(arm, &bones_names);
+ ED_armature_bones_flip_names(arm, &bones_names, do_strip_numbers);
BLI_freelistN(&bones_names);
@@ -646,6 +648,10 @@ void POSE_OT_flip_names(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+
+ RNA_def_boolean(ot->srna, "do_strip_numbers", false, "Strip Numbers",
+ "Try to remove right-most dot-number from flipped names "
+ "(WARNING: may result in incoherent naming in some cases)");
}
/* ------------------ */