Fix #109898: Incorrect behavior when moving objects to linked collection

Do not move objects to a collection which is linked from another file.

Pull Request: https://projects.blender.org/blender/blender/pulls/109957
This commit is contained in:
Pratik Borhade
2023-07-11 11:54:21 +05:30
committed by Gitea
parent 70b05249cb
commit 53e1bae929

View File

@@ -1936,8 +1936,9 @@ static int move_to_collection_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
if (ID_IS_OVERRIDE_LIBRARY(collection)) {
BKE_report(op->reports, RPT_ERROR, "Cannot add objects to a library override collection");
if (ID_IS_LINKED(collection) || ID_IS_OVERRIDE_LIBRARY(collection)) {
BKE_report(
op->reports, RPT_ERROR, "Cannot add objects to a library override or linked collection");
return OPERATOR_CANCELLED;
}