diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_array.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_array.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index e09fa18ffc5..3478ec6e3b4 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -50,6 +50,7 @@ #include "BKE_cdderivedmesh.h" #include "BKE_displist.h" +#include "BKE_curve.h" #include "BKE_mesh.h" #include "BKE_modifier.h" #include "BKE_object.h" @@ -387,12 +388,12 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BKE_object_to_mat3(amd->curve_ob, tmp_mat); scale = mat3_to_scale(tmp_mat); - if (!cu->path) { + if (!amd->curve_ob->curve_cache || !amd->curve_ob->curve_cache->path) { cu->flag |= CU_PATH; // needed for path & bevlist BKE_displist_make_curveTypes(scene, amd->curve_ob, 0); } - if (cu->path) - length = scale * cu->path->totdist; + if (amd->curve_ob->curve_cache->path) + length = scale * amd->curve_ob->curve_cache->path->totdist; } } |