diff options
Diffstat (limited to 'source/blender/nodes/composite')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_image.cc | 5 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_scale.cc | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.cc b/source/blender/nodes/composite/nodes/node_composite_image.cc index 79cb0bd0f8c..40d4d4563c9 100644 --- a/source/blender/nodes/composite/nodes/node_composite_image.cc +++ b/source/blender/nodes/composite/nodes/node_composite_image.cc @@ -372,7 +372,8 @@ static void cmp_node_image_verify_outputs(bNodeTree *ntree, bNode *node, bool rl for (sock = (bNodeSocket *)node->outputs.first; sock; sock = sock_next, sock_index++) { sock_next = sock->next; if (BLI_linklist_index(available_sockets.list, sock) >= 0) { - sock->flag &= ~(SOCK_UNAVAIL | SOCK_HIDDEN); + sock->flag &= ~SOCK_HIDDEN; + nodeSetSocketAvailability(ntree, sock, true); } else { bNodeLink *link; @@ -386,7 +387,7 @@ static void cmp_node_image_verify_outputs(bNodeTree *ntree, bNode *node, bool rl nodeRemoveSocket(ntree, node, sock); } else { - sock->flag |= SOCK_UNAVAIL; + nodeSetSocketAvailability(ntree, sock, false); } } } diff --git a/source/blender/nodes/composite/nodes/node_composite_scale.cc b/source/blender/nodes/composite/nodes/node_composite_scale.cc index 3972fc0d949..284d16b9b0d 100644 --- a/source/blender/nodes/composite/nodes/node_composite_scale.cc +++ b/source/blender/nodes/composite/nodes/node_composite_scale.cc @@ -32,7 +32,7 @@ static bNodeSocketTemplate cmp_node_scale_in[] = { {-1, ""}}; static bNodeSocketTemplate cmp_node_scale_out[] = {{SOCK_RGBA, N_("Image")}, {-1, ""}}; -static void node_composite_update_scale(bNodeTree *UNUSED(ntree), bNode *node) +static void node_composite_update_scale(bNodeTree *ntree, bNode *node) { bNodeSocket *sock; bool use_xy_scale = ELEM(node->custom1, CMP_SCALE_RELATIVE, CMP_SCALE_ABSOLUTE); @@ -40,12 +40,7 @@ static void node_composite_update_scale(bNodeTree *UNUSED(ntree), bNode *node) /* Only show X/Y scale factor inputs for modes using them! */ for (sock = (bNodeSocket *)node->inputs.first; sock; sock = sock->next) { if (STR_ELEM(sock->name, "X", "Y")) { - if (use_xy_scale) { - sock->flag &= ~SOCK_UNAVAIL; - } - else { - sock->flag |= SOCK_UNAVAIL; - } + nodeSetSocketAvailability(ntree, sock, use_xy_scale); } } } |