[Bf-blender-cvs] [1b6752e599b] master: Fix T62325, T91990: changing Cycles presets does not update the Blender UI

Brecht Van Lommel noreply at git.blender.org
Fri Oct 15 19:00:30 CEST 2021


Commit: 1b6752e599b5ed70823d09f90c418e448516d4b4
Author: Brecht Van Lommel
Date:   Fri Oct 15 18:55:06 2021 +0200
Branches: master
https://developer.blender.org/rB1b6752e599b5ed70823d09f90c418e448516d4b4

Fix T62325, T91990: changing Cycles presets does not update the Blender UI

Checking RNA_MAGIC is not enough to identify the ID property case which always
needs updates. If the property is already resolved to an RNA property we need
to check the flag too.

===================================================================

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 40b5f3ed1da..88c3db0c65b 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2199,7 +2199,11 @@ static void rna_property_update(
  * but this isn't likely to be a performance problem. */
 bool RNA_property_update_check(PropertyRNA *prop)
 {
-  return (prop->magic != RNA_MAGIC || prop->update || prop->noteflag);
+  return
+      /* Always update ID properties. */
+      (prop->magic != RNA_MAGIC || (prop->flag & PROP_IDPROPERTY)) ||
+      /* For native RNA properties only update if there is a callback or notifier. */
+      (prop->update || prop->noteflag);
 }
 
 void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)



More information about the Bf-blender-cvs mailing list