[Bf-blender-cvs] [b4b269f] master: Depsgraph: Add some missing relations
Sergey Sharybin
noreply at git.blender.org
Wed May 11 09:28:39 CEST 2016
Commit: b4b269f38e6dbf45f97d2b80e6a4d7f787d85192
Author: Sergey Sharybin
Date: Wed May 11 09:23:11 2016 +0200
Branches: master
https://developer.blender.org/rBb4b269f38e6dbf45f97d2b80e6a4d7f787d85192
Depsgraph: Add some missing relations
Those cases requires not only geometry component, but also a transform one
to be ready before evaluation can start.
===================================================================
M source/blender/modifiers/intern/MOD_armature.c
M source/blender/modifiers/intern/MOD_hook.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index d9ace45..2241a78 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -124,6 +124,7 @@ static void updateDepsgraph(ModifierData *md,
ArmatureModifierData *amd = (ArmatureModifierData *)md;
if (amd->object != NULL) {
DEG_add_object_relation(node, amd->object, DEG_OB_COMP_EVAL_POSE, "Armature Modifier");
+ DEG_add_object_relation(node, amd->object, DEG_OB_COMP_TRANSFORM, "Armature Modifier");
}
}
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index e175f49..bec0cc0 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -139,20 +139,21 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
static void updateDepsgraph(ModifierData *md,
struct Main *UNUSED(bmain),
struct Scene *UNUSED(scene),
- Object *UNUSED(ob),
+ Object *ob,
struct DepsNodeHandle *node)
{
HookModifierData *hmd = (HookModifierData *)md;
if (hmd->object != NULL) {
if (hmd->subtarget[0]) {
- /* TODO(sergey): Hpw do we add relation to bone here? */
- //DEG_add_object_relation(node, hmd->object, DEG_OB_COMP_EVAL_POSE, "Hook Modifier");
+ DEG_add_bone_relation(node, hmd->object, hmd->subtarget, DEG_OB_COMP_TRANSFORM, "Hook Modifier");
DEG_add_bone_relation(node, hmd->object, hmd->subtarget, DEG_OB_COMP_BONE, "Hook Modifier");
}
else {
DEG_add_object_relation(node, hmd->object, DEG_OB_COMP_TRANSFORM, "Hook Modifier");
}
}
+ /* We need own transformation as well. */
+ DEG_add_object_relation(node, ob, DEG_OB_COMP_TRANSFORM, "Hook Modifier");
}
struct HookData_cb {
More information about the Bf-blender-cvs
mailing list