[Bf-blender-cvs] [ae6e35279f3] master: Clarify comment about ID_RECALC_COPY_ON_WRITE

Sergey Sharybin noreply at git.blender.org
Fri Nov 25 14:55:54 CET 2022


Commit: ae6e35279f3f84303b51b5b248579afa1bb19225
Author: Sergey Sharybin
Date:   Fri Nov 25 14:33:32 2022 +0100
Branches: master
https://developer.blender.org/rBae6e35279f3f84303b51b5b248579afa1bb19225

Clarify comment about ID_RECALC_COPY_ON_WRITE

The copy-on-write is really an implementation detail of the
dependency graph. While there are still cases where there is
no better tag to be used, the ID_RECALC_COPY_ON_WRITE should
not be used in combination with a dedicated tag.

For example if location of object changes the proper tag is
`ID_RECALC_TRANSFORM`. Tagging with `ID_RECALC_TRANSFORM |
ID_RECALC_COPY_ON_WRITE` will seemingly work, but this is
not an intended usage.

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

M	source/blender/makesdna/DNA_ID.h

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

diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index edd70e0f9d7..3feb341b773 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -914,8 +914,9 @@ typedef enum IDRecalcFlag {
   ID_RECALC_EDITORS = (1 << 12),
 
   /* ** Update copy on write component. **
-   * This is most generic tag which should only be used when nothing else
-   * matches.
+   *
+   * This is most generic tag which should only be used when nothing else matches.
+   * It is not to explicitly mixed in with other recalculation flags.
    */
   ID_RECALC_COPY_ON_WRITE = (1 << 13),



More information about the Bf-blender-cvs mailing list