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:
authorCampbell Barton <ideasman42@gmail.com>2020-02-26 07:15:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-26 07:22:46 +0300
commit66af6e4f32148e254a3dc64e442b4b6f389259d8 (patch)
tree5ae2a6f4a9c24cf75815e88f8438a2f4f18ab951
parent5a6a6ef0c659581e2d2ae028ae9e22c6e9801ef4 (diff)
Docs: expand comment on tagging id properties to update
Addresses issue from T74000.
-rw-r--r--source/blender/makesrna/intern/rna_access.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index df9d9918192..8dd6e6982dd 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2263,10 +2263,22 @@ static void rna_property_update(
}
if (!is_rna || (prop->flag & PROP_IDPROPERTY)) {
- /* WARNING! This is so property drivers update the display!
- * not especially nice */
+
+ /* Disclaimer: this logic is not applied consistently, causing some confusing behavior.
+ *
+ * - When animated (which skips update functions).
+ * - When ID-properties are edited via Python (since RNA properties aren't used in this case).
+ *
+ * Adding updates will add a lot of overhead in the case of animation.
+ * For Python it may cause unexpected slow-downs for developers using ID-properties
+ * for data storage. Further, the root ID isn't available with nested data-structures.
+ *
+ * So editing custom properties only causes updates in the UI,
+ * keep this exception because it happens to be useful for driving settings.
+ * Python developers on the other hand will need to manually 'update_tag', see: T74000. */
DEG_id_tag_update(ptr->owner_id,
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.