[Bf-blender-cvs] [6a33d13] master: Expose Background AO and Transparent flag to XML API

Thomas Dinges noreply at git.blender.org
Fri Jun 12 00:32:42 CEST 2015


Commit: 6a33d13ae7a4f87188f08dda68f690948ecdf823
Author: Thomas Dinges
Date:   Wed Jun 10 21:27:20 2015 +0200
Branches: master
https://developer.blender.org/rB6a33d13ae7a4f87188f08dda68f690948ecdf823

Expose Background AO and Transparent flag to XML API

===================================================================

M	intern/cycles/app/cycles_xml.cpp

===================================================================

diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index eee6439..3ce2d47 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -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");




More information about the Bf-blender-cvs mailing list