If you wished to cull meshes/lights/cameras for export, based on the value of exclude
value of the view layer of the collection that the object was in, how would you find the view layer?
While the names of the collection & view layer are the same, this much more complicated due view layers being able to be inside of view layers.
The tree of view layers starts at
bpy.context.window.view_layer.layer_collection
for the master collection
, the top level view layers are in .children
, but each of those can also have .children
.
Kind of seems like I would just need to resort to checking .visible_get()
on the object. Was already using that to indicate in the export whether the object should be visible on import though.