Fix undo deletion of linked object
AbandonedPublic

Authored by Carlos Diaz-Padron (carlosdp) on Jun 25 2015, 12:39 AM.

Details

Summary

There was a code path diversion which prevented blo_red_file_internal
from reading lib blocks from the memory file because it assumed that the
library of objects would remain the same between undos. However, in the
case where we delete the object and there are no other duplicates, the
user count reaches 0 and object_delete_exec will remove the linked
library object from the Context.

This patch removes this code path so that lib blocks are read by the
parser for both file opens and undo/redos.

Diff Detail

Repository
rB Blender
Branch
fix-undo-delete-linked-obj
Carlos Diaz-Padron (carlosdp) retitled this revision from to Fix undo deletion of linked object.Jun 25 2015, 12:39 AM
Carlos Diaz-Padron (carlosdp) updated this object.

Based on the comments attached to the relevant code paths (unless I am reading them incorrectly), it looks like this was put in place as an optimization. I could be wrong though, this is my first contribution so guidance is appreciated.

Quick review, copied from irc.

This sounds like a valid bug report, but the fix shouldn't be a complete rewind of the feature itself.

Linking in production setups usually goes via entire scenes and groups. For that this is a great feature to keep.

Patch offers incorrect solution as Ton noted, closing.