Blender V2.61 - r43446
Classes | Functions

cycles_xml.cpp File Reference

#include <stdio.h>
#include <sstream>
#include <algorithm>
#include <iterator>
#include "camera.h"
#include "film.h"
#include "graph.h"
#include "integrator.h"
#include "light.h"
#include "mesh.h"
#include "nodes.h"
#include "object.h"
#include "shader.h"
#include "scene.h"
#include "subd_mesh.h"
#include "subd_patch.h"
#include "subd_split.h"
#include "util_debug.h"
#include "util_foreach.h"
#include "util_path.h"
#include "util_transform.h"
#include "util_xml.h"
#include "cycles_xml.h"

Go to the source code of this file.

Classes

struct  XMLReadState

Functions

static bool xml_read_bool (bool *value, pugi::xml_node node, const char *name)
static bool xml_read_int (int *value, pugi::xml_node node, const char *name)
static bool xml_read_int_array (vector< int > &value, pugi::xml_node node, const char *name)
static bool xml_read_float (float *value, pugi::xml_node node, const char *name)
static bool xml_read_float_array (vector< float > &value, pugi::xml_node node, const char *name)
static bool xml_read_float3 (float3 *value, pugi::xml_node node, const char *name)
static bool xml_read_float3_array (vector< float3 > &value, pugi::xml_node node, const char *name)
static bool xml_read_float4 (float4 *value, pugi::xml_node node, const char *name)
static bool xml_read_string (string *str, pugi::xml_node node, const char *name)
static bool xml_read_ustring (ustring *str, pugi::xml_node node, const char *name)
static bool xml_equal_string (pugi::xml_node node, const char *name, const char *value)
static bool xml_read_enum (ustring *str, ShaderEnum &enm, pugi::xml_node node, const char *name)
static void xml_read_film (const XMLReadState &state, pugi::xml_node node)
static void xml_read_integrator (const XMLReadState &state, pugi::xml_node node)
static void xml_read_camera (const XMLReadState &state, pugi::xml_node node)
static string xml_socket_name (const char *name)
static void xml_read_shader_graph (const XMLReadState &state, Shader *shader, pugi::xml_node graph_node)
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 Meshxml_add_mesh (Scene *scene, const Transform &tfm)
static void xml_read_mesh (const XMLReadState &state, pugi::xml_node node)
static void xml_read_patch (const XMLReadState &state, pugi::xml_node node)
static void xml_read_light (const XMLReadState &state, pugi::xml_node node)
static void xml_read_transform (pugi::xml_node node, Transform &tfm)
static void xml_read_state (XMLReadState &state, pugi::xml_node node)
static void xml_read_include (const XMLReadState &state, const string &src)
static void xml_read_scene (const XMLReadState &state, pugi::xml_node scene_node)
void xml_read_file (Scene *scene, const char *filepath)

Function Documentation

static Mesh* xml_add_mesh ( Scene scene,
const Transform tfm 
) [static]

Definition at line 599 of file cycles_xml.cpp.

References Scene::meshes, and Scene::objects.

Referenced by xml_read_mesh(), and xml_read_patch().

static bool xml_equal_string ( pugi::xml_node  node,
const char *  name,
const char *  value 
) [static]

Definition at line 196 of file cycles_xml.cpp.

References string_iequals().

Referenced by xml_read_camera(), xml_read_mesh(), xml_read_patch(), and xml_read_state().

static void xml_read_background ( const XMLReadState state,
pugi::xml_node  node 
) [static]
static bool xml_read_bool ( bool *  value,
pugi::xml_node  node,
const char *  name 
) [static]

Definition at line 64 of file cycles_xml.cpp.

References string_iequals().

Referenced by xml_read_integrator(), and xml_read_shader_graph().

static void xml_read_camera ( const XMLReadState state,
pugi::xml_node  node 
) [static]
static bool xml_read_enum ( ustring *  str,
ShaderEnum enm,
pugi::xml_node  node,
const char *  name 
) [static]

Definition at line 206 of file cycles_xml.cpp.

References ShaderEnum::exists().

Referenced by xml_read_shader_graph().

void xml_read_file ( Scene scene,
const char *  filepath 
)
static void xml_read_film ( const XMLReadState state,
pugi::xml_node  node 
) [static]
static bool xml_read_float ( float *  value,
pugi::xml_node  node,
const char *  name 
) [static]
static bool xml_read_float3 ( float3 value,
pugi::xml_node  node,
const char *  name 
) [static]

Definition at line 134 of file cycles_xml.cpp.

References make_float3(), and xml_read_float_array().

Referenced by xml_read_light(), xml_read_shader_graph(), and xml_read_transform().

static bool xml_read_float3_array ( vector< float3 > &  value,
pugi::xml_node  node,
const char *  name 
) [static]

Definition at line 146 of file cycles_xml.cpp.

References i, make_float3(), and xml_read_float_array().

Referenced by xml_read_mesh(), and xml_read_patch().

static bool xml_read_float4 ( float4 value,
pugi::xml_node  node,
const char *  name 
) [static]

Definition at line 160 of file cycles_xml.cpp.

References make_float4(), and xml_read_float_array().

Referenced by xml_read_transform().

static bool xml_read_float_array ( vector< float > &  value,
pugi::xml_node  node,
const char *  name 
) [static]
static void xml_read_include ( const XMLReadState state,
const string &  src 
) [static]

Definition at line 907 of file cycles_xml.cpp.

References XMLReadState::base, path_dirname(), path_join(), state, and xml_read_scene().

Referenced by xml_read_file(), and xml_read_scene().

static bool xml_read_int ( int *  value,
pugi::xml_node  node,
const char *  name 
) [static]

Definition at line 76 of file cycles_xml.cpp.

Referenced by xml_read_film(), xml_read_integrator(), and xml_read_shader_graph().

static bool xml_read_int_array ( vector< int > &  value,
pugi::xml_node  node,
const char *  name 
) [static]

Definition at line 88 of file cycles_xml.cpp.

References string_split().

Referenced by xml_read_mesh().

static void xml_read_integrator ( const XMLReadState state,
pugi::xml_node  node 
) [static]
static void xml_read_light ( const XMLReadState state,
pugi::xml_node  node 
) [static]
static void xml_read_mesh ( const XMLReadState state,
pugi::xml_node  node 
) [static]
static void xml_read_patch ( const XMLReadState state,
pugi::xml_node  node 
) [static]
static void xml_read_scene ( const XMLReadState state,
pugi::xml_node  scene_node 
) [static]
static void xml_read_shader ( const XMLReadState state,
pugi::xml_node  node 
) [static]
static void xml_read_shader_graph ( const XMLReadState state,
Shader shader,
pugi::xml_node  graph_node 
) [static]
static void xml_read_state ( XMLReadState state,
pugi::xml_node  node 
) [static]
static bool xml_read_string ( string *  str,
pugi::xml_node  node,
const char *  name 
) [static]
static void xml_read_transform ( pugi::xml_node  node,
Transform tfm 
) [static]
static bool xml_read_ustring ( ustring *  str,
pugi::xml_node  node,
const char *  name 
) [static]

Definition at line 184 of file cycles_xml.cpp.

Referenced by xml_read_shader_graph().

static string xml_socket_name ( const char *  name) [static]

Definition at line 303 of file cycles_xml.cpp.

References i.

Referenced by xml_read_shader_graph().