[Bf-blender-cvs] [ccc48bf27ea] master: Fix T60602: outliner pose bone selection does not update in viewport.

Sebastian Parborg noreply at git.blender.org
Tue Jan 22 20:26:07 CET 2019


Commit: ccc48bf27eaa6651674a857a95884d821e42e1a7
Author: Sebastian Parborg
Date:   Tue Jan 22 20:24:33 2019 +0100
Branches: master
https://developer.blender.org/rBccc48bf27eaa6651674a857a95884d821e42e1a7

Fix T60602: outliner pose bone selection does not update in viewport.

Differential Revision: https://developer.blender.org/D4223

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

M	source/blender/depsgraph/intern/depsgraph_tag.cc
M	source/blender/editors/armature/pose_select.c
M	source/blender/editors/space_outliner/outliner_select.c

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

diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 26a12f42bfc..27e1a5fb7dd 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -93,6 +93,11 @@ void depsgraph_geometry_tag_to_component(const ID *id,
 	}
 }
 
+bool is_selectable_data_id_type(const ID_Type id_type)
+{
+	return ELEM(id_type, ID_ME, ID_CU, ID_MB, ID_LT, ID_GD);
+}
+
 void depsgraph_select_tag_to_component_opcode(
         const ID *id,
         eDepsNode_Type *component_type,
@@ -120,10 +125,14 @@ void depsgraph_select_tag_to_component_opcode(
 		*component_type = DEG_NODE_TYPE_BATCH_CACHE;
 		*operation_code = DEG_OPCODE_MOVIECLIP_SELECT_UPDATE;
 	}
-	else {
+	else if (is_selectable_data_id_type(id_type)) {
 		*component_type = DEG_NODE_TYPE_BATCH_CACHE;
 		*operation_code = DEG_OPCODE_GEOMETRY_SELECT_UPDATE;
 	}
+	else {
+		*component_type = DEG_NODE_TYPE_COPY_ON_WRITE;
+		*operation_code = DEG_OPCODE_COPY_ON_WRITE;
+	}
 }
 
 void depsgraph_base_flags_tag_to_component_opcode(
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index 1916495465c..3f582c7ada2 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -107,8 +107,7 @@ void ED_pose_bone_select_tag_update(Object *ob)
 		DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 	}
 
-	/* copy on write tag is needed (for the armature), or else no refresh happens */
-	DEG_id_tag_update(&arm->id, ID_RECALC_COPY_ON_WRITE);
+	DEG_id_tag_update(&arm->id, ID_RECALC_SELECT);
 }
 
 
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 1a84d6bd142..d1b18057830 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -549,7 +549,7 @@ static eOLDrawState tree_element_active_posechannel(
 			}
 
 			WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, ob);
-
+			DEG_id_tag_update(&arm->id, ID_RECALC_SELECT);
 		}
 	}
 	else {



More information about the Bf-blender-cvs mailing list