Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-03-02 20:04:24 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-03-02 20:04:24 +0400
commita89ef76136b8a529e1a4755a8b411da93ed81651 (patch)
tree2901603c302fae90d9151a714487fbb70dc84b36
parent503a9733d18f5da1002c7ca13701c9aff03d21b5 (diff)
Fix for own mistake: arc diff swallowed a commit somehow, breaking
compilation.
-rw-r--r--source/blender/blenkernel/BKE_node.h2
-rw-r--r--source/blender/makesdna/DNA_node_types.h6
-rw-r--r--source/blender/nodes/intern/node_socket.c2
-rw-r--r--source/blender/nodes/intern/node_util.c7
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_wave.c4
5 files changed, 7 insertions, 14 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index d37e16e6349..59ea921e11e 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -101,8 +101,6 @@ typedef struct bNodeSocketTemplate {
float min, max;
int subtype; /* would use PropertySubType but this is a bad level include to use RNA */
int flag;
- /* optional: allowed inputs for internal links */
- const bool *internal_links;
/* after this line is used internal only */
struct bNodeSocket *sock; /* used to hold verified socket */
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index c21cdfa66a2..cd9595d8185 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -128,9 +128,6 @@ typedef struct bNodeSocket {
/* XXX deprecated, socket input values are stored in default_value now. kept for forward compatibility */
bNodeStack ns DNA_DEPRECATED; /* custom data for inputs, only UI writes in this */
-
- /* optional: allowed inputs for internal links */
- const bool *internal_links;
} bNodeSocket;
/* sock->type */
@@ -161,7 +158,8 @@ typedef enum eNodeSocketFlag {
// SOCK_INTERNAL = 32, /* DEPRECATED group socket should not be exposed */
SOCK_COLLAPSED = 64, /* socket collapsed in UI */
SOCK_HIDE_VALUE = 128, /* hide socket value, if it gets auto default */
- SOCK_AUTO_HIDDEN__DEPRECATED = 256 /* socket hidden automatically, to distinguish from manually hidden */
+ SOCK_AUTO_HIDDEN__DEPRECATED = 256, /* socket hidden automatically, to distinguish from manually hidden */
+ SOCK_NO_INTERNAL_LINK = 512
} eNodeSocketFlag;
/* limit data in bNode to what we want to see saved? */
diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c
index b791f6f7393..b30658fa2be 100644
--- a/source/blender/nodes/intern/node_socket.c
+++ b/source/blender/nodes/intern/node_socket.c
@@ -56,7 +56,6 @@ struct bNodeSocket *node_add_socket_from_template(struct bNodeTree *ntree, struc
bNodeSocket *sock = nodeAddStaticSocket(ntree, node, in_out, stemp->type, stemp->subtype, stemp->identifier, stemp->name);
sock->flag |= stemp->flag;
- sock->internal_links = stemp->internal_links;
/* initialize default_value */
switch (stemp->type) {
@@ -118,7 +117,6 @@ static bNodeSocket *verify_socket_template(bNodeTree *ntree, bNode *node, int in
sock->type = stemp->type;
sock->limit = (stemp->limit == 0 ? 0xFFF : stemp->limit);
sock->flag |= stemp->flag;
- sock->internal_links = stemp->internal_links;
BLI_remlink(socklist, sock);
diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c
index 8fb455cd319..d3bde0a3b56 100644
--- a/source/blender/nodes/intern/node_util.c
+++ b/source/blender/nodes/intern/node_util.c
@@ -183,7 +183,6 @@ static int node_datatype_priority(eNodeSocketDatatype from, eNodeSocketDatatype
/* select a suitable input socket for an output */
static bNodeSocket *select_internal_link_input(bNode *node, bNodeSocket *output)
{
- const bool *allowed_inputs = output->internal_links;
bNodeSocket *selected = NULL, *input;
int i;
int sel_priority = -1;
@@ -195,9 +194,9 @@ static bNodeSocket *select_internal_link_input(bNode *node, bNodeSocket *output)
bool preferred;
if (nodeSocketIsHidden(input) || /* ignore hidden sockets */
- (allowed_inputs && !allowed_inputs[i]) || /* ignore if input is not allowed */
+ input->flag & SOCK_NO_INTERNAL_LINK || /* ignore if input is not allowed for internal connections */
priority < 0 || /* ignore incompatible types */
- (priority < sel_priority)) /* ignore if we already found a higher priority input */
+ priority < sel_priority) /* ignore if we already found a higher priority input */
continue;
/* determine if this input is preferred over the currently selected */
@@ -234,7 +233,7 @@ void node_update_internal_links_default(bNodeTree *ntree, bNode *node)
output = link->fromsock;
if (link->fromnode != node || output->link)
continue;
- if (nodeSocketIsHidden(output))
+ if (nodeSocketIsHidden(output) || output->flag & SOCK_NO_INTERNAL_LINK)
continue;
output->link = link; /* not really used, just for tagging handled sockets */
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
index a052817e9aa..e502f7d9d31 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
@@ -41,8 +41,8 @@ static bNodeSocketTemplate sh_node_tex_wave_in[] = {
const bool internal_links[5] = {0,0,0,0,0};
static bNodeSocketTemplate sh_node_tex_wave_out[] = {
- { SOCK_RGBA, 0, N_("Color"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, 0, internal_links},
- { SOCK_FLOAT, 0, N_("Fac"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR, 0, internal_links},
+ { SOCK_RGBA, 0, N_("Color"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_NO_INTERNAL_LINK},
+ { SOCK_FLOAT, 0, N_("Fac"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR, SOCK_NO_INTERNAL_LINK},
{ -1, 0, "" }
};