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:
authorSergey Sharybin <sergey@blender.org>2022-01-31 19:37:07 +0300
committerSergey Sharybin <sergey@blender.org>2022-02-01 13:04:19 +0300
commit6f9828289f397228c6cab6f352fb4a84a65da22a (patch)
tree9556ca554426125ba58e1b314cfbf409914e9a97 /source/blender/depsgraph/intern/depsgraph_tag.cc
parent396413dedf079478418771da159bb2c97bb0e4e9 (diff)
Fix T95356: Crash in armature edit mode and certain condition
Blender would have crashed when renaming bone in Edit Mode, Saving, and than selecting/deselecting. Caused by a mistake in the 0f89bcdbebf5: can not "short-circuit" the CoW update if it was explicitly requested. Safest for now solution seems to be to store whether the CoW component has been explicitly tagged, so that the following configuration can be supported: DEG_id_tag_update(id, ID_RECALC_GEOMETRY); DEG_id_tag_update(id, ID_RECALC_COPY_ON_WRITE); Differential Revision: https://developer.blender.org/D13966
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 4bc9e0d2d14..6614509f860 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -284,6 +284,7 @@ void depsgraph_tag_component(Depsgraph *graph,
* here. */
if (component_node == nullptr) {
if (component_type == NodeType::ANIMATION) {
+ id_node->is_cow_explicitly_tagged = true;
depsgraph_id_tag_copy_on_write(graph, id_node, update_source);
}
return;
@@ -301,6 +302,9 @@ void depsgraph_tag_component(Depsgraph *graph,
if (component_node->need_tag_cow_before_update()) {
depsgraph_id_tag_copy_on_write(graph, id_node, update_source);
}
+ if (component_type == NodeType::COPY_ON_WRITE) {
+ id_node->is_cow_explicitly_tagged = true;
+ }
}
/* This is a tag compatibility with legacy code.
@@ -888,6 +892,7 @@ void DEG_ids_clear_recalc(Depsgraph *depsgraph, const bool backup)
* correctly when there are multiple depsgraph with others still using
* the recalc flag. */
id_node->is_user_modified = false;
+ id_node->is_cow_explicitly_tagged = false;
deg_graph_clear_id_recalc_flags(id_node->id_cow);
if (deg_graph->is_active) {
deg_graph_clear_id_recalc_flags(id_node->id_orig);