Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorManuel Castilla <manzanilla>2020-09-14 10:13:29 +0300
committerDalai Felinto <dalai@blender.org>2020-09-14 10:25:48 +0300
commit9bc1d7a6deea8f401d727e80f42a04482c29bcef (patch)
tree4d93f386b55d95e962dcba3908f4fff8c57bdb71 /source
parent0f61b27e93f1eedff4217b2dc8d11c774d4d0f6f (diff)
Fix T72584: Hiding a collection don't hide a child object in viewport when in Local View
Hiding a collection should hide all children objects even when we are in Local view with one of them. Note from reviewer: We are doing this already for local collections. So may as well do it when hiding the collections for the entire view layer. Developer details: In function "BKE_object_is_visible_in_viewport" object flag BASE_VISIBLE_VIEWLAYER wasn't being checked when we were in Local view, It's now changed so that it's checked even if we are in Local view. And this function was called by some viewport draw functions to check if it should draw an object or not. Maniphest Tasks: T72584 Differential Revision: https://developer.blender.org/D7894
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/layer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 1ad34fde0fa..dd8a22e10da 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1111,8 +1111,8 @@ bool BKE_object_is_visible_in_viewport(const View3D *v3d, const struct Object *o
return false;
}
- /* If not using local view or local collection the object may still be in a hidden collection. */
- if (((v3d->localvd) == NULL) && ((v3d->flag & V3D_LOCAL_COLLECTIONS) == 0)) {
+ /* If not using local collection the object may still be in a hidden collection. */
+ if ((v3d->flag & V3D_LOCAL_COLLECTIONS) == 0) {
return (ob->base_flag & BASE_VISIBLE_VIEWLAYER) != 0;
}