|
Blender V5.3
|
#include <algorithm>#include <cstdio>#include "graph/node_xml.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/log.h"#include "util/path.h"#include "util/projection.h"#include "util/string.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< packed_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 Mesh * | xml_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) |
Definition at line 376 of file cycles_xml.cpp.
References Scene::create_node(), Object::set_tfm(), and xml_add_mesh().
Referenced by xml_add_mesh(), and xml_read_mesh().
|
static |
Definition at line 166 of file cycles_xml.cpp.
References node, string_iequals(), and xml_equal_string().
Referenced by xml_equal_string(), xml_read_mesh(), and xml_read_state().
|
static |
Definition at line 364 of file cycles_xml.cpp.
References node, state, xml_read_background(), and xml_read_shader_graph().
Referenced by xml_read_background(), and xml_read_scene().
|
static |
Definition at line 179 of file cycles_xml.cpp.
References Camera::need_flags_update, node, state, Camera::update(), xml_read_camera(), and xml_read_int().
Referenced by xml_read_camera(), and xml_read_scene().
| void xml_read_file | ( | Scene * | scene, |
| const char * | filepath ) |
Definition at line 868 of file cycles_xml.cpp.
References SceneParams::bvh_type, BVH_TYPE_STATIC, Scene::default_surface, Scene::params, path_dirname(), path_filename(), state, transform_identity(), xml_read_file(), and xml_read_include().
Referenced by scene_init(), and xml_read_file().
|
static |
Definition at line 83 of file cycles_xml.cpp.
References float, node, and xml_read_float().
Referenced by xml_read_float(), xml_read_mesh(), and xml_read_state().
|
static |
Definition at line 113 of file cycles_xml.cpp.
References make_float3(), node, array< T, alignment >::size(), xml_read_float3(), and xml_read_float_array().
Referenced by xml_read_float3(), and xml_read_transform().
|
static |
Definition at line 125 of file cycles_xml.cpp.
References make_float3(), node, array< T, alignment >::size(), xml_read_float3_array(), and xml_read_float_array().
Referenced by xml_read_float3_array(), and xml_read_mesh().
|
static |
Definition at line 142 of file cycles_xml.cpp.
References make_float4, node, array< T, alignment >::size(), xml_read_float4(), and xml_read_float_array().
Referenced by xml_read_float4(), and xml_read_transform().
|
static |
Definition at line 95 of file cycles_xml.cpp.
References node, string_split(), and xml_read_float_array().
Referenced by xml_read_float3(), xml_read_float3_array(), xml_read_float4(), xml_read_float_array(), xml_read_mesh(), and xml_read_transform().
|
static |
Definition at line 844 of file cycles_xml.cpp.
References XMLReadState::base, LOG_ERROR, path_dirname(), path_join(), state, xml_read_include(), and xml_read_scene().
Referenced by xml_read_file(), xml_read_include(), and xml_read_scene().
|
static |
Definition at line 53 of file cycles_xml.cpp.
References node, and xml_read_int().
Referenced by xml_read_camera(), and xml_read_int().
|
static |
Definition at line 65 of file cycles_xml.cpp.
References node, string_split(), and xml_read_int_array().
Referenced by xml_read_int_array(), and xml_read_mesh().
|
static |
Definition at line 641 of file cycles_xml.cpp.
References assert, Scene::create_node(), node, PATH_RAY_VISIBILITY_ALL, PATH_RAY_VISIBILITY_CAMERA, array< T, alignment >::push_back_slow(), Object::set_tfm(), state, xml_read_light(), and xml_read_string().
Referenced by xml_read_light(), and xml_read_scene().
|
static |
Definition at line 396 of file cycles_xml.cpp.
References AttributeSet::add(), assert, ATTR_STD_GENERATED, ATTR_STD_POSITION, ATTR_STD_UV, ATTR_STD_UV_TANGENT, ATTR_STD_UV_TANGENT_SIGN, ATTR_STD_VERTEX_NORMAL, Geometry::attributes, Attribute::data_for_write(), Geometry::get_position(), Geometry::get_position_for_write(), make_float2, make_float3(), Geometry::need_attribute(), node, Mesh::num_verts(), P, packed_normal::packed_normal(), array< T, alignment >::push_back_slow(), Attribute::resize(), Mesh::resize_mesh(), Mesh::resize_subd_faces(), smooth, Attribute::standard_name(), state, Mesh::subd_attributes, Mesh::SUBDIVISION_CATMULL_CLARK, Mesh::SUBDIVISION_LINEAR, Mesh::SUBDIVISION_NONE, T, xml_add_mesh(), xml_equal_string(), xml_read_float(), xml_read_float3_array(), xml_read_float_array(), xml_read_int_array(), and xml_read_mesh().
Referenced by xml_read_mesh(), and xml_read_scene().
|
static |
Definition at line 768 of file cycles_xml.cpp.
References Scene::create_node(), node, Object::set_tfm(), state, and xml_read_object().
Referenced by xml_read_object(), and xml_read_scene().
|
static |
Definition at line 787 of file cycles_xml.cpp.
References LOG_ERROR, node, state, string_iequals(), XMLReadState::tfm, xml_read_background(), xml_read_camera(), xml_read_include(), xml_read_light(), xml_read_mesh(), xml_read_object(), xml_read_scene(), xml_read_shader(), xml_read_state(), xml_read_string(), and xml_read_transform().
Referenced by xml_read_include(), and xml_read_scene().
|
static |
Definition at line 356 of file cycles_xml.cpp.
References node, state, xml_read_shader(), and xml_read_shader_graph().
Referenced by xml_read_scene(), and xml_read_shader().
|
static |
Definition at line 201 of file cycles_xml.cpp.
References NodeType::create, NodeType::find(), in, ShaderNode::inputs, LOG_ERROR, NodeType::name, node, out, output, ShaderNode::outputs, path_is_relative(), path_join(), Shader::set_graph(), NodeType::SHADER, state, string_iequals(), string_split(), Shader::tag_update(), NodeType::type, ShaderManager::use_osl(), xml_read_shader_graph(), and xml_read_string().
Referenced by xml_read_background(), xml_read_shader(), and xml_read_shader_graph().
|
static |
Definition at line 715 of file cycles_xml.cpp.
References LOG_ERROR, Node::name, node, state, xml_equal_string(), xml_read_float(), xml_read_state(), and xml_read_string().
Referenced by xml_read_scene(), and xml_read_state().
|
static |
Definition at line 154 of file cycles_xml.cpp.
References node, str, and xml_read_string().
Referenced by xml_read_light(), xml_read_scene(), xml_read_shader_graph(), xml_read_state(), and xml_read_string().
|
static |
Definition at line 684 of file cycles_xml.cpp.
References DEG2RADF, make_float3(), node, projection_to_transform(), projection_transpose(), rotate(), scale(), transform_rotate(), transform_scale(), transform_translate(), translate(), xml_read_float3(), xml_read_float4(), xml_read_float_array(), xml_read_transform(), zero_float3(), and zero_float4().
Referenced by xml_read_scene(), and xml_read_transform().