Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2018-05-28 19:51:56 +0300
committerJoshua Leung <aligorith@gmail.com>2018-05-28 19:52:04 +0300
commite63fbc992d8e54d74c9c433b212cf8037321f09d (patch)
treeb792af1314617cebb0a020b197fbc2d576ad9e87 /source/blender/makesrna
parente9cf3b53471b5138d5b763822b04a7617b00be37 (diff)
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.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_armature.c10
1 files changed, 8 insertions, 2 deletions
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);
}
}