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:
authorCody Winchester <CodyWinch>2020-04-10 15:03:36 +0300
committerBastien Montagne <bastien@blender.org>2020-04-10 22:28:59 +0300
commit4f9a56cbc4e8719ee421a57fd6695bed633c591b (patch)
tree93f85984753bca057c65ac04beaa8e8effa71423 /source/blender/modifiers/intern/MOD_displace.c
parentd6cefef98f87ae8554050052d0fa4f965a2ce809 (diff)
Modifiers: Add Bone option for Texture Mask Object
This patch adds the option to use an armature bone in place of an object for texture mask coordinates. This affects the 3 vertex weight modifiers, the displace modifier, the warp modifier, and the wave modifier. With minor changes from Bastien Montagne (@mont29). Differential Revision: https://developer.blender.org/D7348
Diffstat (limited to 'source/blender/modifiers/intern/MOD_displace.c')
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index a1b02e201d9..a03167c082f 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -135,9 +135,15 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
{
DisplaceModifierData *dmd = (DisplaceModifierData *)md;
if (dmd->map_object != NULL && dmd->texmapping == MOD_DISP_MAP_OBJECT) {
+ if (dmd->map_bone[0] && dmd->map_object->type == OB_ARMATURE) {
+ DEG_add_object_relation(
+ ctx->node, dmd->map_object, DEG_OB_COMP_EVAL_POSE, "Displace Modifier");
+ }
+ else {
+ DEG_add_object_relation(
+ ctx->node, dmd->map_object, DEG_OB_COMP_TRANSFORM, "Displace Modifier");
+ }
DEG_add_modifier_to_transform_relation(ctx->node, "Displace Modifier");
- DEG_add_object_relation(
- ctx->node, dmd->map_object, DEG_OB_COMP_TRANSFORM, "Displace Modifier");
}
if (dmd->texmapping == MOD_DISP_MAP_GLOBAL ||
(ELEM(