From 2740bdfff9f38807301fb3ee4d6a4949d8d8bb20 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 4 Jul 2019 17:28:39 +0200 Subject: Fix T66362, T66004: Cycles holdout should override indirect only Now it works again like 2.7, rather than objects disappearing from camera rays when both options are on. --- intern/cycles/blender/blender_object.cpp | 3 ++- source/blender/editors/space_outliner/outliner_draw.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 17a0dbb43e7..7ccf8226e5b 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -357,7 +357,8 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph, #endif /* Clear camera visibility for indirect only objects. */ - bool use_indirect_only = b_parent.indirect_only_get(PointerRNA_NULL, b_view_layer); + bool use_indirect_only = !use_holdout && + b_parent.indirect_only_get(PointerRNA_NULL, b_view_layer); if (use_indirect_only) { visibility &= ~PATH_RAY_CAMERA; } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 86f99555e12..768a375675e 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1443,7 +1443,8 @@ static void outliner_draw_restrictbuts(uiBlock *block, layer_collection, (char *)"indirect_only"); UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK); - if (!props_active.layer_collection_indirect_only) { + if (props_active.layer_collection_holdout || + !props_active.layer_collection_indirect_only) { UI_but_flag_enable(bt, UI_BUT_INACTIVE); } } -- cgit v1.2.3