Fix T85947: Missing check of master collection for objects being instanced.
`object_in_any_collection` used during linking/appending to check whether an object is already instanced by at least one collection, was not taking into account embedded master collections from scenes.
This commit is contained in:
@@ -4600,6 +4600,13 @@ static bool object_in_any_collection(Main *bmain, Object *ob)
|
||||
}
|
||||
}
|
||||
|
||||
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
|
||||
if (scene->master_collection != NULL &&
|
||||
BKE_collection_has_object(scene->master_collection, ob)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user