Blender Git Commit Log

Git Commits -> Revision 2d5b89b

Revision 2d5b89b by Hans Goudey (master)
February 19, 2021, 22:29 (GMT)
Cleanup: Disentangle outliner active status "get" and "set"

Previously the same functions were used to both set and get the active
state for outliner tree elements. This has quite a few problems.
- It's hard to tell when data is changed or simply read
- It prevents using `const`
- The code is full of if statements, making it longer and less readable.

This commit replaces the `tree_element_type_active` and
`tree_element_active` functions with `_get` and `_set` variants. One
has const arguments and returns the active state, the other deals only
with setting the state. While this refactor results in slightly more
lines of code, the result is much better in my opinion.

This commit also removes unused variables from arguments of the affected
functions.

Differential Revision: https://developer.blender.org/D10232

Commit Details:

Full Hash: 2d5b89be89c20f36c3607fd52666dcdb6c9a597d
Parent Commit: a961a21
Lines Changed: +568, -529

3 Modified Paths:

/source/blender/editors/space_outliner/outliner_draw.c (+7, -27) (Diff)
/source/blender/editors/space_outliner/outliner_intern.h (+18, -13) (Diff)
/source/blender/editors/space_outliner/outliner_select.c (+543, -489) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021