Blender Git Loki

Git Commits -> Revision cf94571

Revision cf94571 by Julian Eisel (outliner-cpp-refactor)
November 6, 2020, 19:54 (GMT)
UI Code Quality: Start refactoring Outliner tree creation (using C++)

The Outliner tree creation was very messy and hard to follow. Hardcoded display
type checks are scattered over many places.
This introduces a new abstraction "tree-view" to help constructing and managing
the tree for the different display types (View Layer, Scene, Blender file,
etc.).

Idea is to have an abstract base class to define an interface
(`AbstractTreeView`), and then subclasses with the implementation of each
display type (e.g. `TreeViewViewLayer`, `TreeViewBlenderFile`, etc). The
tree-viewer is kept alive until tree-rebuild as runtime data of the space, so
that further queries based on the display type can be executed (e.g. "does the
view support selection syncing?", "does it support restriction toggle
columns?", etc.).

I may still change the names a bit, not sure yet if "tree-view" is the right
term for this helper.

Commit Details:

Full Hash: cf94571762f6ac34c59a926e3b3010a5657fbf78
Parent Commit: 37ef377
Lines Changed: +464, -223

3 Added Paths:

/source/blender/editors/space_outliner/tree/tree_view.cc (+61, -0) (View)
/source/blender/editors/space_outliner/tree/tree_view.hh (+89, -0) (View)
/source/blender/editors/space_outliner/tree/tree_view_view_layer.cc (+258, -0) (View)

6 Modified Paths:

/source/blender/blenkernel/intern/screen.c (+1, -0) (Diff)
/source/blender/editors/space_outliner/CMakeLists.txt (+3, -0) (Diff)
/source/blender/editors/space_outliner/outliner_intern.h (+12, -0) (Diff)
/source/blender/editors/space_outliner/outliner_tree.c (+20, -222) (Diff)
/source/blender/editors/space_outliner/space_outliner.c (+15, -1) (Diff)
/source/blender/makesdna/DNA_space_types.h (+5, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021