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:
authorBrecht Van Lommel <brecht@blender.org>2021-10-15 19:55:06 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-15 20:00:19 +0300
commit1b6752e599b5ed70823d09f90c418e448516d4b4 (patch)
tree1ca29436e0e876f39d9a89f57c7d08c57c3274d3 /source/blender/makesrna/intern/rna_access.c
parent4ba72015465db2a163602fbc0001b4d8efaf69df (diff)
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c6
1 files changed, 5 insertions, 1 deletions
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)