Blender V4.3
cycles_xml.cpp File Reference
#include <stdio.h>
#include <algorithm>
#include <iterator>
#include <sstream>
#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 "subd/patch.h"
#include "subd/split.h"
#include "util/foreach.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, xml_node node, const char *name)
 
static bool xml_read_int_array (vector< int > &value, xml_node node, const char *name)
 
static bool xml_read_float (float *value, xml_node node, const char *name)
 
static bool xml_read_float_array (vector< float > &value, xml_node node, const char *name)
 
static bool xml_read_float3 (float3 *value, xml_node node, const char *name)
 
static bool xml_read_float3_array (vector< float3 > &value, xml_node node, const char *name)
 
static bool xml_read_float4 (float4 *value, xml_node node, const char *name)
 
static bool xml_read_string (string *str, xml_node node, const char *name)
 
static bool xml_equal_string (xml_node node, const char *name, const char *value)
 
static void xml_read_camera (XMLReadState &state, xml_node node)
 
static void xml_read_shader_graph (XMLReadState &state, Shader *shader, xml_node graph_node)
 
static void xml_read_shader (XMLReadState &state, xml_node node)
 
static void xml_read_background (XMLReadState &state, xml_node node)
 
static Meshxml_add_mesh (Scene *scene, const Transform &tfm, Object *object)
 
static void xml_read_mesh (const XMLReadState &state, xml_node node)
 
static void xml_read_light (XMLReadState &state, xml_node node)
 
static void xml_read_transform (xml_node node, Transform &tfm)
 
static void xml_read_state (XMLReadState &state, xml_node node)
 
static void xml_read_object (XMLReadState &state, xml_node node)
 
static void xml_read_include (XMLReadState &state, const string &src)
 
static void xml_read_scene (XMLReadState &state, xml_node scene_node)
 
void xml_read_file (Scene *scene, const char *filepath)
 

Function Documentation

◆ xml_add_mesh()

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

Definition at line 409 of file cycles_xml.cpp.

References mesh.

Referenced by xml_read_mesh().

◆ xml_equal_string()

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

Definition at line 168 of file cycles_xml.cpp.

References string_iequals().

Referenced by xml_read_mesh(), and xml_read_state().

◆ xml_read_background()

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

Definition at line 397 of file cycles_xml.cpp.

References state, xml_read_node(), and xml_read_shader_graph().

Referenced by xml_read_scene().

◆ xml_read_camera()

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

Definition at line 181 of file cycles_xml.cpp.

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

Referenced by xml_read_scene().

◆ xml_read_file()

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

◆ xml_read_float()

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

Definition at line 88 of file cycles_xml.cpp.

References float.

Referenced by xml_read_mesh(), and xml_read_state().

◆ xml_read_float3()

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

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

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

Definition at line 129 of file cycles_xml.cpp.

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

Referenced by xml_read_mesh().

◆ xml_read_float4()

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

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

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

◆ xml_read_include()

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

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

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

Definition at line 59 of file cycles_xml.cpp.

Referenced by xml_read_camera().

◆ xml_read_int_array()

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

Definition at line 71 of file cycles_xml.cpp.

References string_split().

Referenced by xml_read_mesh().

◆ xml_read_light()

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

Definition at line 650 of file cycles_xml.cpp.

References state, and xml_read_node().

Referenced by xml_read_scene().

◆ xml_read_mesh()

◆ xml_read_object()

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

Definition at line 746 of file cycles_xml.cpp.

References state, and xml_read_node().

Referenced by xml_read_scene().

◆ xml_read_scene()

◆ xml_read_shader()

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

Definition at line 388 of file cycles_xml.cpp.

References state, and xml_read_shader_graph().

Referenced by xml_read_scene().

◆ xml_read_shader_graph()

◆ xml_read_state()

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

Definition at line 693 of file cycles_xml.cpp.

References state, xml_equal_string(), xml_read_float(), and xml_read_string().

Referenced by xml_read_scene().

◆ xml_read_string()

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

Definition at line 156 of file cycles_xml.cpp.

References str.

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

◆ xml_read_transform()