From 0890c2a4a021e7d5951abb0a7ebe138ed24ae28a Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 6 Nov 2012 21:36:44 +0000 Subject: support for string parameters in OSL nodes for now subtype is not defined, but once we start parsing the metadata we can set texture inputs as FILEPATH also, it takes relative strings and convert to absolute for all strings (which is arguably a good solution, but should work for now) --- source/blender/makesdna/DNA_node_types.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_node_types.h') diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 3437e6dfcf1..1684cf28b3c 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -118,7 +118,8 @@ typedef struct bNodeSocket { #define SOCK_BOOLEAN 4 #define SOCK_MESH 5 #define SOCK_INT 6 -#define NUM_SOCKET_TYPES 7 /* must be last! */ +#define SOCK_STRING 7 +#define NUM_SOCKET_TYPES 8 /* must be last! */ /* socket side (input/output) */ #define SOCK_IN 1 @@ -353,6 +354,11 @@ typedef struct bNodeSocketValueRGBA { float value[4]; } bNodeSocketValueRGBA; +typedef struct bNodeSocketValueString { + int subtype; + int pad; + char value[1024]; /* 1024 = FILEMAX */ +} bNodeSocketValueString; /* data structs, for node->storage */ enum { -- cgit v1.2.3