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>2019-12-09 22:23:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-12-09 22:56:50 +0300
commit08d4e7e11ced58615d2f116ec9d49a326fba0be5 (patch)
tree3be17c25de9bf820a988958cf2447fa4a723d863 /source/blender/editors/armature/armature_relations.c
parent15630c5a8171a86e6a50943cfbf3524829ecc8f0 (diff)
Edit Armature: match separate selection with meshes
- Existing objects remain selected. - The content of the armatures is unselected.
Diffstat (limited to 'source/blender/editors/armature/armature_relations.c')
-rw-r--r--source/blender/editors/armature/armature_relations.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 86f51015bc4..927f392beb9 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -603,6 +603,7 @@ static void separate_armature_bones(Main *bmain, Object *ob, short sel)
}
/* exit editmode (recalculates pchans too) */
+ ED_armature_edit_deselect_all(ob);
ED_armature_from_edit(bmain, ob->data);
ED_armature_edit_free(ob->data);
}
@@ -622,11 +623,6 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
Base **bases = BKE_view_layer_array_from_bases_in_edit_mode_unique_data(
view_layer, CTX_wm_view3d(C), &bases_len);
- CTX_DATA_BEGIN (C, Base *, base, visible_bases) {
- ED_object_base_select(base, BA_DESELECT);
- }
- CTX_DATA_END;
-
for (uint base_index = 0; base_index < bases_len; base_index++) {
Base *base_iter = bases[base_index];
Object *obedit = base_iter->object;
@@ -668,9 +664,6 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
* 5. Make original armature active and enter editmode
*/
- /* 1) only edit-base selected */
- ED_object_base_select(base_iter, BA_SELECT);
-
/* 1) store starting settings and exit editmode */
oldob = obedit;
oldbase = base_iter;
@@ -684,11 +677,11 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
/* only duplicate linked armature */
newbase = ED_object_add_duplicate(bmain, scene, view_layer, oldbase, USER_DUP_ARM);
+ ED_object_base_select(newbase, BA_SELECT);
DEG_relations_tag_update(bmain);
newob = newbase->object;
- newbase->flag &= ~BASE_SELECTED;
/* 3) remove bones that shouldn't still be around on both armatures */
separate_armature_bones(bmain, oldob, 1);