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:
-rw-r--r--extern/mantaflow/preprocessed/conjugategrad.cpp2
-rw-r--r--extern/mantaflow/preprocessed/gitinfo.h2
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc2
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_pchanmap.h2
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.h4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc30
6 files changed, 38 insertions, 4 deletions
diff --git a/extern/mantaflow/preprocessed/conjugategrad.cpp b/extern/mantaflow/preprocessed/conjugategrad.cpp
index ac317402a49..de522d0b8f4 100644
--- a/extern/mantaflow/preprocessed/conjugategrad.cpp
+++ b/extern/mantaflow/preprocessed/conjugategrad.cpp
@@ -650,7 +650,7 @@ void cgSolveDiffusion(const FlagGrid &flags,
<< ", res:" << gcg->getSigma(),
CG_DEBUGLEVEL);
}
- else if ((grid.getType() & GridBase::TypeVec3) || (grid.getType() & GridBase::TypeVec3)) {
+ else if ((grid.getType() & GridBase::TypeVec3) || (grid.getType() & GridBase::TypeMAC)) {
Grid<Vec3> &vec = ((Grid<Vec3> &)grid);
Grid<Real> u(parent);
diff --git a/extern/mantaflow/preprocessed/gitinfo.h b/extern/mantaflow/preprocessed/gitinfo.h
index 216aaf4e2bc..6d3abd1e88e 100644
--- a/extern/mantaflow/preprocessed/gitinfo.h
+++ b/extern/mantaflow/preprocessed/gitinfo.h
@@ -1,3 +1,3 @@
-#define MANTA_GIT_VERSION "commit 8d19f1096a4d8e115d9d1ec6024c65d53a94f47b"
+#define MANTA_GIT_VERSION "commit 3f5c7989fd82920f0c509844a06e97dd1069191c"
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc b/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc
index 61c23becfda..5483ff9c030 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.cc
@@ -91,7 +91,7 @@ void RootPChanMap::add_bone(const char *bone, const char *root)
}
/* Check if there's a common root bone between two bones. */
-bool RootPChanMap::has_common_root(const char *bone1, const char *bone2)
+bool RootPChanMap::has_common_root(const char *bone1, const char *bone2) const
{
/* Ensure that both are in the map... */
if (BLI_ghash_haskey(map_, bone1) == false) {
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.h b/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.h
index 0c1d22f9345..1442f547b08 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_pchanmap.h
@@ -39,7 +39,7 @@ struct RootPChanMap {
void add_bone(const char *bone, const char *root);
/* Check if there's a common root bone between two bones. */
- bool has_common_root(const char *bone1, const char *bone2);
+ bool has_common_root(const char *bone1, const char *bone2) const;
protected:
/* The actual map:
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
index ed656354e30..11eb31c68f6 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@ -257,6 +257,10 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder {
bPoseChannel *pchan,
bConstraint *con,
RootPChanMap *root_map);
+ virtual void build_inter_ik_chains(Object *object,
+ const OperationKey &solver_key,
+ const bPoseChannel *rootchan,
+ const RootPChanMap *root_map);
virtual void build_rig(Object *object);
virtual void build_proxy_rig(Object *object);
virtual void build_shapekeys(Key *key);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index 55c14fc9b2d..12cd6936a13 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -193,6 +193,9 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
}
OperationKey pose_done_key(&object->id, NodeType::EVAL_POSE, OperationCode::POSE_DONE);
add_relation(solver_key, pose_done_key, "PoseEval Result-Bone Link");
+
+ /* Add relation when the root of this IK chain is influenced by another IK chain. */
+ build_inter_ik_chains(object, solver_key, rootchan, root_map);
}
/* Spline IK Eval Steps */
@@ -245,6 +248,33 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *object,
}
OperationKey pose_done_key(&object->id, NodeType::EVAL_POSE, OperationCode::POSE_DONE);
add_relation(solver_key, pose_done_key, "PoseEval Result-Bone Link");
+
+ /* Add relation when the root of this IK chain is influenced by another IK chain. */
+ build_inter_ik_chains(object, solver_key, rootchan, root_map);
+}
+
+void DepsgraphRelationBuilder::build_inter_ik_chains(Object *object,
+ const OperationKey &solver_key,
+ const bPoseChannel *rootchan,
+ const RootPChanMap *root_map)
+{
+ bPoseChannel *deepest_root = nullptr;
+ const char *root_name = rootchan->name;
+
+ /* Find shared IK chain root. */
+ for (bPoseChannel *parchan = rootchan->parent; parchan; parchan = parchan->parent) {
+ if (!root_map->has_common_root(root_name, parchan->name)) {
+ break;
+ }
+ deepest_root = parchan;
+ }
+ if (deepest_root == nullptr) {
+ return;
+ }
+
+ OperationKey other_bone_key(
+ &object->id, NodeType::BONE, deepest_root->name, OperationCode::BONE_DONE);
+ add_relation(other_bone_key, solver_key, "IK Chain Overlap");
}
/* Pose/Armature Bones Graph */