diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-26 13:25:07 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-04-01 15:43:45 +0300 |
commit | 64c8d72ef1ad01dae0ef0a7a78a47d7c83a240d4 (patch) | |
tree | ec85173659b0637ea9dfec8c8e900b46bbe9c808 /source/blender/modifiers/intern/MOD_array.c | |
parent | a2a571987c6f6a1caee57057cfed18896b786c5b (diff) |
Modifiers: Use object passed to evaluation
This was wrong and violating design to force modifiers to query
evaluated objects and IDs. It is up to the caller to make sure
the object is properly evaluatable.
Effectively, reverting changes from de491abf9962 (and possibly
other related changes).
Diffstat (limited to 'source/blender/modifiers/intern/MOD_array.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 2af89b00c16..542c7665807 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -374,7 +374,7 @@ static Mesh *arrayModifier_doArray( count = amd->count; - Object *start_cap_ob = DEG_get_evaluated_object(ctx->depsgraph, amd->start_cap); + Object *start_cap_ob = amd->start_cap; if (start_cap_ob && start_cap_ob != ctx->object && start_cap_ob->type == OB_MESH) { vgroup_start_cap_remap = BKE_object_defgroup_index_map_create( start_cap_ob, ctx->object, &vgroup_start_cap_remap_len); @@ -387,7 +387,7 @@ static Mesh *arrayModifier_doArray( start_cap_npolys = start_cap_mesh->totpoly; } } - Object *end_cap_ob = DEG_get_evaluated_object(ctx->depsgraph, amd->end_cap); + Object *end_cap_ob = amd->end_cap; if (end_cap_ob && end_cap_ob != ctx->object && end_cap_ob->type == OB_MESH) { vgroup_end_cap_remap = BKE_object_defgroup_index_map_create( end_cap_ob, ctx->object, &vgroup_end_cap_remap_len); @@ -433,7 +433,7 @@ static Mesh *arrayModifier_doArray( else unit_m4(obinv); - mul_m4_series(result_mat, offset, obinv, DEG_get_evaluated_object(ctx->depsgraph, amd->offset_ob)->obmat); + mul_m4_series(result_mat, offset, obinv, amd->offset_ob->obmat); copy_m4_m4(offset, result_mat); } @@ -442,7 +442,7 @@ static Mesh *arrayModifier_doArray( offset_has_scale = !is_one_v3(scale); if (amd->fit_type == MOD_ARR_FITCURVE && amd->curve_ob != NULL) { - Object *curve_ob = DEG_get_evaluated_object(ctx->depsgraph, amd->curve_ob); + Object *curve_ob = amd->curve_ob; Curve *cu = curve_ob->data; if (cu) { CurveCache *curve_cache = curve_ob->runtime.curve_cache; |