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:
authorThomas Dinges <blender@dingto.org>2015-05-17 13:35:58 +0300
committerThomas Dinges <blender@dingto.org>2015-05-17 13:36:42 +0300
commiteffb9120613c06060c1103981dfe6d58df05933d (patch)
tree4dad19fa98a26c92292f6b4f9dd40ccacdd70f7b /intern/cycles/app
parentdad2850cc5aba2e7dd97ce86561fa4c753cc6fb0 (diff)
Cycles Standalone: Expose various light settings.
Diffstat (limited to 'intern/cycles/app')
-rw-r--r--intern/cycles/app/cycles_xml.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index 1cfc8145b0f..02cf146c647 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -1034,13 +1034,28 @@ static void xml_read_light(const XMLReadState& state, pugi::xml_node node)
xml_read_float(&light->sizev, node, "sizev");
xml_read_float3(&light->axisu, node, "axisu");
xml_read_float3(&light->axisv, node, "axisv");
-
+
+ /* Portal? (Area light only) */
+ xml_read_bool(&light->is_portal, node, "is_portal");
+
/* Generic */
xml_read_float(&light->size, node, "size");
xml_read_float3(&light->dir, node, "dir");
xml_read_float3(&light->co, node, "P");
light->co = transform_point(&state.tfm, light->co);
+ /* Settings */
+ xml_read_bool(&light->cast_shadow, node, "cast_shadow");
+ xml_read_bool(&light->use_mis, node, "use_mis");
+ xml_read_int(&light->samples, node, "samples");
+ xml_read_int(&light->max_bounces, node, "max_bounces");
+
+ /* Ray Visibility */
+ xml_read_bool(&light->use_diffuse, node, "use_diffuse");
+ xml_read_bool(&light->use_glossy, node, "use_glossy");
+ xml_read_bool(&light->use_transmission, node, "use_transmission");
+ xml_read_bool(&light->use_scatter, node, "use_scatter");
+
state.scene->lights.push_back(light);
}