Blender  V3.3
Classes | Functions
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)
 
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_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 
)
static

Definition at line 396 of file cycles_xml.cpp.

References Scene::geometry, mesh, Scene::objects, and scene.

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 165 of file cycles_xml.cpp.

References node, and 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 384 of file cycles_xml.cpp.

References node, 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

◆ 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 86 of file cycles_xml.cpp.

References float(), and node.

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 115 of file cycles_xml.cpp.

References make_float3, node, 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 127 of file cycles_xml.cpp.

References make_float3, node, 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 141 of file cycles_xml.cpp.

References make_float4, node, 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 688 of file cycles_xml.cpp.

References XMLReadState::base, path_dirname(), path_join(), src, 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 57 of file cycles_xml.cpp.

References node.

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 69 of file cycles_xml.cpp.

References node, and string_split().

Referenced by xml_read_mesh().

◆ xml_read_light()

static void xml_read_light ( XMLReadState state,
xml_node  node 
)
static

Definition at line 558 of file cycles_xml.cpp.

References node, state, and xml_read_node().

Referenced by xml_read_scene().

◆ xml_read_mesh()

static void xml_read_mesh ( const XMLReadState state,
xml_node  node 
)
static

◆ xml_read_scene()

static void xml_read_scene ( XMLReadState state,
xml_node  scene_node 
)
static

◆ xml_read_shader()

static void xml_read_shader ( XMLReadState state,
xml_node  node 
)
static

Definition at line 375 of file cycles_xml.cpp.

References node, usdtokens::Shader(), state, and xml_read_shader_graph().

Referenced by xml_read_scene().

◆ xml_read_shader_graph()

static void xml_read_shader_graph ( XMLReadState state,
Shader shader,
xml_node  graph_node 
)
static

◆ xml_read_state()

static void xml_read_state ( XMLReadState state,
xml_node  node 
)
static

Definition at line 601 of file cycles_xml.cpp.

References Node::name, node, 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 153 of file cycles_xml.cpp.

References node, and str.

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

◆ xml_read_transform()

static void xml_read_transform ( xml_node  node,
Transform tfm 
)
static