What’s the best way to figure the designscript equivalent of a node?
Just hover over the node
Vikram, Thanks for the quick reply. This does not necessarily apply to all nodes. List.Map and Geometry.Explode for example are a couple that I can’t get to work…
You can also download the latest daily build and check out node to code. :lol:
How to check node to code?
Daily builds after 0.81 have it as an option. Just select your nodes, right click on the canvas and choose “Node to Code”. Unfortunately List.Map isn’t supported at this moment. Tho you can search the forum for some examples on how to use it in DS:
I just tried using the “Node to Code” functionality with the Geometry.Explode and it worked wonderfully:
The List.Map functionality (and more) can be achieved in Design Script by defining functions.
However, one thing that probably still isn’t possible is - specifying a function as a key (like in SortByKey) within the script.
Map node to Script
Is there a way to use the List.Map node to go into more than one sublist level?
In your previous example, you use it to get all items of index “2” in all sub-lists. Where the node assumes you mean to search only one sublist level down
What if you have a further sublist level?
Is it possible to extract items of index “x” at a specific sublist level?
The previous post example with List.Count should help explain the concept better than the below example using List.GetItemAtIndex
Thank you, that is super helpful. I guess I don’t really understand list management and List.Map in particular. In fact, I found your designscript definition much more clear.
As a follow up, I am also puzzled by how these 2 definitions (attached) behave. Especially how the Curve.EndPoint and Curve.PointAtParameter differ in their behavior. I expected them to behave the same way. Would you help illuminate why they act like that?
Alex - the use of curly braces at the beginning of each of your examples structure the sub lists differently. Different input structures are giving you different results.