snap node
hæ—
is it possible to modify the snap node or access the grid it uses, to change it ?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Frederik De Ble... on 25 Feb, 2015 07:45 PM
Hmm, the snap's node functionality is written in Java. Currently it is impossible to change the implementation easily.
You can examine the code by looking at the Java source here, and the math implementation here.
Support Staff 2 Posted by Frederik De Ble... on 25 Feb, 2015 08:00 PM
Couldn't resist, and re-implemented the snap functionality in Python. That allows you to look at the implementation and change it.
There's no built-in text editor, but you can use an external editor, then press Command-R in NodeBox to reload the implementation.
Support Staff 3 Posted by Frederik De Ble... on 25 Feb, 2015 08:01 PM
Obligatory screenshot:
4 Posted by flame on 27 Feb, 2015 01:30 AM
hæ—
I think I missed part of this but how do you get custom implementations/nodes into the system ?
Support Staff 5 Posted by Frederik De Ble... on 28 Feb, 2015 10:03 AM
The example .ndbx file already has this link.
The trick is to write a Python file, then in your NodeBox file, link to the code using File > Code Libraries…
Check out the example I sent you. It should work.
Grtz,
F