diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-10-10 01:02:56 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-10-15 04:45:33 +0300 |
commit | 280d6b03a7a9c35d5b50fdeaf03a43f72c3a8059 (patch) | |
tree | f2b6c5d5547bfbd3d5f754f1a9298abeffb3683d /intern | |
parent | af5cc8cbd411fd83584dafac281dd10e5c65312a (diff) |
Fix T70670: Hidden collections are still rendered by Cycles in the Viewport
Now local collections are fully working with cycles preview, while the
collection visibility bug is fixed.
Local collections were not working with cycles viewport even before the recent
commit to allow users to show collections that are hidden in the view layer.
It just got worse with said commit (0812949bbc3d).
Differential Revision: https://developer.blender.org/D6034
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 59509d20fb2..d3efc18a990 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -541,7 +541,6 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph, const bool show_lights = BlenderViewportParameters(b_v3d).use_scene_lights; BL::ViewLayer b_view_layer = b_depsgraph.view_layer_eval(); - const bool has_local_view = b_v3d && b_v3d.local_view(); BL::Depsgraph::object_instances_iterator b_instance_iter; for (b_depsgraph.object_instances.begin(b_instance_iter); @@ -555,10 +554,10 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph, /* test if object needs to be hidden */ const bool show_self = b_instance.show_self(); - const bool show_local_view = !has_local_view || b_ob.local_view_get(b_v3d); const bool show_particles = b_instance.show_particles(); + const bool show_in_viewport = b_ob.visible_in_viewport_get(b_v3d); - if (show_local_view && (show_self || show_particles)) { + if (show_in_viewport && (show_self || show_particles)) { /* object itself */ sync_object(b_depsgraph, b_view_layer, |