diff options
author | Aras Pranckevicius <aras@nesnausk.org> | 2022-05-23 20:42:27 +0300 |
---|---|---|
committer | Aras Pranckevicius <aras@nesnausk.org> | 2022-05-23 20:42:27 +0300 |
commit | 9e45af530aa3a035da4f393b0d3087511414d66c (patch) | |
tree | 3df9ad25552cd9dadd99a9908feb63bb9b404377 /source/blender/editors/io | |
parent | a8c81ffa83122661b80e842ddd641e366b3d5c04 (diff) |
Fix T98293: Scene stats info not updated after new OBJ import
The importer was not doing a notification that the scene has changed, so
the bottom status bar scene stats info was not updated right after the
new OBJ import.
Reviewed By: Julian Eisel
Differential Revision: https://developer.blender.org/D15015
Diffstat (limited to 'source/blender/editors/io')
-rw-r--r-- | source/blender/editors/io/io_obj.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/io/io_obj.c b/source/blender/editors/io/io_obj.c index 886586ff236..f1cd7607771 100644 --- a/source/blender/editors/io/io_obj.c +++ b/source/blender/editors/io/io_obj.c @@ -16,6 +16,8 @@ #include "BLT_translation.h" +#include "ED_outliner.h" + #include "MEM_guardedalloc.h" #include "RNA_access.h" @@ -410,6 +412,12 @@ static int wm_obj_import_exec(bContext *C, wmOperator *op) OBJ_import(C, &import_params); + Scene *scene = CTX_data_scene(C); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); + WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene); + ED_outliner_select_sync_from_object_tag(C); + return OPERATOR_FINISHED; } |