Fix for own mistake: arc diff swallowed a commit somehow, breaking

compilation.
This commit is contained in:
Lukas Tönne
2014-03-02 17:04:24 +01:00
parent 503a9733d1
commit a89ef76136
5 changed files with 7 additions and 14 deletions

View File

@@ -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 */

View File

@@ -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? */

View File

@@ -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);

View File

@@ -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 */

View File

@@ -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, "" }
};