snap node

flame's Avatar

flame

25 Feb, 2015 12:16 PM

hæ—

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

    hæ—

    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.

    Grtz,

    F

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

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

Recent Discussions

22 Feb, 2024 05:51 AM
22 Feb, 2024 01:11 AM
21 Feb, 2024 05:27 PM
21 Feb, 2024 04:49 PM
16 Feb, 2024 05:24 PM

 

06 Feb, 2024 04:45 AM
19 Jan, 2024 09:50 AM
13 Jan, 2024 03:47 AM
05 Jan, 2024 05:10 PM
05 Jan, 2024 04:54 PM
04 Jan, 2024 11:49 PM