Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2022-10-15 23:51:21 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2022-10-16 00:11:20 +0300
commitb898330c3744669a8c3805f1560130821422cca1 (patch)
treebd8eaf87ddca4747499d6ba02482fa91c4a75d89 /source/blender/draw/engines/eevee
parentebe9804cfa421b746148f3067797f16e7f460551 (diff)
Fix T99450: Animated Holdout not updating on frame change
Problem here was that layer_collection_objects_sync wasn't called when the holdout property is updated due to frame change, so the changed visibility flag was never applied to ob->base_flag. Turns out there's no real reason to handle the per-object holdout property through the layer system. So, instead of merging both the layer holdout and object holdout into base_flag and checking that from the render engines, only handle the layer holdout (which can't be animated, so no issue here) through base_flag and explicitly also check the object holdout in the render engines.
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r--source/blender/draw/engines/eevee/eevee_materials.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index f79e4e1d568..b5f81f3a307 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -759,7 +759,8 @@ BLI_INLINE Material *eevee_object_material_get(Object *ob, int slot, bool holdou
BLI_INLINE EeveeMaterialCache eevee_material_cache_get(
EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, Object *ob, int slot, bool is_hair)
{
- const bool holdout = (ob->base_flag & BASE_HOLDOUT) != 0;
+ const bool holdout = ((ob->base_flag & BASE_HOLDOUT) != 0) ||
+ ((ob->visibility_flag & OB_HOLDOUT) != 0);
EeveeMaterialCache matcache;
Material *ma = eevee_object_material_get(ob, slot, holdout);
switch (ma->blend_method) {