[Bf-blender-cvs] [fd89431861d] soc-2019-outliner: Tag depsgraph on pose bone sync only if changed
Nathan Craddock
noreply at git.blender.org
Wed Aug 7 07:30:06 CEST 2019
Commit: fd89431861d77d00637d7b6395a1a682a8b84698
Author: Nathan Craddock
Date: Tue Aug 6 23:25:29 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rBfd89431861d77d00637d7b6395a1a682a8b84698
Tag depsgraph on pose bone sync only if changed
===================================================================
M source/blender/editors/space_outliner/outliner_sync.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_sync.c b/source/blender/editors/space_outliner/outliner_sync.c
index 03cf03ed442..c98b460c9aa 100644
--- a/source/blender/editors/space_outliner/outliner_sync.c
+++ b/source/blender/editors/space_outliner/outliner_sync.c
@@ -178,6 +178,8 @@ static void outliner_select_sync_to_pose_bone(TreeElement *te, TreeStoreElem *ts
bArmature *arm = ob->data;
bPoseChannel *pchan = (bPoseChannel *)te->directdata;
+ short bone_flag = pchan->bone->flag;
+
if (PBONE_SELECTABLE(arm, pchan->bone)) {
if (tselem->flag & TSE_SELECTED) {
pchan->bone->flag |= BONE_SELECTED;
@@ -187,8 +189,11 @@ static void outliner_select_sync_to_pose_bone(TreeElement *te, TreeStoreElem *ts
}
}
- DEG_id_tag_update(&arm->id, ID_RECALC_SELECT);
- WM_main_add_notifier(NC_OBJECT | ND_BONE_SELECT, ob);
+ /* Tag if selection changed */
+ if (bone_flag != pchan->bone->flag) {
+ DEG_id_tag_update(&arm->id, ID_RECALC_SELECT);
+ WM_main_add_notifier(NC_OBJECT | ND_BONE_SELECT, ob);
+ }
}
static void outliner_select_sync_to_sequence(Scene *scene, TreeStoreElem *tselem)
More information about the Bf-blender-cvs
mailing list