Expose Background AO and Transparent flag to XML API
authorThomas Dinges <blender@dingto.org>
Wed, 10 Jun 2015 19:27:20 +0000 (21:27 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 11 Jun 2015 22:32:00 +0000 (00:32 +0200)
intern/cycles/app/cycles_xml.cpp

index eee64394471dcb18b58a26aa4ca65bdd3d32197b..3ce2d4750359731bc02d29b2a452e974a3becc72 100644 (file)
@@ -20,6 +20,7 @@
 #include <algorithm>
 #include <iterator>
 
+#include "background.h"
 #include "camera.h"
 #include "film.h"
 #include "graph.h"
@@ -850,6 +851,15 @@ static void xml_read_shader(const XMLReadState& state, pugi::xml_node node)
 
 static void xml_read_background(const 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");
+
+       /* Background Shader */
        Shader *shader = state.scene->shaders[state.scene->default_background];
        
        xml_read_bool(&shader->heterogeneous_volume, node, "heterogeneous_volume");