diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-10-12 13:15:05 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-10-12 13:15:05 +0300 |
commit | 07332dd2bbe62506bef89ffad22ad01766922c8e (patch) | |
tree | 274cffe797a273d9ab24834aeefcb8757d1ec7bc /intern | |
parent | 9cea429f787727d8a19b9dfe179a5b7ba2d92fd0 (diff) |
Fix T34446: Make Local on linked mesh object: object gets removed if redo function is used.
Root of the issue is that we do not re-read lib data blocks and ID placholders (ID_ID bheads)
in undo context (in `blo_read_file_internal`), because `BLO_read_from_memfile` copies
lib datablocks and Main data directly from oldmain.
The idea being, linked data do not change from undo/redo.
This is valid as long as linked data was not changed by the undo step - but if some
was deleted or localized, it will be missing from oldmain, leading to data loss
(note that does not only concern objects, all linkable data types can be affected,
at least in theory).
This commit addresses that issue by carefully mixing reuse of needed data from oldmain,
and "normal" re-reading of missing one. Makes us swimming in some rather dark waters,
and gives a rather non-easy-to-follow code, but it seems to work quite well,
and only other solution would be to get rid of that optimization
(not re-reading all libs on undo/redo), which is not acceptable.
Also, thanks to @carlosdp for initial investigation of the issue.
Differential Revision: https://developer.blender.org/D1485
Diffstat (limited to 'intern')
0 files changed, 0 insertions, 0 deletions