From eea73bffb47d8773d88fa55dcc59b3d4a2de4dfa Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Sat, 20 Apr 2024 10:46:12 +0200 Subject: [PATCH] UI: Fade all non-ID children if parent is hidden in outliner Part of !120397. For non-id tree elements, call `element_should_draw_faded` and get the fade status of their parent. For example, this will fix the fading of modifier, actions, bones, etc. in outliner. Pull Request: https://projects.blender.org/blender/blender/pulls/120813 --- source/blender/editors/space_outliner/outliner_draw.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 2f8568b21c1..20c77f25b8f 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -3326,6 +3326,11 @@ static bool element_should_draw_faded(const TreeViewContext *tvc, tree_element_cast(te)->node(); return !node.is_visible(); } + default: { + if (te->parent) { + return element_should_draw_faded(tvc, te->parent, te->parent->store_elem); + } + } } if (te->flag & TE_CHILD_NOT_IN_COLLECTION) {