[Bf-blender-cvs] [e63fbc992d8] blender2.8: Fix T55231: Setting bone.select from RNA didn't tag for copy on write
Joshua Leung
noreply at git.blender.org
Mon May 28 18:53:06 CEST 2018
Commit: e63fbc992d8e54d74c9c433b212cf8037321f09d
Author: Joshua Leung
Date: Mon May 28 18:51:56 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBe63fbc992d8e54d74c9c433b212cf8037321f09d
Fix T55231: Setting bone.select from RNA didn't tag for copy on write
This was causing problems with addons such as the Selection Sets addon used
in studio by the animators.
===================================================================
M source/blender/makesrna/intern/rna_armature.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 0819a5e828e..30c643388af 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -168,8 +168,10 @@ static void rna_Bone_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
{
ID *id = ptr->id.data;
- /* special updates for cases where rigs try to hook into armature drawing stuff
- * e.g. Mask Modifier - 'Armature' option
+ /* 1) special updates for cases where rigs try to hook into armature drawing stuff
+ * e.g. Mask Modifier - 'Armature' option
+ * 2) tag armature for copy-on-write, so that selection status (set by addons)
+ * will update properly, like standard tools do already
*/
if (id) {
if (GS(id->name) == ID_AR) {
@@ -178,6 +180,8 @@ static void rna_Bone_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
if (arm->flag & ARM_HAS_VIZ_DEPS) {
DEG_id_tag_update(id, OB_RECALC_DATA);
}
+
+ DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
}
else if (GS(id->name) == ID_OB) {
Object *ob = (Object *)id;
@@ -186,6 +190,8 @@ static void rna_Bone_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
if (arm->flag & ARM_HAS_VIZ_DEPS) {
DEG_id_tag_update(id, OB_RECALC_DATA);
}
+
+ DEG_id_tag_update(&arm->id, DEG_TAG_COPY_ON_WRITE);
}
}
More information about the Bf-blender-cvs
mailing list