Despgraph: Rename "copy-on-write" to "copy-on-evaluation"

The depsgraph CoW mechanism is a bit of a misnomer. It creates an
evaluated copy for data-blocks regardless of whether the copy will
actually be written to. The point is to have physical separation between
original and evaluated data. This is in contrast to the commonly used
performance improvement of keeping a user count and copying data
implicitly when it needs to be changed. In Blender code we call this
"implicit sharing" instead. Importantly, the dependency graph has no
idea about the _actual_ CoW behavior in Blender.

Renaming this functionality in the despgraph removes some of the
confusion that comes up when talking about this, and will hopefully
make the depsgraph less confusing to understand initially too. Wording
like "the evaluated copy" (as opposed to the original data-block) has
also become common anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/118338
This commit is contained in:
Hans Goudey
2024-02-19 15:54:08 +01:00
committed by Hans Goudey
parent 5a76a4190d
commit 81a63153d0
192 changed files with 789 additions and 786 deletions

View File

@@ -493,7 +493,7 @@ float BPY_driver_exec(PathResolvedRNA *anim_rna,
* now release the GIL on python operator execution instead, using
* #PyEval_SaveThread() / #PyEval_RestoreThread() so we don't lock up blender.
*
* For copy-on-write we always cache expressions and write errors in the
* For copy-on-evaluation we always cache expressions and write errors in the
* original driver, otherwise these would get freed while editing.
* Due to the GIL this is thread-safe. */

View File

@@ -594,7 +594,7 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args)
bContext *context = BPY_context_get();
WM_event_add_notifier(BPY_context_get(), NC_ANIMATION | ND_FCURVES_ORDER, nullptr);
DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE);
DEG_id_tag_update(id, ID_RECALC_SYNC_TO_EVAL);
DEG_relations_tag_update(CTX_data_main(context));
}
else {