Blender Git Commit Log

Git Commits -> Revision 3458074

Revision 3458074 by Hans Goudey (master)
February 19, 2021, 19:56 (GMT)
Fix T83027: Incorrect outliner collection state after operator

The "Hide Collection" operators assigned to the number keys in edit mode
trigger a redraw of the outliner, but as an optimization, they do *not*
trigger a rebuild of the tree.

This optimization is valid because unlike the collection exclude toggle,
the heirarchy is not affected by collection visibility. However, it means
that currently you must trigger a rebuild to get the correct "grayed out"
status after using the operator.

Rather than trigger a rebuild in this case to solve the bug, this patch
moves the decision for whether to gray out the text of a tree element
to the draw step rather than the build step. This means that any change
to the corresponding properties doesn't require a full tree rebuild.

Note that changing the "hide_viewport" property from the outliner still
causes a tree rebuild. I think that's because of the checks in
`outliner_collection_set_flag_recursive_fn`.
That could be optimized in the future.

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

Commit Details:

Full Hash: 34580748dcf0a3656dd634fc90cb00ec27367376
Parent Commit: 55700ac
Lines Changed: +37, -14

3 Modified Paths:

/source/blender/editors/space_outliner/outliner_draw.c (+36, -4) (Diff)
/source/blender/editors/space_outliner/outliner_intern.h (+1, -2) (Diff)
/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc (+0, -8) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021