diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-12 16:03:51 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-12 16:03:51 +0300 |
commit | d617a6c85b4874a81d86568d00b56f2bda11c4b4 (patch) | |
tree | 23336dbb317a3fcc0294728521e19d7f3ba6cb9c /source/blender/editors/curve | |
parent | be57cf9b2a0e1be577211839487cacd288886c1a (diff) |
Cleanup/simplify G.main usages.
Using G.main only to get main bled filepath, or built-in fonts, is OK.
So now using the 'valid' G_MAIN macro here instead.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editfont.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index e4db0f1b3fc..bc4a4d0105d 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -245,7 +245,6 @@ static int insert_into_textbuf(Object *obedit, uintptr_t c) static void text_update_edited(bContext *C, Object *obedit, int mode) { - struct Main *bmain = CTX_data_main(C); Curve *cu = obedit->data; EditFont *ef = cu->editfont; @@ -258,7 +257,7 @@ static void text_update_edited(bContext *C, Object *obedit, int mode) } else { /* depsgraph runs above, but since we're not tagging for update, call direct */ - BKE_vfont_to_curve(bmain, obedit, mode); + BKE_vfont_to_curve(obedit, mode); } cu->curinfo = ef->textbufinfo[ef->pos ? ef->pos - 1 : 0]; @@ -977,16 +976,14 @@ static int move_cursor(bContext *C, int type, const bool select) /* apply virtical cursor motion to position immediately * otherwise the selection will lag behind */ if (FO_CURS_IS_MOTION(cursmove)) { - struct Main *bmain = CTX_data_main(C); - BKE_vfont_to_curve(bmain, obedit, cursmove); + BKE_vfont_to_curve(obedit, cursmove); cursmove = FO_CURS; } if (select == 0) { if (ef->selstart) { - struct Main *bmain = CTX_data_main(C); ef->selstart = ef->selend = 0; - BKE_vfont_to_curve(bmain, obedit, FO_SELCHANGE); + BKE_vfont_to_curve(obedit, FO_SELCHANGE); } } |