Blender V4.5
cycles_xml.cpp File Reference
#include <cstdio>
#include <algorithm>
#include "graph/node_xml.h"
#include "scene/alembic.h"
#include "scene/background.h"
#include "scene/camera.h"
#include "scene/film.h"
#include "scene/integrator.h"
#include "scene/light.h"
#include "scene/mesh.h"
#include "scene/object.h"
#include "scene/osl.h"
#include "scene/scene.h"
#include "scene/shader.h"
#include "scene/shader_graph.h"
#include "scene/shader_nodes.h"
#include "util/path.h"
#include "util/projection.h"
#include "util/transform.h"
#include "util/xml.h"
#include "app/cycles_xml.h"

Go to the source code of this file.

Classes

struct  XMLReadState

Functions

static bool xml_read_int (int *value, const xml_node node, const char *name)
static bool xml_read_int_array (vector< int > &value, const xml_node node, const char *name)
static bool xml_read_float (float *value, const xml_node node, const char *name)
static bool xml_read_float_array (vector< float > &value, const xml_node node, const char *name)
static bool xml_read_float3 (float3 *value, const xml_node node, const char *name)
static bool xml_read_float3_array (vector< float3 > &value, const xml_node node, const char *name)
static bool xml_read_float4 (float4 *value, const xml_node node, const char *name)
static bool xml_read_string (string *str, const xml_node node, const char *name)
static bool xml_equal_string (const xml_node node, const char *name, const char *value)
static void xml_read_camera (XMLReadState &state, const xml_node node)
static void xml_read_shader_graph (XMLReadState &state, Shader *shader, const xml_node graph_node)
static void xml_read_shader (XMLReadState &state, const xml_node node)
static void xml_read_background (XMLReadState &state, const xml_node node)
static Meshxml_add_mesh (Scene *scene, const Transform &tfm, Object *object)
static void xml_read_mesh (const XMLReadState &state, const xml_node node)
static void xml_read_light (XMLReadState &state, const xml_node node)
static void xml_read_transform (const xml_node node, Transform &tfm)
static void xml_read_state (XMLReadState &state, const xml_node node)
static void xml_read_object (XMLReadState &state, const xml_node node)
static void xml_read_include (XMLReadState &state, const string &src)
static void xml_read_scene (XMLReadState &state, const xml_node scene_node)
void xml_read_file (Scene *scene, const char *filepath)

Function Documentation

◆ xml_add_mesh()

Mesh * xml_add_mesh ( Scene * scene,
const Transform & tfm,
Object * object )
static

Definition at line 401 of file cycles_xml.cpp.

References Scene::create_node().

Referenced by xml_read_mesh().

◆ xml_equal_string()

bool xml_equal_string ( const xml_node node,
const char * name,
const char * value )
static

Definition at line 164 of file cycles_xml.cpp.

References string_iequals().

Referenced by xml_read_mesh(), and xml_read_state().

◆ xml_read_background()

void xml_read_background ( XMLReadState & state,
const xml_node node )
static

Definition at line 389 of file cycles_xml.cpp.

References state, and xml_read_shader_graph().

Referenced by xml_read_scene().

◆ xml_read_camera()

void xml_read_camera ( XMLReadState & state,
const xml_node node )
static

Definition at line 177 of file cycles_xml.cpp.

References Camera::need_flags_update, state, Camera::update(), and xml_read_int().

Referenced by xml_read_scene().

◆ xml_read_file()

void xml_read_file ( Scene * scene,
const char * filepath )

◆ xml_read_float()

bool xml_read_float ( float * value,
const xml_node node,
const char * name )
static

Definition at line 83 of file cycles_xml.cpp.

Referenced by xml_read_mesh(), and xml_read_state().

◆ xml_read_float3()

bool xml_read_float3 ( float3 * value,
const xml_node node,
const char * name )
static

Definition at line 113 of file cycles_xml.cpp.

References make_float3(), array< T, alignment >::size(), and xml_read_float_array().

Referenced by xml_read_transform().

◆ xml_read_float3_array()

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

Definition at line 125 of file cycles_xml.cpp.

References i, make_float3(), array< T, alignment >::size(), and xml_read_float_array().

Referenced by xml_read_mesh().

◆ xml_read_float4()

bool xml_read_float4 ( float4 * value,
const xml_node node,
const char * name )
static

Definition at line 140 of file cycles_xml.cpp.

References make_float4(), array< T, alignment >::size(), and xml_read_float_array().

Referenced by xml_read_transform().

◆ xml_read_float_array()

bool xml_read_float_array ( vector< float > & value,
const xml_node node,
const char * name )
static

◆ xml_read_include()

void xml_read_include ( XMLReadState & state,
const string & src )
static

Definition at line 818 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().

◆ xml_read_int()

bool xml_read_int ( int * value,
const xml_node node,
const char * name )
static

Definition at line 53 of file cycles_xml.cpp.

Referenced by xml_read_camera().

◆ xml_read_int_array()

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

Definition at line 65 of file cycles_xml.cpp.

References string_split().

Referenced by xml_read_mesh().

◆ xml_read_light()

void xml_read_light ( XMLReadState & state,
const xml_node node )
static

◆ xml_read_mesh()

◆ xml_read_object()

void xml_read_object ( XMLReadState & state,
const xml_node node )
static

Definition at line 737 of file cycles_xml.cpp.

References Scene::create_node(), and state.

Referenced by xml_read_scene().

◆ xml_read_scene()

◆ xml_read_shader()

void xml_read_shader ( XMLReadState & state,
const xml_node node )
static

Definition at line 381 of file cycles_xml.cpp.

References state, and xml_read_shader_graph().

Referenced by xml_read_scene().

◆ xml_read_shader_graph()

◆ xml_read_state()

void xml_read_state ( XMLReadState & state,
const xml_node node )
static

Definition at line 684 of file cycles_xml.cpp.

References Node::name, state, xml_equal_string(), xml_read_float(), and xml_read_string().

Referenced by xml_read_scene().

◆ xml_read_string()

bool xml_read_string ( string * str,
const xml_node node,
const char * name )
static

Definition at line 152 of file cycles_xml.cpp.

References str.

Referenced by xml_read_scene(), xml_read_shader_graph(), and xml_read_state().

◆ xml_read_transform()