diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-12 20:44:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-12 20:52:56 +0300 |
commit | cae89a6889e0fc03130a56b6bf84e257eaff0fec (patch) | |
tree | 430b3870cb69944f21eacf842a68ca93c1be443c /intern/cycles/blender/blender_object.cpp | |
parent | 4572354fe59f7ac56cb7ec72f530aa8f717c63be (diff) |
Python/ViewLayers: add object.hide_get/set(), and optional view layer parameters.
These new functions control the per view layer object hiding state, similar to
the selection state. All these object state checking functions now also optionally
take a view layer to use instead of the active view layer.
Fixes T62062.
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index e55023c5400..a6f30db23c4 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -349,7 +349,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph, /* Visibility flags for both parent and child. */ PointerRNA cobject = RNA_pointer_get(&b_ob.ptr, "cycles"); bool use_holdout = get_boolean(cobject, "is_holdout") || - b_parent.holdout_get(b_view_layer); + b_parent.holdout_get(PointerRNA_NULL, b_view_layer); uint visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL_VISIBILITY; if(b_parent.ptr.data != b_ob.ptr.data) { @@ -364,7 +364,7 @@ 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(b_view_layer); + bool use_indirect_only = b_parent.indirect_only_get(PointerRNA_NULL, b_view_layer); if(use_indirect_only) { visibility &= ~PATH_RAY_CAMERA; } |