Blender Git Commit Log

Git Commits -> Revision 84b3f6e

Revision 84b3f6e by Bastien Montagne (master)
September 29, 2020, 15:08 (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: 84b3f6e049b35f9fce799e23acfde79511480206
Parent Commit: ece8f69
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