snap node

flame's Avatar


25 Feb, 2015 12:16 PM


is it possible to modify the snap node or access the grid it uses, to change it ?

  1. Support Staff 1 Posted by Frederik De Ble... on 25 Feb, 2015 07:45 PM

    Frederik De Bleser's Avatar

    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.

  2. Support Staff 2 Posted by Frederik De Ble... on 25 Feb, 2015 08:00 PM

    Frederik De Bleser's Avatar

    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.

  3. Support Staff 3 Posted by Frederik De Ble... on 25 Feb, 2015 08:01 PM

    Frederik De Bleser's Avatar

    Obligatory screenshot:

  4. 4 Posted by flame on 27 Feb, 2015 01:30 AM

    flame's Avatar


    I think I missed part of this but how do you get custom implementations/nodes into the system ?

  5. Support Staff 5 Posted by Frederik De Ble... on 28 Feb, 2015 10:03 AM

    Frederik De Bleser's Avatar

    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.



Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? 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


16 May, 2024 01:58 AM
14 May, 2024 01:29 AM
13 May, 2024 12:36 AM
12 May, 2024 07:46 PM
05 May, 2024 04:38 PM
03 May, 2024 06:50 AM