[Bf-blender-cvs] [2fb57685e39] master: Fix "Text to Object" creating invisible object

Campbell Barton noreply at git.blender.org
Thu Aug 26 05:04:03 CEST 2021


Commit: 2fb57685e393e2d9e59fe9bde02358e28f3e57a3
Author: Campbell Barton
Date:   Thu Aug 26 12:59:22 2021 +1000
Branches: master
https://developer.blender.org/rB2fb57685e393e2d9e59fe9bde02358e28f3e57a3

Fix "Text to Object" creating invisible object

Newly created objects would not become visible until
another action forced a depsgraph update.

===================================================================

M	source/blender/editors/curve/editfont.c

===================================================================

diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index b7deea5069e..d029bb539ba 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"
 
@@ -704,6 +705,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];
@@ -742,6 +744,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);
 }
 
 /** \} */



More information about the Bf-blender-cvs mailing list