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:
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 6a309e040c0..f969ca0ff1c 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2081,6 +2081,12 @@ static void object_init(Object *ob, const short ob_type)
if (ob->type == OB_GPENCIL) {
ob->dtx |= OB_USE_GPENCIL_LIGHTS;
}
+
+ if (ob->type == OB_LAMP) {
+ /* Lights are invisible to camera rays and are assumed to be a
+ * shadow catcher by default. */
+ ob->visibility_flag |= OB_HIDE_CAMERA | OB_SHADOW_CATCHER;
+ }
}
void *BKE_object_obdata_add_from_type(Main *bmain, int type, const char *name)