Page MenuHome

Fix T70670: Hidden collections are still rendered by Cycles in the Viewport
ClosedPublic

Authored by Dalai Felinto (dfelinto) on Thu, Oct 10, 12:41 AM.

Details

Summary

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).

Diff Detail

Repository
rB Blender

Event Timeline

I think we're putting too much burden on the Python API users here. It should be simple to determine if an object is visible in the 3D viewport for rendering, if every add-on needs to manually check for local view, local collections, show_in_view_layer, that's too complicated and error prone.

  • From Review: simplified API for viewport visibility check

Note, as a separate commit/update here I will replace is_object_visible_in_viewport(View3D) with BKE_is_object_visible_in_viewport.

  • Cleanup: Use BKE_object_is_visible elsewhere

Note: I'm now also hiding objects in the viewport render if their ob type was hidden in that viewport.

I think we're putting too much burden on the Python API users here.

I actually totally agree (updated patch accordingly already). I realized the same thing yesterday but in end I didn't want to deviate too much from what we were doing for local view.

This revision was not accepted when it landed; it landed in state Needs Review.Tue, Oct 15, 3:47 AM
This revision was automatically updated to reflect the committed changes.