Depsgraph and collection enable/visibility
Iterate over invisible objects too, so lamps can still lit the scene.
Also, now you can use a collection to set an object to invisible, not
only to visible.
For example:
Scene > Master collection > bedroom > furniture
Scene > View Layer > bedroom (visible)
> furniture (invisible)
The View Layer has two linked collections, bedroom and furniture.
This setup will make the furniture collection invisible.
Note: Unlike what was suggested on D2849, this does not make collection
visibility influence camera visibility. I will keep this as a separate
patch.
Reviewers: sergey
Subscribers: sergey, brecht, fclem
Differential Revision: https://developer.blender.org/D2849
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include "BLI_dynstr.h"
|
||||
#include "BLI_rand.h"
|
||||
|
||||
#include "BKE_object.h"
|
||||
|
||||
#include "GPU_material.h"
|
||||
#include "GPU_glew.h"
|
||||
|
||||
@@ -93,6 +95,10 @@ static void EEVEE_cache_populate(void *vedata, Object *ob)
|
||||
}
|
||||
|
||||
if (ELEM(ob->type, OB_MESH)) {
|
||||
if (!BKE_object_is_visible(ob)) {
|
||||
return;
|
||||
}
|
||||
|
||||
EEVEE_materials_cache_populate(vedata, sldata, ob);
|
||||
|
||||
const bool cast_shadow = true;
|
||||
|
||||
Reference in New Issue
Block a user