[Bf-blender-cvs] [8390e021896] temp-angavrilov-constraints: Nodes Modifier: update depsgraph when changing pointer settings.
Alexander Gavrilov
noreply at git.blender.org
Sat Jan 9 12:46:59 CET 2021
Commit: 8390e021896a5bbe2006391785b2181c90af2940
Author: Alexander Gavrilov
Date: Sat Jan 9 14:46:47 2021 +0300
Branches: temp-angavrilov-constraints
https://developer.blender.org/rB8390e021896a5bbe2006391785b2181c90af2940
Nodes Modifier: update depsgraph when changing pointer settings.
===================================================================
M source/blender/makesrna/intern/rna_access.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index b9bed8b0802..4150c295025 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -52,6 +52,7 @@
#include "BKE_report.h"
#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_build.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -2289,6 +2290,12 @@ static void rna_property_update(
DEG_id_tag_update(ptr->owner_id,
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_PARAMETERS);
+ /* When updating a pointer property, tag depsgraph for update.
+ * Otherwise the Nodes modifier settings don't work properly. */
+ if (prop->type == PROP_POINTER) {
+ DEG_relations_tag_update(bmain);
+ }
+
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.
More information about the Bf-blender-cvs
mailing list