From 709f126e8143da4fa28a08a94e13581c68ab6b29 Mon Sep 17 00:00:00 2001 From: mano-wii Date: Wed, 17 Jul 2019 14:17:16 -0300 Subject: Fix T59713: Armature layer dots not updated on changes `layer_used` runtime data, which controls the drawing of dots in the UI was not getting refreshed properly. This used to happen in the drawing code, but was no longer working for reasons explained in: {rB2b09062defa093a243b5fe64b099accb07b440a3} The solution was to update each layer manually in the operators: * ARMATURE_OT_bone_primitive_add * ARMATURE_OT_delete * ARMATURE_OT_dissolve * ARMATURE_OT_fill * ARMATURE_OT_merge * ARMATURE_OT_separate * ARMATURE_OT_bone_layers * POSE_OT_bone_layers Differential Revision: https://developer.blender.org/D5281 --- source/blender/editors/armature/armature_relations.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/armature/armature_relations.c') diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 2c61818d902..8722e575d15 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -38,6 +38,7 @@ #include "BKE_action.h" #include "BKE_animsys.h" +#include "BKE_armature.h" #include "BKE_constraint.h" #include "BKE_context.h" #include "BKE_fcurve.h" @@ -426,6 +427,7 @@ int join_armature_exec(bContext *C, wmOperator *op) ED_armature_from_edit(bmain, arm); ED_armature_edit_free(arm); + BKE_armature_refresh_layer_used(arm); DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); @@ -671,6 +673,9 @@ static int separate_armature_exec(bContext *C, wmOperator *op) ED_armature_to_edit(obedit->data); + ED_armature_edit_refresh_layer_used(obedit->data); + BKE_armature_refresh_layer_used(newob->data); + /* parents tips remain selected when connected children are removed. */ ED_armature_edit_deselect_all(obedit); -- cgit v1.2.3