diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-14 13:24:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-14 16:08:39 +0300 |
commit | d3c08b1aa62d0e6b373621cbd2da7342796f9625 (patch) | |
tree | e15edd7504ebb004611dff1fa2b283d306f88748 /source/blender/depsgraph/intern/depsgraph_types.h | |
parent | 1d8db50538c4ba933d0a5faf97807ace1a9f6386 (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/depsgraph_types.h')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_types.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h index ef64fe8c5fe..32ffcd79c74 100644 --- a/source/blender/depsgraph/intern/depsgraph_types.h +++ b/source/blender/depsgraph/intern/depsgraph_types.h @@ -150,7 +150,10 @@ typedef enum eDepsNode_Type { /* Material Shading Component */ DEG_NODE_TYPE_SHADING, DEG_NODE_TYPE_SHADING_PARAMETERS, + /* Point cache Component */ + DEG_NODE_TYPE_POINT_CACHE, /* Cache Component */ + /* TODO(sergey); Verify that we really need this. */ DEG_NODE_TYPE_CACHE, /* Batch Cache Component - TODO (dfelinto/sergey) rename to make it more generic. */ DEG_NODE_TYPE_BATCH_CACHE, @@ -209,9 +212,10 @@ typedef enum eDepsOperation_Code { DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY, /* Geometry. ---------------------------------------- */ + /* Evaluate the whole geometry, including modifiers. */ DEG_OPCODE_GEOMETRY_UBEREVAL, - DEG_OPCODE_GEOMETRY_CLOTH_MODIFIER, + /* Evaluation of a shape key. */ DEG_OPCODE_GEOMETRY_SHAPEKEY, /* Object data. ------------------------------------- */ @@ -287,4 +291,19 @@ typedef enum eDepsOperation_Code { } eDepsOperation_Code; const char *operationCodeAsString(eDepsOperation_Code opcode); +/* Source of the dependency graph node update tag. + * + * NOTE: This is a bit mask, so accumulation of sources is possible. + */ +typedef enum eDepsTag_Source { + /* Update is caused by a time change. */ + DEG_UPDATE_SOURCE_TIME = (1 << 0), + /* Update caused by user directly or indirectly influencing the node. */ + DEG_UPDATE_SOURCE_USER_EDIT = (1 << 1), + /* Update is happening as a special response for the relations update. */ + DEG_UPDATE_SOURCE_RELATIONS = (1 << 2), + /* Update is happening due to visibility change. */ + DEG_UPDATE_SOURCE_VISIBILITY = (1 << 3), +} eDepsTag_Source; + } // namespace DEG |