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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-05-07 21:30:16 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-05-22 18:29:25 +0300
commite7d13b8a1da046d7bb78a3c0e21bbb575ed6074e (patch)
tree5af00d1e1e72fb15212decc2448152696ea519b7 /intern/cycles/app
parent0062d9f58c74e6dd021a3517e0dcba41c414ac97 (diff)
Code refactor: nodify Cycles background and film.
Differential Revision: https://developer.blender.org/D2016
Diffstat (limited to 'intern/cycles/app')
-rw-r--r--intern/cycles/app/cycles_xml.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index c2636a0e8c5..7f262c709e0 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -279,18 +279,6 @@ static ShaderSocketType xml_read_socket_type(pugi::xml_node node, const char *na
return SHADER_SOCKET_UNDEFINED;
}
-/* Film */
-
-static void xml_read_film(const XMLReadState& state, pugi::xml_node node)
-{
- Film *film = state.scene->film;
-
- xml_read_float(&film->exposure, node, "exposure");
-
- /* ToDo: Filter Type */
- xml_read_float(&film->filter_width, node, "filter_width");
-}
-
/* Camera */
static void xml_read_camera(const XMLReadState& state, pugi::xml_node node)
@@ -839,15 +827,10 @@ static void xml_read_shader(const XMLReadState& state, pugi::xml_node node)
/* Background */
-static void xml_read_background(const XMLReadState& state, pugi::xml_node node)
+static void xml_read_background(XMLReadState& state, pugi::xml_node node)
{
/* Background Settings */
- Background *bg = state.scene->background;
-
- xml_read_float(&bg->ao_distance, node, "ao_distance");
- xml_read_float(&bg->ao_factor, node, "ao_factor");
-
- xml_read_bool(&bg->transparent, node, "transparent");
+ xml_read_node(state, state.scene->background, node);
/* Background Shader */
Shader *shader = state.scene->default_background;
@@ -1185,7 +1168,7 @@ static void xml_read_scene(XMLReadState& state, pugi::xml_node scene_node)
{
for(pugi::xml_node node = scene_node.first_child(); node; node = node.next_sibling()) {
if(string_iequals(node.name(), "film")) {
- xml_read_film(state, node);
+ xml_read_node(state, state.scene->film, node);
}
else if(string_iequals(node.name(), "integrator")) {
xml_read_node(state, state.scene->integrator, node);