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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-12-23 08:04:03 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-23 08:04:03 +0300
commit9282d305bdc56522543129436db1e8a5d19cf39f (patch)
treeb6d0cdcc7dd3f4113cf9e4f9813c40f44d29746e /intern/cycles/app/cycles_xml.cpp
parentde724a258eda45d1fed2b2176006c3b2df8abea2 (diff)
parent646a96bf8edc211a06f3df652101c265ee166e8d (diff)
Merge branch 'master' into texture_nodes_refactortexture_nodes_refactor
Conflicts: source/blender/nodes/texture/nodes/node_texture_math.c
Diffstat (limited to 'intern/cycles/app/cycles_xml.cpp')
-rw-r--r--intern/cycles/app/cycles_xml.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index 431796e106b..528b3016b80 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -299,7 +299,6 @@ 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");
@@ -803,7 +802,17 @@ static void xml_read_shader(const XMLReadState& state, pugi::xml_node node)
xml_read_string(&shader->name, node, "name");
xml_read_bool(&shader->use_mis, node, "use_mis");
xml_read_bool(&shader->use_transparent_shadow, node, "use_transparent_shadow");
+
+ /* Volume */
xml_read_bool(&shader->heterogeneous_volume, node, "heterogeneous_volume");
+ xml_read_int(&shader->volume_interpolation_method, node, "volume_interpolation_method");
+
+ if(xml_equal_string(node, "volume_sampling_method", "distance"))
+ shader->volume_sampling_method = VOLUME_SAMPLING_DISTANCE;
+ else if(xml_equal_string(node, "volume_sampling_method", "equiangular"))
+ shader->volume_sampling_method = VOLUME_SAMPLING_EQUIANGULAR;
+ else if(xml_equal_string(node, "volume_sampling_method", "multiple_importance"))
+ shader->volume_sampling_method = VOLUME_SAMPLING_MULTIPLE_IMPORTANCE;
xml_read_shader_graph(state, shader, node);
state.scene->shaders.push_back(shader);
@@ -816,6 +825,14 @@ 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_int(&shader->volume_interpolation_method, node, "volume_interpolation_method");
+
+ if(xml_equal_string(node, "volume_sampling_method", "distance"))
+ shader->volume_sampling_method = VOLUME_SAMPLING_DISTANCE;
+ else if(xml_equal_string(node, "volume_sampling_method", "equiangular"))
+ shader->volume_sampling_method = VOLUME_SAMPLING_EQUIANGULAR;
+ else if(xml_equal_string(node, "volume_sampling_method", "multiple_importance"))
+ shader->volume_sampling_method = VOLUME_SAMPLING_MULTIPLE_IMPORTANCE;
xml_read_shader_graph(state, shader, node);
}