diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-29 13:27:59 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-29 13:27:59 +0300 |
commit | 08b79554156e81ece766e854fe15e34c7d4a7572 (patch) | |
tree | fbd03c0718de241e5441002d7a1784d8f966355f /source/blender/editors/space_outliner | |
parent | 2fb56e71575528be7c1a2b4b4fdf712d971e6eb5 (diff) |
Fix T51625: fix impossibility to delete uninstantiated objects from Outliner.
The fact that we can end with uninstantiated objects is not expected
currently, but would rather not start chasing all corner cases that may
lead to that situation.
User shall be able to delete uninstantiated objects from Outliner, though!
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 086cc55366b..cdb3df0fae9 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -431,6 +431,13 @@ static void object_delete_cb( tselem->id = NULL; #endif } + else { + /* No base, means object is no more instantiated in any scene. + * Should not happen ideally, but does happens, see T51625. + * Rather than twisting in all kind of ways to address all possible cases leading to that situation, simpler + * to allow deleting such object as a mere generic data-block. */ + WM_operator_name_call(C, "OUTLINER_OT_id_delete", WM_OP_INVOKE_REGION_WIN, NULL); + } } static void id_local_cb( |