Blender Git Commit Log

Git Commits -> Revision d704c29

October 1, 2020, 13:37 (GMT)
Fix (unrepported) utterly broken logic in readfile for Workspaces.

Remove the attempt to update the active layout pointers of each window
from whithin `direct_link_workspace`.

This piece of code was a nonsense for at least to critical reasons:
* Do not, never, ever, access data from another datablock within the
direct_link_... functions. Just don't. Don't try to be smart.
* Since it was trying (and failing) to update the active layout of every
window for every workspace, it was effectively setting those
`act_layout` pointers to NULL (remapping can only ever happen once,
trying to remap and already remapped new pointer is bound to fail in
any case).

Luckily (and funnily), this piece of code was actually harmless, since
setting the active layout would be overridden/redone later, in
`lib_link_windowmanager`, when updating their `workspace_hook` in
`lib_link_workspace_instance_hook`.

Note that the similar horror with `WorkSpaceDataRelation->parent` (which
points at a window) is kept for now, because that one is needed. Hope to
refactor it soon though.

Commit Details:

Full Hash: d704c293c2edcea5249b5dee709d2bc8865c753b
Parent Commit: cc13cac
Committed By: YimingWu
Lines Changed: +6, -10

1 Modified Path:

/source/blender/blenloader/intern/readfile.c (+6, -10) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021