diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-14 08:41:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-14 08:41:40 +0300 |
commit | 4f5ef3b01817ec8b73dca9e6fa1672fbe09167e4 (patch) | |
tree | 53eef3764d485982705544f1a1fa82e5286ee6e0 | |
parent | 3be2d6078f8c7831db59b4c0095fe3dd8bbabf16 (diff) |
WM: quiet output of delete object operator
Object deletion was reporting the number of objects deleted,
causing tests to print noisy output.
Now this is information is only included when invoked.
-rw-r--r-- | source/blender/editors/object/object_add.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 4b2315c0552..cf7c848ae24 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1997,6 +1997,7 @@ static int object_delete_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); wmWindowManager *wm = CTX_wm_manager(C); const bool use_global = RNA_boolean_get(op->ptr, "use_global"); + const bool confirm = op->flag & OP_IS_INVOKE; uint changed_count = 0; uint tagged_count = 0; @@ -2075,7 +2076,9 @@ static int object_delete_exec(bContext *C, wmOperator *op) BKE_id_multi_tagged_delete(bmain); } - BKE_reportf(op->reports, RPT_INFO, "Deleted %u object(s)", (changed_count + tagged_count)); + if (confirm) { + BKE_reportf(op->reports, RPT_INFO, "Deleted %u object(s)", (changed_count + tagged_count)); + } /* delete has to handle all open scenes */ BKE_main_id_tag_listbase(&bmain->scenes, LIB_TAG_DOIT, true); |