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
This commit is contained in:
parent
7ff5f95657
commit
fb64ee005a
Notes:
blender-bot
2023-02-14 10:09:24 +01:00
Referenced by issue #98661, 3.2: Potential candidates for corrective releases Referenced by issue #98293, Scene info not updated after new OBJ import
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,12 +92,14 @@ struct OBJImportParams {
|
|||
};
|
||||
|
||||
/**
|
||||
* Time the full import process.
|
||||
* Perform the full import process.
|
||||
* Import also changes the selection & the active object; callers
|
||||
* need to update the UI bits if needed.
|
||||
*/
|
||||
void OBJ_import(bContext *C, const struct OBJImportParams *import_params);
|
||||
|
||||
/**
|
||||
* C-interface for the exporter.
|
||||
* Perform the full export process.
|
||||
*/
|
||||
void OBJ_export(bContext *C, const struct OBJExportParams *export_params);
|
||||
|
||||
|
|
Loading…
Reference in New Issue