Blender Git Loki

Git Commits -> Revision 180ad9f

Revision 180ad9f by Julian Eisel (workspaces)
May 30, 2017, 23:25 (GMT)
Refactor workspace data accessing

Following Campbell's and Bastien's suggestion to avoid the
all-or-nothing approach of using private headers.
Instead of using private headers we do some trickery to mark struct
members or whole structs as private.
This way we don't have to go overkill with accessors/mutators but keep
them where it makes sense.

For now this adds a macro based on DNA_DEPRECATED, just to mark certain
struct members as workspace-private (throws 'deprecated' warning if used
outside of workspace.c -- this doesn't work on MSVC though, not sure on
Clang).

Also, this adds a macro to mark struct members as workspace and file
read/write private, not sure if this is really worth it. Just thought it
might be worth considering, since some data is really workspace internal
but needs to be exposed for file read/write.

Commit Details:

Full Hash: 180ad9f77e75159dabecc2f53318d02745cef60d
Parent Commit: 1474cab
Lines Changed: +238, -270

1 Deleted Path:

/source/blender/makesdna/dna_workspace_types.h (+137, -0)

14 Modified Paths:

/source/blender/blenkernel/BKE_workspace.h (+3, -30) (Diff)
/source/blender/blenkernel/intern/blendfile.c (+4, -4) (Diff)
/source/blender/blenkernel/intern/library.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/library_query.c (+3, -2) (Diff)
/source/blender/blenkernel/intern/workspace.c (+13, -64) (Diff)
/source/blender/blenloader/intern/readfile.c (+22, -25) (Diff)
/source/blender/blenloader/intern/versioning_defaults.c (+6, -3) (Diff)
/source/blender/blenloader/intern/writefile.c (+4, -2) (Diff)
/source/blender/CMakeLists.txt (+1, -1) (Diff)
/source/blender/editors/screen/workspace_edit.c (+12, -11) (Diff)
/source/blender/editors/screen/workspace_layout_edit.c (+5, -7) (Diff)
/source/blender/makesdna/intern/makesdna.c (+13, -2) (Diff)
/source/blender/makesrna/intern/rna_wm.c (+8, -6) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+5, -4) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021