diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-09-05 18:14:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-08 16:23:21 +0300 |
commit | 173d8edb0bb6e017235ef85a10963f39725c29ef (patch) | |
tree | fc40e57981ed83c0a1bb3532da322843a5571238 /source/blender/editors/space_outliner/outliner_select.cc | |
parent | b5fc8f611e3948a19c26d425496d76079506f480 (diff) |
Cleanup: make meaning of base visibility flags more clear
Rename, add comments, and use flag in the depsgraph to ensure the logic
matches.
Differential Revision: https://developer.blender.org/D15883
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.cc')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc index 17e78ece941..071b244bd3d 100644 --- a/source/blender/editors/space_outliner/outliner_select.cc +++ b/source/blender/editors/space_outliner/outliner_select.cc @@ -191,7 +191,8 @@ void outliner_item_mode_toggle(bContext *C, Base *base = BKE_view_layer_base_find(tvc->view_layer, ob); /* Hidden objects can be removed from the mode. */ - if (!base || (!(base->flag & BASE_VISIBLE_DEPSGRAPH) && (ob->mode != tvc->obact->mode))) { + if (!base || (!(base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) && + (ob->mode != tvc->obact->mode))) { return; } @@ -239,7 +240,7 @@ static void do_outliner_object_select_recursive(ViewLayer *view_layer, { LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { Object *ob = base->object; - if ((((base->flag & BASE_VISIBLE_DEPSGRAPH) != 0) && + if ((((base->flag & BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT) != 0) && BKE_object_is_child_recursive(ob_parent, ob))) { ED_object_base_select(base, select ? BA_SELECT : BA_DESELECT); } |