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
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-01-31 19:57:01 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-01-31 19:57:01 +0300
commit208a0808b31e374d8116f46e5c8a4be8ced6b289 (patch)
treea3f4280ce000ce63a91d5eb0c7a3876700fc7761 /source
parent9d10fc13e770a0f63540f89644e3020a789d2a76 (diff)
Fix T60836: Stretch to flickers when vertex group is used
Missing relation to object transform. Needed to convert vertex position from local target object space to a local space of the bone.
Diffstat (limited to 'source')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc15
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc4
2 files changed, 13 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index a27507954fb..633646da918 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1062,10 +1062,17 @@ void DepsgraphRelationBuilder::build_constraints(ID *id,
(ct->subtarget[0]))
{
/* Vertex group. */
- /* NOTE: for now, we don't need to represent vertex groups
- * separately. */
- ComponentKey target_key(&ct->tar->id, NodeType::GEOMETRY);
- add_relation(target_key, constraint_op_key, cti->name);
+ /* NOTE: Vertex group is likely to be used to get vertices
+ * in a world space. This requires to know both geometry
+ * and transformation of the target object. */
+ ComponentKey target_transform_key(
+ &ct->tar->id, NodeType::TRANSFORM);
+ ComponentKey target_geometry_key(
+ &ct->tar->id, NodeType::GEOMETRY);
+ add_relation(
+ target_transform_key, constraint_op_key, cti->name);
+ add_relation(
+ target_geometry_key, constraint_op_key, cti->name);
add_customdata_mask(ct->tar, CD_MASK_MDEFORMVERT);
}
else if (con->type == CONSTRAINT_TYPE_SHRINKWRAP) {
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 0915da3f7cc..3ef0a13db66 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -102,12 +102,12 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
/* IK target */
/* TODO(sergey): This should get handled as part of the constraint code. */
if (data->tar != NULL) {
- /* TODO(sergey): For until we'll store partial matricies in the
+ /* TODO(sergey): For until we'll store partial matrices in the
* depsgraph, we create dependency between target object and pose eval
* component.
*
* This way we ensuring the whole subtree is updated from scratch
- * without need of intermediate matricies. This is an overkill, but good
+ * without need of intermediate matrices. This is an overkill, but good
* enough for testing IK solver. */
ComponentKey pose_key(&object->id, NodeType::EVAL_POSE);
if ((data->tar->type == OB_ARMATURE) && (data->subtarget[0])) {