Blender Git Commit Log
Git Commits -> Revision 2e221de
Revision 2e221de by Julian Eisel (master) December 7, 2020, 13:51 (GMT) |
UI Code Quality: Start refactoring Outliner tree-element building (using C++) Continuation of the work started with 249e4df110e0. After all display modes were ported to this new design, this commit starts the (more complex) work on the individual tree-element types. More concretely it ports animation tree-elements (action data-blocks, drivers and NLA data). The commit above explains motivations. In short, we need a better design that's easier to reason about and better testable. Changes done here are pretty straight forward and introduce similar class hierarchy and building patterns as introduced for the display modes already. I.e. an abstract base class, `AbstractTreeElement` with derived classes for the concrete types, and a C-API with a switch to create the needed objects from a type enum. The latter should be replacable with something nicer later on (RAII based, and type-safer through meta-programming). Each tree-element type has its own class, with an own header and source file (okay some closely related types can share a header and source file, like the NLA ones). I added some further temporary bits for the transition to the new design, such as the `TreeElement.type`. It should entirely replace `TreeElement` eventually, just as `outliner_add_element()` should be quite small by then and easily replacable by a `TreeBuilder` helper. |
Commit Details:
Full Hash: 2e221de4ceeedcaf6e322d9cd72b148cb04cdac4
Parent Commit: 634b10a
Lines Changed: +566, -63
9 Added Paths:
/source/blender/editors/space_outliner/tree/tree_element.cc (+88, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element.h (+45, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element.hh (+53, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_anim_data.cc (+70, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh (+42, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_driver_base.cc (+68, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_driver_base.hh (+38, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_nla.cc (+78, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_nla.hh (+53, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element.h (+45, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element.hh (+53, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_anim_data.cc (+70, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_anim_data.hh (+42, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_driver_base.cc (+68, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_driver_base.hh (+38, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_nla.cc (+78, -0) (View)
/source/blender/editors/space_outliner/tree/tree_element_nla.hh (+53, -0) (View)