[Bf-blender-cvs] [8009562] depsgraph_refactor: Depsgraph: Implement updateDepsgraph for armature modifier
Sergey Sharybin
noreply at git.blender.org
Mon Nov 10 11:08:37 CET 2014
Commit: 8009562e5f300bf26b38e0931d3fe10daaaac764
Author: Sergey Sharybin
Date: Fri Nov 7 15:06:34 2014 +0100
Branches: depsgraph_refactor
https://developer.blender.org/rB8009562e5f300bf26b38e0931d3fe10daaaac764
Depsgraph: Implement updateDepsgraph for armature modifier
So now dependencies between object and armature via the armature
modifier are all correct.
===================================================================
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 899d760..47105b6 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -114,6 +114,18 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
}
+static void updateDepsgraph(ModifierData *md,
+ struct Scene *UNUSED(scene),
+ Object *UNUSED(ob),
+ struct DepsNodeHandle *node)
+{
+ ArmatureModifierData *amd = (ArmatureModifierData *) md;
+
+ if (amd->object != NULL) {
+ DEG_add_object_relation(node, amd->object, DEG_OB_COMP_GEOMETRY, "Armature Modifier");
+ }
+}
+
static void deformVerts(ModifierData *md, Object *ob,
DerivedMesh *derivedData,
float (*vertexCos)[3],
@@ -207,7 +219,7 @@ ModifierTypeInfo modifierType_Armature = {
/* freeData */ NULL,
/* isDisabled */ isDisabled,
/* updateDepgraph */ updateDepgraph,
- /* updateDepsgraph */ NULL,
+ /* updateDepsgraph */ updateDepsgraph,
/* dependsOnTime */ NULL,
/* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index ec5652f..efaa042 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -127,7 +127,7 @@ static void updateDepsgraph(ModifierData *md,
{
HookModifierData *hmd = (HookModifierData *) md;
- if (hmd->object) {
+ if (hmd->object != NULL) {
/* TODO(sergey): Different relation type depending on subtarget? */
DEG_add_object_relation(node, hmd->object, DEG_OB_COMP_GEOMETRY, "Hook Modifier");
}
More information about the Bf-blender-cvs
mailing list