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>2014-02-15 02:22:05 +0400
committerThomas Dinges <blender@dingto.org>2014-02-15 02:22:29 +0400
commit30e89552e2c3981865e537f6752c0aafe0920016 (patch)
tree6f63bd5ca07b84dc88a4512b88d87d41ff6cfa9c /intern/cycles
parentf3c7cb02b2a5e7b7ee780b598a73b08bf39dae76 (diff)
Cycles Standalone: XML wrapping of Lights and some more volume settings.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/app/cycles_xml.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index f30e399350a..eef7d02e849 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -268,6 +268,7 @@ static void xml_read_integrator(const XMLReadState& state, pugi::xml_node node)
xml_read_bool(&integrator->transparent_shadows, node, "transparent_shadows");
/* Volume */
+ xml_read_int(&integrator->volume_homogeneous_sampling, node, "volume_homogeneous_sampling");
xml_read_float(&integrator->volume_step_size, node, "volume_step_size");
xml_read_int(&integrator->volume_max_steps, node, "volume_max_steps");
@@ -749,6 +750,8 @@ static void xml_read_shader(const XMLReadState& state, pugi::xml_node node)
static void xml_read_background(const XMLReadState& state, pugi::xml_node node)
{
Shader *shader = state.scene->shaders[state.scene->default_background];
+
+ xml_read_bool(&shader->heterogeneous_volume, node, "heterogeneous_volume");
xml_read_shader_graph(state, shader, node);
}
@@ -928,6 +931,26 @@ static void xml_read_light(const XMLReadState& state, pugi::xml_node node)
{
Light *light = new Light();
light->shader = state.shader;
+
+ /* Light Type
+ * 0: Point, 1: Sun, 3: Area, 5: Spot */
+ int type = 0;
+ xml_read_int(&type, node, "type");
+ light->type = (LightType)type;
+
+ /* Spot Light */
+ xml_read_float(&light->spot_angle, node, "spot_angle");
+ xml_read_float(&light->spot_smooth, node, "spot_smooth");
+
+ /* Area Light */
+ xml_read_float(&light->sizeu, node, "sizeu");
+ xml_read_float(&light->sizev, node, "sizev");
+ xml_read_float3(&light->axisu, node, "axisu");
+ xml_read_float3(&light->axisv, node, "axisv");
+
+ /* 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);