diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-05 17:26:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-05 17:26:39 +0300 |
commit | 2412451595c74f9482ff18c5bfa07e87b2b27892 (patch) | |
tree | 6596f55fd2d2a2c68e3c4a325abba7f51a4d439e /source/blender/modifiers/intern | |
parent | 16767c4e2294c505d74bdfd99b57700cb9b87338 (diff) | |
parent | a1747b058d7f8e06e2f317736509d6bdb2d7ae2a (diff) |
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 644ac3a10e8..3b50cfe704a 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -80,16 +80,13 @@ static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) { ArrayModifierData *amd = (ArrayModifierData *)md; + bool need_transform_dependency = false; if (amd->start_cap != NULL) { DEG_add_object_relation( - ctx->node, amd->start_cap, DEG_OB_COMP_TRANSFORM, "Array Modifier Start Cap"); - DEG_add_object_relation( ctx->node, amd->start_cap, DEG_OB_COMP_GEOMETRY, "Array Modifier Start Cap"); } if (amd->end_cap != NULL) { DEG_add_object_relation( - ctx->node, amd->end_cap, DEG_OB_COMP_TRANSFORM, "Array Modifier End Cap"); - DEG_add_object_relation( ctx->node, amd->end_cap, DEG_OB_COMP_GEOMETRY, "Array Modifier End Cap"); } if (amd->curve_ob) { @@ -100,8 +97,12 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte if (amd->offset_ob != NULL) { DEG_add_object_relation( ctx->node, amd->offset_ob, DEG_OB_COMP_TRANSFORM, "Array Modifier Offset"); + need_transform_dependency = true; + } + + if (need_transform_dependency) { + DEG_add_modifier_to_transform_relation(ctx->node, "Array Modifier"); } - DEG_add_modifier_to_transform_relation(ctx->node, "Array Modifier"); } BLI_INLINE float sum_v3(const float v[3]) |