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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-06-17 15:09:01 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-06-17 15:09:01 +0300
commit5e7e49e00d46734281b28a82582e3e3dd37e609c (patch)
treed78af99749156870d96db5e8628ddd42fa9df985 /source/blender
parentb50de0f8b75b9f7af62e09528635f6a9fdbb07cd (diff)
Fix T65662: Drivers on custom properties doesn't properly update
Happens if custom property is on object data data-block, which doesn't have translation or geometry components. Not for lights and cameras at least.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc5
-rw-r--r--source/blender/makesdna/DNA_ID.h2
-rw-r--r--source/blender/makesrna/intern/rna_access.c3
3 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 1c26e6fecd5..583191490d2 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -226,6 +226,9 @@ void depsgraph_tag_to_component_opcode(const ID *id,
case ID_RECALC_AUDIO:
*component_type = NodeType::AUDIO;
break;
+ case ID_RECALC_PARAMETERS:
+ *component_type = NodeType::PARAMETERS;
+ break;
case ID_RECALC_ALL:
case ID_RECALC_PSYS_ALL:
BLI_assert(!"Should not happen");
@@ -659,6 +662,8 @@ const char *DEG_update_tag_as_string(IDRecalcFlag flag)
return "AUDIO_LISTENER";
case ID_RECALC_AUDIO:
return "AUDIO";
+ case ID_RECALC_PARAMETERS:
+ return "PARAMETERS";
case ID_RECALC_ALL:
return "ALL";
}
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 2a6800c55b6..cad1af8eb50 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -614,6 +614,8 @@ typedef enum IDRecalcFlag {
ID_RECALC_AUDIO = (1 << 20),
+ ID_RECALC_PARAMETERS = (1 << 21),
+
/***************************************************************************
* Pseudonyms, to have more semantic meaning in the actual code without
* using too much low-level and implementation specific tags. */
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 3aa938ee713..731f549b497 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2316,7 +2316,8 @@ static void rna_property_update(
if (!is_rna || (prop->flag & PROP_IDPROPERTY)) {
/* WARNING! This is so property drivers update the display!
* not especially nice */
- DEG_id_tag_update(ptr->id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+ DEG_id_tag_update(ptr->id.data,
+ ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_PARAMETERS);
WM_main_add_notifier(NC_WINDOW, NULL);
/* Not nice as well, but the only way to make sure material preview
* is updated with custom nodes.