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-09-26 12:23:00 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-09-26 16:25:21 +0300
commit5603725389f7315fe158d93cff650ccaee57c0f9 (patch)
tree12c2f51c3a5b0949444098db27fd4210eeffc3e5 /source/blender/depsgraph/DEG_depsgraph_query.h
parent5a7fee8132b446f12f0c48f679bb332b9620c706 (diff)
Fix T70126: Can't Snap To Vertex With Rigidbody
The idea is to ignore dependency which comes via rigid body solver. Reviewers: mano-wii Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D5900
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_query.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index 82f7f33411a..d72a462d8fd 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -236,9 +236,21 @@ void DEG_foreach_dependent_ID(const Depsgraph *depsgraph,
/* Starts traversal from given component of the given ID, invokes callback for every other
* component which is directly on indirectly dependent on the source one. */
+enum {
+ /* Ignore transform solvers which depends on multiple inputs and affects final transform.
+ * Is used for cases like snapping objects which are part of a rigid body simulation:
+ * without this there will be "false-positive" dependnecies between transform components of
+ * objects:
+ *
+ * object 1 transform before solver ---> solver ------> object 1 final transform
+ * object 2 transform before solver -----^ \------> object 2 final transform
+ */
+ DEG_FOREACH_COMPONENT_IGNORE_TRANSFORM_SOLVERS,
+};
void DEG_foreach_dependent_ID_component(const Depsgraph *depsgraph,
const ID *id,
eDepsObjectComponentType source_component_type,
+ int flags,
DEGForeachIDComponentCallback callback,
void *user_data);