Page MenuHome

Assets: Support automatic collection previews
ClosedPublic

Authored by Julian Eisel (Severin) on Mar 25 2022, 8:21 PM.

Details

Summary

Adds supports for collection previews that are rendered automatically when collections are marked as assets. (Or when preview rendering is triggered differently, e.g. through the Refresh Data-Block Previews operator).

Note that only generate a preview if there is renderable geometry visible in the collection. This checks render visibility of collections and objects too. See Lighting collection above, which contains only lights and a hidden object.

Idea in this patch is to create a collection instance empty outside of main for the collection, and then reuse the object rendering code to render the preview. This keeps things very simple and works just fine.

Diff Detail

Repository
rB Blender

Event Timeline

Julian Eisel (Severin) requested review of this revision.Mar 25 2022, 8:21 PM
Julian Eisel (Severin) created this revision.
Julian Eisel (Severin) edited the summary of this revision. (Show Details)Mar 25 2022, 8:34 PM
Julian Eisel (Severin) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 28 2022, 8:49 AM

This is simple and I think reusing the object preview code through collection instancing isn't controversial, so I went ahead and committed this. Thanks for the review!