diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-08-26 05:59:22 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-09-06 10:30:29 +0300 |
commit | 933c6b7d8a337c7d78246523e6eaefe1daf72790 (patch) | |
tree | 94a5adc1f368b4023dd94af204bbbb3a576cfa59 | |
parent | 969d6d3a0ff6bf92a9bf8dd4dc65e10ba372c116 (diff) |
Fix "Text to Object" creating invisible object
Newly created objects would not become visible until
another action forced a depsgraph update.
-rw-r--r-- | source/blender/editors/curve/editfont.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 80771df3572..99ec90a1410 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -59,6 +59,7 @@ #include "ED_curve.h" #include "ED_object.h" +#include "ED_outliner.h" #include "ED_screen.h" #include "ED_view3d.h" @@ -714,6 +715,7 @@ static void txt_add_object(bContext *C, void ED_text_to_object(bContext *C, const Text *text, const bool split_lines) { + Main *bmain = CTX_data_main(C); RegionView3D *rv3d = CTX_wm_region_view3d(C); const TextLine *line; float offset[3]; @@ -752,6 +754,9 @@ void ED_text_to_object(bContext *C, const Text *text, const bool split_lines) txt_add_object(C, text->lines.first, BLI_listbase_count(&text->lines), offset); } + + DEG_relations_tag_update(bmain); + ED_outliner_select_sync_from_object_tag(C); } /** \} */ |