Output type of a subnetwork

Alex's Avatar

Alex

09 Jan, 2013 10:36 PM

I created an invader node per the subnetwork tutorial (http://nodebox.net/node/documentation/concepts/subnetworks.html). It works as described, however the node says its output type is int. When I go to the node's settings and try to change the type to geometry and output range to Value, I get an exception "nodebox.graphics.Geometry cannot be cast to nodebox.graphics.Point".

Could you explain why this happens when switching output range from List to Value?

Thanks.

  1. Support Staff 1 Posted by Stefan Gabriels on 15 Jan, 2013 10:28 AM

    Stefan Gabriels's Avatar

    Hello, I figured out why this happened but the reason is quite technical: turning the output range to value causes the output to be basically organised in such a way (if you really want to know, a "list of a list of geometry objects") that the code is trying it to feed as an argument of a function that is not really capable of handling it.

    That said, it's not a good idea to set the output range of sub networks to value. Yes your output inside the subnetwork might be treated as a single object and from that perspective it makes sense to make the network have output range value. But... the subnetwork itself wraps whatever is inside of it into a list anyway, so from the subnetwork's point of view it makes more sense to always have output range list.

    But we agree it's confusing and we'll think about how we can approach this issue.
    https://github.com/nodebox/nodebox/issues/311

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • Captura_de_pantalla_2013-01-10_a_la_s__00.36.23.png 29.4 KB

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

06 Feb, 2025 01:37 AM
04 Feb, 2025 06:32 AM
04 Feb, 2025 05:04 AM
30 Jan, 2025 09:31 AM
30 Jan, 2025 09:08 AM

 

30 Jan, 2025 08:40 AM
24 Jan, 2025 07:50 AM
22 Jan, 2025 11:42 PM
21 Jan, 2025 09:43 AM
21 Jan, 2025 09:41 AM
21 Jan, 2025 09:36 AM