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>2018-11-14 13:24:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-11-14 16:08:39 +0300
commitd3c08b1aa62d0e6b373621cbd2da7342796f9625 (patch)
treee15edd7504ebb004611dff1fa2b283d306f88748 /source/blender/depsgraph/intern/debug
parent1d8db50538c4ba933d0a5faf97807ace1a9f6386 (diff)
Depsgraph: Fix missing point cache reset when physics changes
Among all the lines moved around, the general idea is quite simple. Actually, there are two ideas implemented there. First one, is when object itself is tagged for update, we tag its point cache component for evaluation, which makes it so point cache is properly reset. We do it implicitly because otherwise we'll need to go everywhere and add explicit tag in almost all the properties. Second thing is, we link all collider and force fields to a point cache component using special type of link. This type of link only allows flush if change is caused by a user update. This way reset does not happen when change is caused due to animation, but will properly happen when user causes indirect change to the objects which are part of physics simulation.
Diffstat (limited to 'source/blender/depsgraph/intern/debug')
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc30
1 files changed, 19 insertions, 11 deletions
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
index 47cb3ebcd91..39dfac2fca7 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
@@ -69,6 +69,7 @@ static const char *deg_debug_colors[] = {
"#33a02c", "#fb9a99", "#e31a1c",
"#fdbf6f", "#ff7f00", "#cab2d6",
"#6a3d9a", "#ffff99", "#b15928",
+ "#ff00ff",
};
#endif
static const char *deg_debug_colors_light[] = {
@@ -76,6 +77,7 @@ static const char *deg_debug_colors_light[] = {
"#fb8072", "#80b1d3", "#fdb462",
"#b3de69", "#fccde5", "#d9d9d9",
"#bc80bd", "#ccebc5", "#ffed6f",
+ "#ff00ff",
};
#ifdef COLOR_SCHEME_NODE_TYPE
@@ -84,18 +86,19 @@ static const int deg_debug_node_type_color_map[][2] = {
{DEG_NODE_TYPE_ID_REF, 1},
/* Outer Types */
- {DEG_NODE_TYPE_PARAMETERS, 2},
- {DEG_NODE_TYPE_PROXY, 3},
- {DEG_NODE_TYPE_ANIMATION, 4},
- {DEG_NODE_TYPE_TRANSFORM, 5},
- {DEG_NODE_TYPE_GEOMETRY, 6},
- {DEG_NODE_TYPE_SEQUENCER, 7},
- {DEG_NODE_TYPE_SHADING, 8},
+ {DEG_NODE_TYPE_PARAMETERS, 2},
+ {DEG_NODE_TYPE_PROXY, 3},
+ {DEG_NODE_TYPE_ANIMATION, 4},
+ {DEG_NODE_TYPE_TRANSFORM, 5},
+ {DEG_NODE_TYPE_GEOMETRY, 6},
+ {DEG_NODE_TYPE_SEQUENCER, 7},
+ {DEG_NODE_TYPE_SHADING, 8},
{DEG_NODE_TYPE_SHADING_PARAMETERS, 9},
- {DEG_NODE_TYPE_CACHE, 10},
- {DEG_NODE_TYPE_LAYER_COLLECTIONS, 11},
- {DEG_NODE_TYPE_COPY_ON_WRITE, 12},
- {-1, 0}
+ {DEG_NODE_TYPE_CACHE, 10},
+ {DEG_NODE_TYPE_POINT_CACHE, 11},
+ {DEG_NODE_TYPE_LAYER_COLLECTIONS , 12},
+ {DEG_NODE_TYPE_COPY_ON_WRITE, 13},
+ {-1, 0}
};
#endif
@@ -264,10 +267,14 @@ static void deg_debug_graphviz_relation_style(const DebugContext &ctx,
{
const char *style_default = "solid";
const char *style_no_flush = "dashed";
+ const char *style_flush_user_only = "dotted";
const char *style = style_default;
if (rel->flag & DEPSREL_FLAG_NO_FLUSH) {
style = style_no_flush;
}
+ if (rel->flag & DEPSREL_FLAG_FLUSH_USER_EDIT_ONLY) {
+ style = style_flush_user_only;
+ }
deg_debug_fprintf(ctx, "%s", style);
}
@@ -403,6 +410,7 @@ static void deg_debug_graphviz_node(const DebugContext &ctx,
case DEG_NODE_TYPE_SHADING:
case DEG_NODE_TYPE_SHADING_PARAMETERS:
case DEG_NODE_TYPE_CACHE:
+ case DEG_NODE_TYPE_POINT_CACHE:
case DEG_NODE_TYPE_LAYER_COLLECTIONS:
case DEG_NODE_TYPE_EVAL_PARTICLES:
case DEG_NODE_TYPE_COPY_ON_WRITE: