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.vfx@gmail.com>2019-05-21 18:29:58 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-05-23 10:47:13 +0300
commitfec9615ea06c94b5224c14479c31c55c567fb7ee (patch)
tree3193277e063be03ad7218fecd778735f673686ea /source/blender/depsgraph
parent1d48fa2206934688a4c1b303279c26b3a8d1a5ec (diff)
Masks: Properly port to Copy-on-Write concept
Masks were not really covered by Copy-on-Write due to mistake in the dependency graph. After correcting that mistake a lot of tools became broken, so majority of the patch is related on making it so access to evaluated/tessellated masks is done. When accessing evaluated mask state make sure access to an evaluated dependency graph is done. This solves possible access to NULL data on redo. Fixes T64899: Re-doing new point addition causes crash Reviewers: brecht Reviewed By: brecht Maniphest Tasks: T64899 Differential Revision: https://developer.blender.org/D4918
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_query.h3
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc2
3 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index a7b5535d11a..9b7e5b95fdc 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -29,6 +29,9 @@
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
+/* Needed for the instance iterator. */
+#include "DNA_object_types.h"
+
struct ID;
struct BLI_Iterator;
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 0d10bd1d3dc..a203bfdb81d 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -1492,7 +1492,7 @@ void DepsgraphNodeBuilder::build_mask(Mask *mask)
return;
}
ID *mask_id = &mask->id;
- Mask *mask_cow = get_cow_datablock(mask);
+ Mask *mask_cow = (Mask *)ensure_cow_id(mask_id);
/* F-Curve based animation. */
build_animdata(mask_id);
build_parameters(mask_id);
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 7dcba8b7655..88f1130b7fb 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -540,6 +540,8 @@ NodeType geometry_tag_to_component(const ID *id)
return NodeType::GEOMETRY;
case ID_PAL: /* Palettes */
return NodeType::PARAMETERS;
+ case ID_MSK:
+ return NodeType::PARAMETERS;
default:
break;
}