forked from bartvdbraak/blender
Expose Background AO and Transparent flag to XML API
This commit is contained in:
parent
596eadf0e1
commit
6a33d13ae7
@ -20,6 +20,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
#include "background.h"
|
||||||
#include "camera.h"
|
#include "camera.h"
|
||||||
#include "film.h"
|
#include "film.h"
|
||||||
#include "graph.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)
|
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];
|
Shader *shader = state.scene->shaders[state.scene->default_background];
|
||||||
|
|
||||||
xml_read_bool(&shader->heterogeneous_volume, node, "heterogeneous_volume");
|
xml_read_bool(&shader->heterogeneous_volume, node, "heterogeneous_volume");
|
||||||
|
Loading…
Reference in New Issue
Block a user