diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-30 04:47:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-30 04:51:38 +0300 |
commit | 6ab8cbc68cd1b6c2e8f30e42c57585fa8defaf05 (patch) | |
tree | 6c1355b841e62ca764896b126ac8913567d5b118 /source/blender/editors/curve | |
parent | 6250a8725ed6a2d9d85f4d313e9931c2fe4a8de3 (diff) |
Text: support "Text to 3D Object" for read-only data
Add poll function for read-only text data,
for operators that don't require the text to be editable.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editfont.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 2a880c11afb..1e5984ee14c 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -635,7 +635,10 @@ void FONT_OT_text_paste_from_file(wmOperatorType *ot) /** \name Text To Object * \{ */ -static void txt_add_object(bContext *C, TextLine *firstline, int totline, const float offset[3]) +static void txt_add_object(bContext *C, + const TextLine *firstline, + int totline, + const float offset[3]) { Main *bmain = CTX_data_main(C); Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); @@ -644,7 +647,7 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, const Curve *cu; Object *obedit; Base *base; - struct TextLine *tmp; + const struct TextLine *tmp; int nchars = 0, nbytes = 0; char *s; int a; @@ -709,10 +712,10 @@ static void txt_add_object(bContext *C, TextLine *firstline, int totline, const WM_event_add_notifier(C, NC_OBJECT | NA_ADDED, obedit); } -void ED_text_to_object(bContext *C, Text *text, const bool split_lines) +void ED_text_to_object(bContext *C, const Text *text, const bool split_lines) { RegionView3D *rv3d = CTX_wm_region_view3d(C); - TextLine *line; + const TextLine *line; float offset[3]; int linenum = 0; |