Cleanup: Remove unused variables from the bNode struct
In some cases the variables were set but never used anywhere. Differential Revision: https://developer.blender.org/D9889
This commit is contained in:
@@ -674,7 +674,6 @@ void ntreeBlendReadData(BlendDataReader *reader, bNodeTree *ntree)
|
|||||||
/* and we connect the rest */
|
/* and we connect the rest */
|
||||||
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
|
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
|
||||||
BLO_read_data_address(reader, &node->parent);
|
BLO_read_data_address(reader, &node->parent);
|
||||||
node->lasty = 0;
|
|
||||||
|
|
||||||
LISTBASE_FOREACH (bNodeSocket *, sock, &node->inputs) {
|
LISTBASE_FOREACH (bNodeSocket *, sock, &node->inputs) {
|
||||||
direct_link_node_socket(reader, sock);
|
direct_link_node_socket(reader, sock);
|
||||||
|
|||||||
@@ -203,42 +203,6 @@ static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *
|
|||||||
uiItemR(layout, &sockptr, "default_value", DEFAULT_FLAGS, "", ICON_NONE);
|
uiItemR(layout, &sockptr, "default_value", DEFAULT_FLAGS, "", ICON_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* not used in 2.5x yet */
|
|
||||||
static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v)
|
|
||||||
{
|
|
||||||
Main *bmain = CTX_data_main(C);
|
|
||||||
bNodeTree *ntree = ntree_v;
|
|
||||||
bNode *node = node_v;
|
|
||||||
Tex *tex;
|
|
||||||
|
|
||||||
if (node->menunr < 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (node->id) {
|
|
||||||
id_us_min(node->id);
|
|
||||||
node->id = NULL;
|
|
||||||
}
|
|
||||||
tex = BLI_findlink(&bmain->tex, node->menunr - 1);
|
|
||||||
|
|
||||||
node->id = &tex->id;
|
|
||||||
id_us_plus(node->id);
|
|
||||||
BLI_strncpy(node->name, node->id->name + 2, sizeof(node->name));
|
|
||||||
|
|
||||||
nodeSetActive(ntree, node);
|
|
||||||
|
|
||||||
if (ntree->type == NTREE_TEXTURE) {
|
|
||||||
ntreeTexCheckCyclics(ntree);
|
|
||||||
}
|
|
||||||
|
|
||||||
// allqueue(REDRAWBUTSSHADING, 0);
|
|
||||||
// allqueue(REDRAWNODE, 0);
|
|
||||||
NodeTagChanged(ntree, node);
|
|
||||||
|
|
||||||
node->menunr = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
|
static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
bNode *node = ptr->data;
|
bNode *node = ptr->data;
|
||||||
|
|||||||
@@ -1620,7 +1620,6 @@ void node_draw_nodetree(const bContext *C,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bNodeInstanceKey key = BKE_node_instance_key(parent_key, ntree, node);
|
bNodeInstanceKey key = BKE_node_instance_key(parent_key, ntree, node);
|
||||||
node->nr = a; /* index of node in list, used for exec event code */
|
|
||||||
node_draw(C, region, snode, ntree, node, key);
|
node_draw(C, region, snode, ntree, node, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1643,7 +1642,6 @@ void node_draw_nodetree(const bContext *C,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bNodeInstanceKey key = BKE_node_instance_key(parent_key, ntree, node);
|
bNodeInstanceKey key = BKE_node_instance_key(parent_key, ntree, node);
|
||||||
node->nr = a; /* index of node in list, used for exec event code */
|
|
||||||
node_draw(C, region, snode, ntree, node, key);
|
node_draw(C, region, snode, ntree, node, key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,15 +218,14 @@ typedef struct bNode {
|
|||||||
char name[64];
|
char name[64];
|
||||||
int flag;
|
int flag;
|
||||||
short type;
|
short type;
|
||||||
char _pad[2];
|
|
||||||
/** Both for dependency and sorting. */
|
/** Both for dependency and sorting. */
|
||||||
short done, level;
|
short done, level;
|
||||||
/** Lasty: check preview render status, menunr: browse ID blocks. */
|
|
||||||
short lasty, menunr;
|
/** Used as a boolean for execution. */
|
||||||
/** For groupnode, offset in global caller stack. */
|
uint8_t need_exec;
|
||||||
short stack_index;
|
|
||||||
/** Number of this node in list, used for UI exec events. */
|
char _pad[1];
|
||||||
short nr;
|
|
||||||
/** Custom user-defined color. */
|
/** Custom user-defined color. */
|
||||||
float color[3];
|
float color[3];
|
||||||
|
|
||||||
@@ -264,10 +263,6 @@ typedef struct bNode {
|
|||||||
short custom1, custom2;
|
short custom1, custom2;
|
||||||
float custom3, custom4;
|
float custom3, custom4;
|
||||||
|
|
||||||
/** Need_exec is set as UI execution event, exec is flag during exec. */
|
|
||||||
short need_exec, exec;
|
|
||||||
/** Optional extra storage for use in thread (read only then!). */
|
|
||||||
void *threaddata;
|
|
||||||
/** Entire boundbox (worldspace). */
|
/** Entire boundbox (worldspace). */
|
||||||
rctf totr;
|
rctf totr;
|
||||||
/** Optional buttons area. */
|
/** Optional buttons area. */
|
||||||
|
|||||||
@@ -186,8 +186,6 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context,
|
|||||||
for (n = 0; n < totnodes; n++) {
|
for (n = 0; n < totnodes; n++) {
|
||||||
node = nodelist[n];
|
node = nodelist[n];
|
||||||
|
|
||||||
node->stack_index = index;
|
|
||||||
|
|
||||||
/* init node socket stack indexes */
|
/* init node socket stack indexes */
|
||||||
for (sock = node->inputs.first; sock; sock = sock->next) {
|
for (sock = node->inputs.first; sock; sock = sock->next) {
|
||||||
node_init_input_index(sock, &index);
|
node_init_input_index(sock, &index);
|
||||||
|
|||||||
Reference in New Issue
Block a user