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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-07-30 17:54:40 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-07-30 17:58:44 +0300
commita3b6ae9fb9dd76538ec04b9fa6953490d321dd32 (patch)
tree0bce9a5d00551e94b15e5195c7a80370ff6f788f /source/blender/modifiers/intern/MOD_array.c
parent6d6deeb70086564418368a5213cd9d28cdfa51e2 (diff)
Cleanup/Refactor: Move CurveCache runtime data into Object.runtime struct.
Also, fix missing cleanup of Object.runtime when copying Object datablocks!
Diffstat (limited to 'source/blender/modifiers/intern/MOD_array.c')
-rw-r--r--source/blender/modifiers/intern/MOD_array.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 5ae0013aab0..085f21fe138 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -456,9 +456,10 @@ static Mesh *arrayModifier_doArray(
if (amd->fit_type == MOD_ARR_FITCURVE && amd->curve_ob) {
Curve *cu = amd->curve_ob->data;
if (cu) {
- if (amd->curve_ob->curve_cache && amd->curve_ob->curve_cache->path) {
+ CurveCache *curve_cache = amd->curve_ob->runtime.curve_cache;
+ if (curve_cache != NULL && curve_cache->path != NULL) {
float scale_fac = mat4_to_scale(amd->curve_ob->obmat);
- length = scale_fac * amd->curve_ob->curve_cache->path->totdist;
+ length = scale_fac * curve_cache->path->totdist;
}
}
}