diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-18 08:06:27 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-24 02:12:48 +0300 |
commit | f8fc77ec8481fbbe253ec73d701beab278fdeaf3 (patch) | |
tree | a50dfe0e5e32ed0f082f391f07b4ba745d27a060 /intern/cycles/blender/blender_object.cpp | |
parent | d992240bfafd749a6535cc3abf0815567f8a3af7 (diff) |
Cycles: add object level holdout property, to replace Z mask layer.
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index d9210585044..0c29c606df8 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -314,7 +314,9 @@ Object *BlenderSync::sync_object(BL::Depsgraph::duplis_iterator& b_dupli_iter, } /* Visibility flags for both parent and child. */ - bool use_holdout = (layer_flag & view_layer.holdout_layer) != 0; + PointerRNA cobject = RNA_pointer_get(&b_ob.ptr, "cycles"); + bool use_holdout = (layer_flag & view_layer.holdout_layer) != 0 || + get_boolean(cobject, "is_holdout"); uint visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL_VISIBILITY; if(b_parent.ptr.data != b_ob.ptr.data) { @@ -393,7 +395,6 @@ Object *BlenderSync::sync_object(BL::Depsgraph::duplis_iterator& b_dupli_iter, object_updated = true; } - PointerRNA cobject = RNA_pointer_get(&b_ob.ptr, "cycles"); bool is_shadow_catcher = get_boolean(cobject, "is_shadow_catcher"); if(is_shadow_catcher != object->is_shadow_catcher) { object->is_shadow_catcher = is_shadow_catcher; |