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 Toenne <lukas.toenne@googlemail.com>2013-04-29 12:59:38 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-04-29 12:59:38 +0400
commitabf1df03ebd34d09e977e6996252eb2a7f62ca89 (patch)
tree8021d943baf11f58a17115ea6b0e8f365e75212d /source/blender/editors/space_node/node_relationships.c
parenta4a29493090534caa6e9a732f11898db71e7ac0d (diff)
Fix for #35134.
The node link operator had a feature to automatically expose sockets in node groups when ctrl+shift+clicking on a node socket, which would create a node group input/output node. This was intended as a shortcut but conflicts with other features such as socket selection and viewer creation. It is also hardly necessary now that input/output nodes have an extension socket, which is much easier to use. Removed this expose functionality completely.
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r--source/blender/editors/space_node/node_relationships.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index b552aff27f9..71989f3ee04 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -443,15 +443,12 @@ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event)
bNodeLink *link;
LinkData *linkdata;
int in_out;
- int expose;
in_out = nldrag->in_out;
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1],
&snode->cursor[0], &snode->cursor[1]);
- expose = RNA_boolean_get(op->ptr, "expose");
-
switch (event->type) {
case MOUSEMOVE:
@@ -515,12 +512,6 @@ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event)
case RIGHTMOUSE:
case MIDDLEMOUSE:
{
- /* XXX expose + detach could have some ugly corner cases and is not great.
- * The first link will define the exposed socket type, which is arbitrary.
- * Some of the resulting links may turn out to be invalid.
- */
- bNode *ionode = NULL;
- bNodeSocket *iosock = NULL, *gsock;
for (linkdata = nldrag->links.first; linkdata; linkdata = linkdata->next) {
link = linkdata->data;
@@ -537,57 +528,6 @@ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (in_out == SOCK_OUT)
node_remove_extra_links(snode, link->tosock, link);
}
- else if (expose) {
- if (link->tosock) {
- if (!ionode) {
- ionode = nodeAddStaticNode(C, snode->edittree, NODE_GROUP_INPUT);
- gsock = ntreeAddSocketInterfaceFromSocket(snode->edittree, link->tonode, link->tosock);
- node_group_input_verify(snode->edittree, ionode, (ID *)snode->edittree);
- iosock = node_group_input_find_socket(ionode, gsock->identifier);
-
- {
- /* place the node at the mouse pointer */
- float sockx = 42.0f + 3 * HIDDEN_RAD; /* XXX totally arbitrary initial hidden node size ... */
- float socky = -HIDDEN_RAD;
-
- ionode->locx = snode->cursor[0] - sockx;
- ionode->locy = snode->cursor[1] - socky;
- }
- }
- link->fromnode = ionode;
- link->fromsock = iosock;
-
- BLI_addtail(&ntree->links, link);
-
- ntree->update |= NTREE_UPDATE_GROUP_IN | NTREE_UPDATE_LINKS;
- }
- else if (link->fromsock) {
- if (!ionode) {
- ionode = nodeAddStaticNode(C, snode->edittree, NODE_GROUP_OUTPUT);
- gsock = ntreeAddSocketInterfaceFromSocket(snode->edittree, link->fromnode, link->fromsock);
- node_group_output_verify(snode->edittree, ionode, (ID *)snode->edittree);
- iosock = node_group_output_find_socket(ionode, gsock->identifier);
-
- {
- /* place the node at the mouse pointer */
- float sockx = 0;
- float socky = -HIDDEN_RAD;
-
- ionode->locx = snode->cursor[0] - sockx;
- ionode->locy = snode->cursor[1] - socky;
- }
- }
- link->tonode = ionode;
- link->tosock = iosock;
-
- BLI_addtail(&ntree->links, link);
-
- ntree->update |= NTREE_UPDATE_GROUP_OUT | NTREE_UPDATE_LINKS;
- }
- else {
- nodeRemLink(snode->edittree, link);
- }
- }
else
nodeRemLink(ntree, link);
}
@@ -756,7 +696,6 @@ void NODE_OT_link(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
RNA_def_boolean(ot->srna, "detach", FALSE, "Detach", "Detach and redirect existing links");
- RNA_def_boolean(ot->srna, "expose", FALSE, "Expose", "Expose the socket as an interface node");
}
/* ********************** Make Link operator ***************** */