Incorrect behavior when moving/linking objects to non-overridden linked collection #109898
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 517.48
Broken: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash:
Short description of error
Using the shortcuts M (move to collection) and shift + M (link to collection) causes strange/incorrect behavior when the collection you are trying to move/link the object to is an externally linked, non-overridden collection. Doing the move operation causes the object to be unlinked from the scene, making it inexplicably disappear. Doing the link operation produces no result, (which is expected, because the operation shouldn't be valid), however, no error message appears, and the information pop-up in the status bar says that object was linked to the collection, which is incorrect.
Exact steps for others to reproduce the error
- Download both attached files and open linking.blend.
- Select the icosphere
- Press Shift + M, link it to the 'Source' collection. Note the information pop-up in the status bar.
- Press M on the icosphere and move it to the Source collection. The icosphere disappears, as it's unlinked from the scene.
Hi, thanks for the report. Can confirm. So two different issues are here:
- incorrect report/info message
- object disappearing when
move_to_collectionoperation is called.
object disappearing when move_to_collection operation is called.
This is because we first add object to destination collection then remove the object from previous collection: https://projects.blender.org/blender/blender/src/branch/main/source/blender/blenkernel/intern/collection.c#L1627
in above case, add operation fails but we still remove the object from source collection
Submitted the fix which skips operation execution when collection is linked: #109957
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?