It should not be possible for other types of datablocks to point to UI
datablocks, so there is also no need to store them in fd->libmap. There
can be pointers in the other direction but that should be ok.
Depends on D7328
Differential D7329
Cleanup: skip reading UI datablocks entirely for undo Authored by Brecht Van Lommel (brecht) on Apr 3 2020, 5:17 PM. Tags None Subscribers None
Details It should not be possible for other types of datablocks to point to UI Depends on D7328
Diff Detail
Event TimelineComment Actions
I don't think this is true? What about userdata (IDProperties, but also potentially from scripting) ID pointers? those can link any kind of ID afair? Comment Actions Ah, I forgot about ID properties. The current situation seems to be that such pointers to UI datablocks will be restored when the experimental undo speedup up is enabled. They are lost in 2.82 (because the UI datablocks pointed to get removed, in fact I think it will crash). They are also lost when the speedup in 2.83 is disabled (since BKE_main_idmap_lookup_uuid is not called and id_old will be NULL). I could add code to preserve them, but I think they just shouldn't be supported in the first place and I'd rather such pointers just end up NULL here. So I would still like to keep this patch as is, but maybe with updated comment. Comment Actions I don't mind much indeed, but then we should explicitly forbid those in IDProp code imho... Or at the very least, update documentation accordingly indeed. |