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:
authorTon Roosendaal <ton@blender.org>2011-07-22 19:28:50 +0400
committerTon Roosendaal <ton@blender.org>2011-07-22 19:28:50 +0400
commitea90544d65a5b2549d5e0b4761de3bf0f2631688 (patch)
tree440209dcaa85c0ff10c84c933fc0c81de77164b9 /source/blender/editors/transform
parent382050501dc0036dc28434b205215ebc21a0cf1b (diff)
Need some fun once a while:
On dragging a non-connected node on a noodle, it will insert it. Functionality tweaks are possible, but it already feels non-intrusive. Rules: - Insertion only when a single noodle is intersecting with node. - Default connects first matching socket type. - If no socket match, it connects the first.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_conversions.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 16bfc75c979..0a5e290643a 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -87,6 +87,7 @@
#include "ED_object.h"
#include "ED_markers.h"
#include "ED_mesh.h"
+#include "ED_node.h"
#include "ED_types.h"
#include "ED_uvedit.h"
#include "ED_curve.h" /* for ED_curve_editnurbs */
@@ -2182,6 +2183,12 @@ void flushTransNodes(TransInfo *t)
td->loc2d[0]= td->loc[0];
td->loc2d[1]= td->loc[1];
}
+
+ /* handle intersection with noodles */
+ if(t->total==1) {
+ ED_node_link_intersect_test(t->sa, 1);
+ }
+
}
/* *** SEQUENCE EDITOR *** */
@@ -4756,7 +4763,12 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
}
else if (t->spacetype == SPACE_NODE) {
- /* pass */
+ if(cancelled == 0)
+ ED_node_link_insert(t->sa);
+
+ /* clear link line */
+ ED_node_link_intersect_test(t->sa, 0);
+
}
else if (t->spacetype == SPACE_ACTION) {
SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;