Blender V2.61 - r43446
Defines | Functions | Variables

node_socket.c File Reference

#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 bNodeSocketnodeAddInputInt (struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, int value, int min, int max)
struct bNodeSocketnodeAddOutputInt (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnodeAddInputFloat (struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, float value, float min, float max)
struct bNodeSocketnodeAddOutputFloat (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnodeAddInputBoolean (struct bNodeTree *ntree, struct bNode *node, const char *name, char value)
struct bNodeSocketnodeAddOutputBoolean (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnodeAddInputVector (struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, float x, float y, float z, float min, float max)
struct bNodeSocketnodeAddOutputVector (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnodeAddInputRGBA (struct bNodeTree *ntree, struct bNode *node, const char *name, float r, float g, float b, float a)
struct bNodeSocketnodeAddOutputRGBA (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnodeAddInputShader (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnodeAddOutputShader (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnodeAddInputMesh (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnodeAddOutputMesh (struct bNodeTree *ntree, struct bNode *node, const char *name)
struct bNodeSocketnode_add_input_from_template (struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp)
struct bNodeSocketnode_add_output_from_template (struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp)
static bNodeSocketverify_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

Detailed Description

Definition in file node_socket.c.


Define Documentation

#define INIT_TYPE (   name)    types[node_socket_type_##name.type] = &node_socket_type_##name;

Function Documentation

struct bNodeSocket* node_add_input_from_template ( struct bNodeTree ntree,
struct bNode node,
struct bNodeSocketTemplate stemp 
) [read]
struct bNodeSocket* node_add_output_from_template ( struct bNodeTree ntree,
struct bNode node,
struct bNodeSocketTemplate stemp 
) [read]
void node_socket_type_init ( bNodeSocketType types[])

Definition at line 160 of file node_socket.c.

References INIT_TYPE.

Referenced by ntreeGetSocketType().

void node_verify_socket_templates ( bNodeTree ntree,
bNode node 
)
struct bNodeSocket* nodeAddInputBoolean ( struct bNodeTree ntree,
struct bNode node,
const char *  name,
char  value 
) [read]
struct bNodeSocket* nodeAddInputFloat ( struct bNodeTree ntree,
struct bNode node,
const char *  name,
PropertySubType  subtype,
float  value,
float  min,
float  max 
) [read]
struct bNodeSocket* nodeAddInputInt ( struct bNodeTree ntree,
struct bNode node,
const char *  name,
PropertySubType  subtype,
int  value,
int  min,
int  max 
) [read]
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]
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]
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]
static void verify_socket_template_list ( bNodeTree ntree,
bNode node,
int  in_out,
ListBase socklist,
bNodeSocketTemplate stemp_first 
) [static]

Variable Documentation

Initial value:
 {
                    SOCK_BOOLEAN,
                "Boolean",
        "Boolean",
                0,
                {158,139,63,255},

        "bNodeSocketValueBoolean",
        sizeof(bNodeSocketValueBoolean),

            NULL,
}

Definition at line 116 of file node_socket.c.

Initial value:
 {
                    SOCK_FLOAT,
                "Float",
        "Floating Point",
                0,
                {160,160,160,255},

        "bNodeSocketValueFloat",
        sizeof(bNodeSocketValueFloat),

            NULL,
}

Definition at line 56 of file node_socket.c.

Initial value:
 {
                    SOCK_INT,
                "Int",
        "Integer",
                0,
                {17,133,37,255},

        "bNodeSocketValueInt",
        sizeof(bNodeSocketValueInt),

            NULL,
}

Definition at line 101 of file node_socket.c.

Initial value:
 {
                    SOCK_MESH,
                "Mesh",
        "Mesh geometry data",
                0,
                {255,133,7,255},

        NULL,
        0,

            NULL,
}

Definition at line 146 of file node_socket.c.

Initial value:
 {
                    SOCK_RGBA,
                "RGBA",
        "RGBA color",
                0,
                {200,200,40,255},

        "bNodeSocketValueRGBA",
        sizeof(bNodeSocketValueRGBA),

            NULL,
}

Definition at line 86 of file node_socket.c.

Initial value:
 {
                    SOCK_SHADER,
                "Shader",
        "Shader",
                0,
                {100,200,100,255},

        NULL,
        0,

            NULL,
}

Definition at line 131 of file node_socket.c.

Initial value:
 {
                    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.