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!
This commit is contained in:
parent
2fb56e7157
commit
08b7955415
Notes:
blender-bot
2023-02-14 10:21:11 +01:00
Referenced by issue #51625, Deleting an object doesn't always remove shader node links to it
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue