From b898330c3744669a8c3805f1560130821422cca1 Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Sat, 15 Oct 2022 22:51:21 +0200 Subject: 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. --- source/blender/makesrna/intern/rna_object_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index c99c5fb723d..366a3597ce6 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -199,7 +199,7 @@ static bool rna_Object_holdout_get(Object *ob, bContext *C, PointerRNA *view_lay return false; } - return ((base->flag & BASE_HOLDOUT) != 0); + return ((base->flag & BASE_HOLDOUT) != 0) || ((ob->visibility_flag & OB_HOLDOUT) != 0); } static bool rna_Object_indirect_only_get(Object *ob, bContext *C, PointerRNA *view_layer_ptr) -- cgit v1.2.3