Fix #112767: Outliner unlink operation fails to unlink from scene #112955

Merged
Pratik Borhade merged 4 commits from PratikPB2123/blender:112767-outliner-scene-unlink into main 2023-11-23 14:49:26 +01:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit 41fbaab858 - Show all commits

View File

@ -473,9 +473,11 @@ static void unlink_object_fn(bContext *C,
DEG_relations_tag_update(bmain);
}
else if (GS(tsep->id->name) == ID_SCE) {
/* Following execution is expected to happen in outliner scene view. */
/* Following execution is expected to happen exclusively in the Outliner scene view. */

to happen exclusively in the Outliner Scene view

`to happen exclusively in the Outliner Scene view`
#ifdef NDEBUG

These two lines should be inside a #ifndef NDEBUG block.

These two lines should be inside a `#ifndef NDEBUG` block.
SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
BLI_assert(space_outliner->outlinevis == SO_SCENES);
#endif
Scene *scene = (Scene *)tsep->id;
FOREACH_SCENE_COLLECTION_BEGIN (scene, collection) {