[Bf-blender-cvs] [72039cd7cc6] blender2.8: Multi Pose: Selecting a bone in one armature doesn't deselect bones in the other armatures

Joshua Leung noreply at git.blender.org
Thu May 24 15:05:34 CEST 2018


Commit: 72039cd7cc6b22a48effb0af5d7ba47b6f027ead
Author: Joshua Leung
Date:   Thu May 24 14:54:56 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB72039cd7cc6b22a48effb0af5d7ba47b6f027ead

Multi Pose: Selecting a bone in one armature doesn't deselect bones in the other armatures

This was actually due to missing COW flushing of pose data on the "other"
objects (only the active object was getting tagged for updates).

===================================================================

M	source/blender/editors/armature/pose_select.c

===================================================================

diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index 8e839d23c40..dab9caa63df 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -299,7 +299,22 @@ void ED_pose_deselect_all_multi(Object **objects, uint objects_len, int select_m
 
 	for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
 		Object *ob_iter = objects[ob_index];
+		bArmature *arm = ob_iter->data;
+		
 		ED_pose_deselect_all(ob_iter, select_mode, ignore_visibility);
+		
+		/* if there are some dependencies for visualizing armature state
+		 * (e.g. Mask Modifier in 'Armature' mode), force update
+		 */
+		if (arm->flag & ARM_HAS_VIZ_DEPS) {
+			/* NOTE: ob not ob_act here is intentional - it's the source of the
+			 *       bones being selected  [T37247]
+			 */
+			DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+		}
+		
+		/* need to tag armature for cow updates, or else selection doesn't update */
+		DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
 	}
 }



More information about the Bf-blender-cvs mailing list