diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-09 22:03:49 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-01-13 13:57:51 +0400 |
commit | f86fbc4ea31f743b8a28d4f91dc2eff209740507 (patch) | |
tree | a41e381399d8a50937fa923fa30feeb24ce372d8 /source/blender/blenkernel/intern/font.c | |
parent | 9d882031014abdd6daafe3a1235cd263edbc58fc (diff) |
Remove direct displist creation from BKE_vfont_to_curve_ex()
This goes back to ancient era again and such a call isn't
safe for threading and really DAG is to make it sure display
list for dependencies is always there.
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 3e512525192..36171c2630d 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -520,8 +520,7 @@ static float char_width(Curve *cu, VChar *che, CharInfo *info) } } -bool BKE_vfont_to_curve_ex(Main *bmain, Scene *scene, Object *ob, int mode, - ListBase *r_nubase, +bool BKE_vfont_to_curve_ex(Main *bmain, Object *ob, int mode, ListBase *r_nubase, const wchar_t **r_text, int *r_text_len, bool *r_text_free, struct CharTrans **r_chartransdata) { @@ -870,10 +869,8 @@ makebreak: int oldflag = cucu->flag; cucu->flag |= (CU_PATH + CU_FOLLOW); - - if (cu->textoncurve->curve_cache == NULL || cu->textoncurve->curve_cache->path == NULL) { - BKE_displist_make_curveTypes(scene, cu->textoncurve, 0); - } + + BLI_assert(cu->textoncurve->curve_cache != NULL); if (cu->textoncurve->curve_cache->path) { float distfac, imat[4][4], imat3[3][3], cmat[3][3]; float minx, maxx, miny, maxy; @@ -1135,21 +1132,17 @@ finally: } -bool BKE_vfont_to_curve_nubase(Main *bmain, Scene *scene, Object *ob, int mode, - ListBase *r_nubase) +bool BKE_vfont_to_curve_nubase(Main *bmain, Object *ob, int mode, ListBase *r_nubase) { BLI_assert(ob->type == OB_FONT); - return BKE_vfont_to_curve_ex(bmain, scene, ob, mode, - r_nubase, + return BKE_vfont_to_curve_ex(bmain, ob, mode, r_nubase, NULL, NULL, NULL, NULL); } -bool BKE_vfont_to_curve(Main *bmain, Scene *scene, Object *ob, int mode) +bool BKE_vfont_to_curve(Main *bmain, Object *ob, int mode) { Curve *cu = ob->data; - return BKE_vfont_to_curve_ex(bmain, scene, ob, mode, - &cu->nurb, - NULL, NULL, NULL, NULL); + return BKE_vfont_to_curve_ex(bmain, ob, mode, &cu->nurb, NULL, NULL, NULL, NULL); } |