[Bf-blender-cvs] [66af6e4f321] master: Docs: expand comment on tagging id properties to update

Campbell Barton noreply at git.blender.org
Wed Feb 26 05:26:38 CET 2020


Commit: 66af6e4f32148e254a3dc64e442b4b6f389259d8
Author: Campbell Barton
Date:   Wed Feb 26 15:15:56 2020 +1100
Branches: master
https://developer.blender.org/rB66af6e4f32148e254a3dc64e442b4b6f389259d8

Docs: expand comment on tagging id properties to update

Addresses issue from T74000.

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

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 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.



More information about the Bf-blender-cvs mailing list