diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-24 12:13:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-24 13:23:00 +0300 |
commit | 27da305a404f72a75a37892e1ac080c6531d059b (patch) | |
tree | 3fb809530c31b63882e95fa6c4ed1d9d6577e13f /source/blender/depsgraph/intern/depsgraph_tag.cc | |
parent | 67b352f9c5317c81c8e862a49be656c56e8f0743 (diff) |
Depsgraph: support flushing parameters without a full COW update
Avoid computationally expensive copying operations
when only some settings have been modified.
This is done by adding support for updating parameters
without tagging for copy-on-write.
Currently only mesh data blocks are supported,
other data-blocks can be added individually.
This prepares for changing values such as edit-mesh auto-smooth angle
in edit-mode without duplicating all mesh-data.
The benefit will only be seen when the user interface no longer tags
all ID's for copy on write updates.
ID_RECALC_GEOMETRY_ALL_MODES has been added to support situations
where non edit-mode geometry is modified in edit-mode.
While this isn't something user are likely to do,
Python scripts may change the underlying mesh.
Reviewed By: sergey
Ref D11377
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 21a6728c364..b00cae87311 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -230,6 +230,7 @@ void depsgraph_tag_to_component_opcode(const ID *id, case ID_RECALC_SOURCE: *component_type = NodeType::PARAMETERS; break; + case ID_RECALC_GEOMETRY_ALL_MODES: case ID_RECALC_ALL: case ID_RECALC_PSYS_ALL: BLI_assert(!"Should not happen"); @@ -705,6 +706,8 @@ const char *DEG_update_tag_as_string(IDRecalcFlag flag) return "TRANSFORM"; case ID_RECALC_GEOMETRY: return "GEOMETRY"; + case ID_RECALC_GEOMETRY_ALL_MODES: + return "GEOMETRY_ALL_MODES"; case ID_RECALC_ANIMATION: return "ANIMATION"; case ID_RECALC_PSYS_REDO: |