Blender V2.61 - r43446
|
#include "DNA_node_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_DerivedMesh.h"
#include "BKE_node.h"
#include "RNA_access.h"
#include "RNA_types.h"
#include "MEM_guardedalloc.h"
#include "NOD_socket.h"
Go to the source code of this file.
Defines | |
#define | INIT_TYPE(name) types[node_socket_type_##name.type] = &node_socket_type_##name; |
Functions | |
void | node_socket_type_init (bNodeSocketType *types[]) |
struct bNodeSocket * | nodeAddInputInt (struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, int value, int min, int max) |
struct bNodeSocket * | nodeAddOutputInt (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | nodeAddInputFloat (struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, float value, float min, float max) |
struct bNodeSocket * | nodeAddOutputFloat (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | nodeAddInputBoolean (struct bNodeTree *ntree, struct bNode *node, const char *name, char value) |
struct bNodeSocket * | nodeAddOutputBoolean (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | nodeAddInputVector (struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, float x, float y, float z, float min, float max) |
struct bNodeSocket * | nodeAddOutputVector (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | nodeAddInputRGBA (struct bNodeTree *ntree, struct bNode *node, const char *name, float r, float g, float b, float a) |
struct bNodeSocket * | nodeAddOutputRGBA (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | nodeAddInputShader (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | nodeAddOutputShader (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | nodeAddInputMesh (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | nodeAddOutputMesh (struct bNodeTree *ntree, struct bNode *node, const char *name) |
struct bNodeSocket * | node_add_input_from_template (struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp) |
struct bNodeSocket * | node_add_output_from_template (struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp) |
static bNodeSocket * | verify_socket_template (bNodeTree *ntree, bNode *node, int in_out, ListBase *socklist, bNodeSocketTemplate *stemp) |
static void | verify_socket_template_list (bNodeTree *ntree, bNode *node, int in_out, ListBase *socklist, bNodeSocketTemplate *stemp_first) |
void | node_verify_socket_templates (bNodeTree *ntree, bNode *node) |
Variables | |
static bNodeSocketType | node_socket_type_float |
static bNodeSocketType | node_socket_type_vector |
static bNodeSocketType | node_socket_type_rgba |
static bNodeSocketType | node_socket_type_int |
static bNodeSocketType | node_socket_type_boolean |
static bNodeSocketType | node_socket_type_shader |
static bNodeSocketType | node_socket_type_mesh |
Definition in file node_socket.c.
#define INIT_TYPE | ( | name | ) | types[node_socket_type_##name.type] = &node_socket_type_##name; |
struct bNodeSocket* node_add_input_from_template | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
struct bNodeSocketTemplate * | stemp | ||
) | [read] |
Definition at line 280 of file node_socket.c.
References bNodeSocketTemplate::flag, bNodeSocket::flag, bNodeSocketTemplate::max, bNodeSocketTemplate::min, bNodeSocketTemplate::name, nodeAddInputBoolean(), nodeAddInputFloat(), nodeAddInputInt(), nodeAddInputMesh(), nodeAddInputRGBA(), nodeAddInputShader(), nodeAddInputVector(), nodeAddSocket(), SOCK_BOOLEAN, SOCK_FLOAT, SOCK_IN, SOCK_INT, SOCK_MESH, SOCK_RGBA, SOCK_SHADER, SOCK_VECTOR, bNodeSocketTemplate::subtype, bNodeSocketTemplate::type, bNodeSocketTemplate::val1, bNodeSocketTemplate::val2, bNodeSocketTemplate::val3, and bNodeSocketTemplate::val4.
Referenced by node_add_sockets_from_type(), and verify_socket_template().
struct bNodeSocket* node_add_output_from_template | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
struct bNodeSocketTemplate * | stemp | ||
) | [read] |
Definition at line 312 of file node_socket.c.
References bNodeSocketTemplate::name, nodeAddOutputBoolean(), nodeAddOutputFloat(), nodeAddOutputInt(), nodeAddOutputMesh(), nodeAddOutputRGBA(), nodeAddOutputShader(), nodeAddOutputVector(), nodeAddSocket(), SOCK_BOOLEAN, SOCK_FLOAT, SOCK_INT, SOCK_MESH, SOCK_OUT, SOCK_RGBA, SOCK_SHADER, SOCK_VECTOR, and bNodeSocketTemplate::type.
Referenced by node_add_sockets_from_type(), and verify_socket_template().
void node_socket_type_init | ( | bNodeSocketType * | types[] | ) |
Definition at line 160 of file node_socket.c.
References INIT_TYPE.
Referenced by ntreeGetSocketType().
Definition at line 455 of file node_socket.c.
References bNodeType::inputs, bNode::inputs, bNode::outputs, bNodeType::outputs, SOCK_IN, SOCK_OUT, bNodeSocketTemplate::type, bNode::typeinfo, and verify_socket_template_list().
Referenced by lib_nodetree_init_types_cb().
struct bNodeSocket* nodeAddInputBoolean | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name, | ||
char | value | ||
) | [read] |
Definition at line 209 of file node_socket.c.
References bNodeSocket::default_value, nodeAddSocket(), SOCK_BOOLEAN, SOCK_IN, and bNodeSocketValueBoolean::value.
Referenced by node_add_input_from_template().
struct bNodeSocket* nodeAddInputFloat | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name, | ||
PropertySubType | subtype, | ||
float | value, | ||
float | min, | ||
float | max | ||
) | [read] |
Definition at line 192 of file node_socket.c.
References bNodeSocket::default_value, bNodeSocketValueFloat::max, bNodeSocketValueFloat::min, nodeAddSocket(), SOCK_FLOAT, SOCK_IN, bNodeSocketValueFloat::subtype, and bNodeSocketValueFloat::value.
Referenced by node_add_input_from_template(), node_forloop_init(), and node_whileloop_init().
struct bNodeSocket* nodeAddInputInt | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name, | ||
PropertySubType | subtype, | ||
int | value, | ||
int | min, | ||
int | max | ||
) | [read] |
Definition at line 175 of file node_socket.c.
References bNodeSocket::default_value, bNodeSocketValueInt::max, bNodeSocketValueInt::min, nodeAddSocket(), SOCK_IN, SOCK_INT, bNodeSocketValueInt::subtype, and bNodeSocketValueInt::value.
Referenced by node_add_input_from_template().
struct bNodeSocket* nodeAddInputMesh | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 269 of file node_socket.c.
References nodeAddSocket(), SOCK_IN, and SOCK_MESH.
Referenced by node_add_input_from_template().
struct bNodeSocket* nodeAddInputRGBA | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name, | ||
float | r, | ||
float | g, | ||
float | b, | ||
float | a | ||
) | [read] |
Definition at line 241 of file node_socket.c.
References bNodeSocket::default_value, nodeAddSocket(), SOCK_IN, SOCK_RGBA, and bNodeSocketValueRGBA::value.
Referenced by node_add_input_from_template().
struct bNodeSocket* nodeAddInputShader | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 258 of file node_socket.c.
References nodeAddSocket(), SOCK_IN, and SOCK_SHADER.
Referenced by node_add_input_from_template().
struct bNodeSocket* nodeAddInputVector | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name, | ||
PropertySubType | subtype, | ||
float | x, | ||
float | y, | ||
float | z, | ||
float | min, | ||
float | max | ||
) | [read] |
Definition at line 222 of file node_socket.c.
References bNodeSocket::default_value, bNodeSocketValueVector::max, bNodeSocketValueVector::min, nodeAddSocket(), SOCK_IN, SOCK_VECTOR, bNodeSocketValueVector::subtype, and bNodeSocketValueVector::value.
Referenced by node_add_input_from_template().
struct bNodeSocket* nodeAddOutputBoolean | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 216 of file node_socket.c.
References nodeAddSocket(), SOCK_BOOLEAN, and SOCK_OUT.
Referenced by node_add_output_from_template().
struct bNodeSocket* nodeAddOutputFloat | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 203 of file node_socket.c.
References nodeAddSocket(), SOCK_FLOAT, and SOCK_OUT.
Referenced by node_add_output_from_template().
struct bNodeSocket* nodeAddOutputInt | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 186 of file node_socket.c.
References nodeAddSocket(), SOCK_INT, and SOCK_OUT.
Referenced by node_add_output_from_template().
struct bNodeSocket* nodeAddOutputMesh | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 274 of file node_socket.c.
References nodeAddSocket(), SOCK_MESH, and SOCK_OUT.
Referenced by node_add_output_from_template().
struct bNodeSocket* nodeAddOutputRGBA | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 252 of file node_socket.c.
References nodeAddSocket(), SOCK_OUT, and SOCK_RGBA.
Referenced by node_add_output_from_template().
struct bNodeSocket* nodeAddOutputShader | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 263 of file node_socket.c.
References nodeAddSocket(), SOCK_OUT, and SOCK_SHADER.
Referenced by node_add_output_from_template().
struct bNodeSocket* nodeAddOutputVector | ( | struct bNodeTree * | ntree, |
struct bNode * | node, | ||
const char * | name | ||
) | [read] |
Definition at line 235 of file node_socket.c.
References nodeAddSocket(), SOCK_OUT, and SOCK_VECTOR.
Referenced by node_add_output_from_template().
static bNodeSocket* verify_socket_template | ( | bNodeTree * | ntree, |
bNode * | node, | ||
int | in_out, | ||
ListBase * | socklist, | ||
bNodeSocketTemplate * | stemp | ||
) | [static] |
Definition at line 343 of file node_socket.c.
References BLI_remlink(), bNodeSocket::default_value, ListBase::first, bNodeSocketTemplate::flag, bNodeSocket::flag, bNodeSocket::limit, bNodeSocketTemplate::limit, bNodeSocketValueVector::max, bNodeSocketValueInt::max, bNodeSocketTemplate::max, bNodeSocketValueFloat::max, bNodeSocketValueVector::min, bNodeSocketValueInt::min, bNodeSocketTemplate::min, bNodeSocketValueFloat::min, bNodeSocketTemplate::name, bNodeSocket::name, bNodeSocket::next, node_add_input_from_template(), node_add_output_from_template(), NODE_MAXSTR, SOCK_DYNAMIC, SOCK_FLOAT, SOCK_IN, SOCK_INT, SOCK_VECTOR, bNodeSocketValueVector::subtype, bNodeSocketValueInt::subtype, bNodeSocketTemplate::subtype, bNodeSocketValueFloat::subtype, bNodeSocketTemplate::type, and bNodeSocket::type.
Referenced by verify_socket_template_list().
static void verify_socket_template_list | ( | bNodeTree * | ntree, |
bNode * | node, | ||
int | in_out, | ||
ListBase * | socklist, | ||
bNodeSocketTemplate * | stemp_first | ||
) | [static] |
Definition at line 406 of file node_socket.c.
References BLI_addtail(), BLI_insertlinkbefore(), ListBase::first, bNodeSocket::flag, bNodeSocket::next, nodeRemoveSocket(), NULL, bNodeSocketTemplate::sock, SOCK_DYNAMIC, bNodeSocketTemplate::type, and verify_socket_template().
Referenced by node_verify_socket_templates().
bNodeSocketType node_socket_type_boolean [static] |
{ SOCK_BOOLEAN, "Boolean", "Boolean", 0, {158,139,63,255}, "bNodeSocketValueBoolean", sizeof(bNodeSocketValueBoolean), NULL, }
Definition at line 116 of file node_socket.c.
bNodeSocketType node_socket_type_float [static] |
{ SOCK_FLOAT, "Float", "Floating Point", 0, {160,160,160,255}, "bNodeSocketValueFloat", sizeof(bNodeSocketValueFloat), NULL, }
Definition at line 56 of file node_socket.c.
bNodeSocketType node_socket_type_int [static] |
{ SOCK_INT, "Int", "Integer", 0, {17,133,37,255}, "bNodeSocketValueInt", sizeof(bNodeSocketValueInt), NULL, }
Definition at line 101 of file node_socket.c.
bNodeSocketType node_socket_type_mesh [static] |
Definition at line 146 of file node_socket.c.
bNodeSocketType node_socket_type_rgba [static] |
{ SOCK_RGBA, "RGBA", "RGBA color", 0, {200,200,40,255}, "bNodeSocketValueRGBA", sizeof(bNodeSocketValueRGBA), NULL, }
Definition at line 86 of file node_socket.c.
bNodeSocketType node_socket_type_shader [static] |
{ SOCK_SHADER, "Shader", "Shader", 0, {100,200,100,255}, NULL, 0, NULL, }
Definition at line 131 of file node_socket.c.
bNodeSocketType node_socket_type_vector [static] |
{ SOCK_VECTOR, "Vector", "3-dimensional floating point vector", 0, {100,100,200,255}, "bNodeSocketValueVector", sizeof(bNodeSocketValueVector), NULL, }
Definition at line 71 of file node_socket.c.