Blender V2.61 - r43446
|
#include "background.h"
#include "graph.h"
#include "light.h"
#include "nodes.h"
#include "scene.h"
#include "shader.h"
#include "blender_sync.h"
#include "blender_util.h"
#include "util_debug.h"
Go to the source code of this file.
Typedefs | |
typedef pair< ShaderNode *, std::string > | SocketPair |
typedef map< void *, SocketPair > | PtrSockMap |
Functions | |
static BL::NodeSocket | get_node_output (BL::Node b_node, const string &name) |
static float3 | get_node_output_rgba (BL::Node b_node, const string &name) |
static float | get_node_output_value (BL::Node b_node, const string &name) |
static void | get_tex_mapping (TextureMapping *mapping, BL::TexMapping b_mapping) |
static void | get_tex_mapping (TextureMapping *mapping, BL::ShaderNodeMapping b_mapping) |
static ShaderNode * | add_node (BL::BlendData b_data, ShaderGraph *graph, BL::ShaderNode b_node) |
static SocketPair | node_socket_map_pair (PtrNodeMap &node_map, BL::Node b_node, BL::NodeSocket b_socket) |
static ShaderSocketType | convert_socket_type (BL::NodeSocket::type_enum b_type) |
static void | set_default_value (ShaderInput *input, BL::NodeSocket sock) |
static void | add_nodes (BL::BlendData b_data, ShaderGraph *graph, BL::ShaderNodeTree b_ntree, PtrSockMap &sockets_map) |
Variables | |
CCL_NAMESPACE_BEGIN typedef map< void *, ShaderNode * > | PtrNodeMap |
typedef map<void*, SocketPair> PtrSockMap |
Definition at line 35 of file blender_shader.cpp.
typedef pair<ShaderNode*, std::string> SocketPair |
Definition at line 34 of file blender_shader.cpp.
static ShaderNode* add_node | ( | BL::BlendData | b_data, |
ShaderGraph * | graph, | ||
BL::ShaderNode | b_node | ||
) | [static] |
Definition at line 102 of file blender_shader.cpp.
References ShaderGraph::add(), AttributeNode::attribute, blender_absolute_path(), MakeCursor::color, ImageTextureNode::color_space_enum, EnvironmentTextureNode::color_space_enum, VoronoiTextureNode::coloring, VoronoiTextureNode::coloring_enum, MagicTextureNode::depth, NormalNode::direction, GlossyBsdfNode::distribution, GlassBsdfNode::distribution, get_float3(), get_node_output_rgba(), get_node_output_value(), get_tex_mapping(), magic, mix(), noise(), norm(), NULL, ShaderGraph::output(), ShaderNode::outputs, SHADER_SOCKET_COLOR, SHADER_SOCKET_FLOAT, SkyTextureNode::sun_direction, TextureNode::tex_mapping, MappingNode::tex_mapping, SkyTextureNode::turbidity, MixNode::type, MathNode::type, GradientTextureNode::type, WaveTextureNode::type, MusgraveTextureNode::type, VectorMathNode::type, MixNode::type_enum, MusgraveTextureNode::type_enum, VectorMathNode::type_enum, WaveTextureNode::type_enum, MathNode::type_enum, GradientTextureNode::type_enum, ColorNode::value, ValueNode::value, and voronoi().
Referenced by add_nodes().
static void add_nodes | ( | BL::BlendData | b_data, |
ShaderGraph * | graph, | ||
BL::ShaderNodeTree | b_ntree, | ||
PtrSockMap & | sockets_map | ||
) | [static] |
Definition at line 504 of file blender_shader.cpp.
References ShaderGraph::add(), add_node(), assert, ShaderGraph::connect(), convert_socket_type(), node_socket_map_pair(), PtrNodeMap, RNA_NodeGroup, and set_default_value().
static ShaderSocketType convert_socket_type | ( | BL::NodeSocket::type_enum | b_type | ) | [static] |
Definition at line 458 of file blender_shader.cpp.
References SHADER_SOCKET_CLOSURE, SHADER_SOCKET_COLOR, SHADER_SOCKET_FLOAT, and SHADER_SOCKET_VECTOR.
Referenced by add_nodes().
static BL::NodeSocket get_node_output | ( | BL::Node | b_node, |
const string & | name | ||
) | [static] |
Definition at line 53 of file blender_shader.cpp.
References assert.
Referenced by get_node_output_rgba(), and get_node_output_value().
Definition at line 66 of file blender_shader.cpp.
References get_float3(), and get_node_output().
Referenced by add_node().
static float get_node_output_value | ( | BL::Node | b_node, |
const string & | name | ||
) | [static] |
Definition at line 72 of file blender_shader.cpp.
References get_node_output().
Referenced by add_node().
static void get_tex_mapping | ( | TextureMapping * | mapping, |
BL::ShaderNodeMapping | b_mapping | ||
) | [static] |
Definition at line 92 of file blender_shader.cpp.
References get_float3(), TextureMapping::rotation, TextureMapping::scale, and TextureMapping::translation.
static void get_tex_mapping | ( | TextureMapping * | mapping, |
BL::TexMapping | b_mapping | ||
) | [static] |
Definition at line 78 of file blender_shader.cpp.
References get_float3(), TextureMapping::rotation, TextureMapping::scale, TextureMapping::translation, TextureMapping::x_mapping, TextureMapping::y_mapping, and TextureMapping::z_mapping.
Referenced by add_node().
static SocketPair node_socket_map_pair | ( | PtrNodeMap & | node_map, |
BL::Node | b_node, | ||
BL::NodeSocket | b_socket | ||
) | [static] |
Definition at line 410 of file blender_shader.cpp.
References string_printf().
Referenced by add_nodes().
static void set_default_value | ( | ShaderInput * | input, |
BL::NodeSocket | sock | ||
) | [static] |
Definition at line 478 of file blender_shader.cpp.
References get_float3(), ShaderInput::set(), SHADER_SOCKET_CLOSURE, SHADER_SOCKET_COLOR, SHADER_SOCKET_FLOAT, SHADER_SOCKET_NORMAL, SHADER_SOCKET_POINT, SHADER_SOCKET_VECTOR, and ShaderInput::type.
Referenced by add_nodes().
CCL_NAMESPACE_BEGIN typedef map<void*, ShaderNode*> PtrNodeMap |
Definition at line 33 of file blender_shader.cpp.
Referenced by add_nodes().