diff options
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 64f44240eed..92cc3c763b6 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -1275,7 +1275,7 @@ static bool vfont_to_curve(Object *ob, if (cu->textoncurve && cu->textoncurve->type == OB_CURVE) { BLI_assert(cu->textoncurve->runtime.curve_cache != NULL); if (cu->textoncurve->runtime.curve_cache != NULL && - cu->textoncurve->runtime.curve_cache->path != NULL) { + cu->textoncurve->runtime.curve_cache->anim_path_accum_length != NULL) { float distfac, imat[4][4], imat3[3][3], cmat[3][3]; float minx, maxx; float timeofs, sizefac; @@ -1309,7 +1309,8 @@ static bool vfont_to_curve(Object *ob, /* length correction */ const float chartrans_size_x = maxx - minx; if (chartrans_size_x != 0.0f) { - const float totdist = cu->textoncurve->runtime.curve_cache->path->totdist; + const CurveCache *cc = cu->textoncurve->runtime.curve_cache; + const float totdist = BKE_anim_path_get_length(cc); distfac = (sizefac * totdist) / chartrans_size_x; distfac = (distfac > 1.0f) ? (1.0f / distfac) : 1.0f; } @@ -1363,8 +1364,8 @@ static bool vfont_to_curve(Object *ob, /* calc the right loc AND the right rot separately */ /* vec, tvec need 4 items */ - where_on_path(cu->textoncurve, ctime, vec, tvec, NULL, NULL, NULL); - where_on_path(cu->textoncurve, ctime + dtime, tvec, rotvec, NULL, NULL, NULL); + BKE_where_on_path(cu->textoncurve, ctime, vec, tvec, NULL, NULL, NULL); + BKE_where_on_path(cu->textoncurve, ctime + dtime, tvec, rotvec, NULL, NULL, NULL); mul_v3_fl(vec, sizefac); |