Merge branch 'blender-v3.3-release'

This commit is contained in:
Aras Pranckevicius 2022-08-02 21:01:54 +03:00
commit 5ddaf2fa7b
1 changed files with 3 additions and 2 deletions

View File

@ -3715,14 +3715,15 @@ static int duplicate_exec(bContext *C, wmOperator *op)
}
}
CTX_DATA_END;
/* Sync the collection now, after everything is duplicated. */
BKE_layer_collection_resync_allow();
BKE_main_collection_sync(bmain);
if (source_bases_new_objects.is_empty()) {
return OPERATOR_CANCELLED;
}
/* Sync the collection now, after everything is duplicated. */
BKE_main_collection_sync(bmain);
/* After sync we can get to the new Base data, process it here. */
for (const auto &item : source_bases_new_objects) {
Object *ob_new = item.second;