Permalink
Browse files

Convert the null node to Java.

  • Loading branch information...
fdb committed Jun 6, 2012
1 parent 826daa2 commit cceb254d7543052394255d545e7041316f1a3577
Showing with 14 additions and 2 deletions.
  1. +1 −1 libraries/corevector/corevector.ndbx
  2. +13 −1 src/java/nodebox/function/CoreVectorFunctions.java
@@ -205,7 +205,7 @@
<port type="float" name="y" value="0.0" label="y"/>
</node>
- <node function="pyvector/null" name="null" image="null.png" outputType="geometry" position="170,420"
+ <node function="corevector/doNothing" name="null" image="null.png" outputType="geometry" position="170,420"
prototype="filter" description="Does nothing.">
</node>
@@ -21,7 +21,7 @@
static {
LIBRARY = JavaLibrary.ofClass("corevector", CoreVectorFunctions.class,
"generator", "filter",
- "align", "arc", "centroid", "colorize", "connect", "ellipse", "freehand", "grid", "line", "lineAngle",
+ "align", "arc", "centroid", "colorize", "connect", "doNothing", "ellipse", "freehand", "grid", "line", "lineAngle",
"rect", "toPoints", "makePoint",
"fourPointHandle", "freehandHandle", "lineHandle", "pointHandle", "lineAngleHandle");
}
@@ -175,6 +175,18 @@ public static Path connect(List<Point> points, boolean closed) {
return p;
}
+ /**
+ * Return the given object back, as-is.
+ * <p/>
+ * This function is used in nodes for organizational purposes.
+ *
+ * @param object The input object.
+ * @return The unchanged input object.
+ */
+ public static Object doNothing(Object object) {
+ return object;
+ }
+
/**
* Create an ellipse at the given position.
*

0 comments on commit cceb254

Please sign in to comment.