Commit: 208a0808b31e374d8116f46e5c8a4be8ced6b289
Author: Sergey Sharybin
Date: Thu Jan 31 17:57:01 2019 +0100
Branches: master
https://developer.blender.org/rB208a0808b31e374d8116f46e5c8a4be8ced6b289
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.
===================================================================
M source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
===================================================================
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])) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs