Can’t see how to create a list of number (float) values to choose from.
I want to create a box with three predefined lists of choices - one list each for width, height and depth - with the option of typing a value not in the list. The values aren’t equally spaced, so I can’t just use a parameter slider with a fixed step value.
A further complication is that I want the values to represent units of feet, and not just whole numbers of feet - ideally, a mix of feet and inches, usually but not always a multiple of 6".
Tried Number List node. Although the default ‘list size’ is 10, Add Item stops working after I’ve added three values, and I can’t see any way to add more values.
When I click on Add Item after there are three values (indexes 0 to 2) I see a quick blink showing an index of 3 and a value of 0, but it disappears immediately. The Add Item dialogue has no scroll bar, and using Tab to go to the next field doesn’t work either
Bug?
I’m using Chrome - latest Version 107.0.5304.110 (Official Build) (x86_64) on Mac Monterey.
Another related question:
Is this the right kind of node?
Is there another way of providing a drop down list of values to choose a number from? If so, what should I use?
Tried a number switch but it seems to be hard coded to accept only four choices, and I need more than that.
Is choice the right kind of node to use instead? Couldn’t initially see how to set it up, but an example helped me see that.
How to convert text to number
The choice nodes outputs a value which is apparently the chosen index, and a text value which is the chose option value.
How do I convert the text value to a number? It isn’t accepted as a number by the input to an xyz to vector node.
And I can’t find any type of node to use the text output as a number. If I drag the text output and drop it, the only node type available (even when I search for ‘number’) is another choice box.
There’s an example graph Setting a number list item, but I can’t see how it works.
The number list node seems to have an empty <float list>
although when I click on it I see a list (again limited to three values) all the same value.
And the output of the set number list item just shows the empty <float list>
as its value.
I’m finding the experience of trying to create live components a mix of interesting, partially successful, and very frustrating.
It seems to me there needs to be a list (at least) of what different types of nodes exist (lots!), and an easily accessible set of simple but not trivial examples of how to use each, with a short summary of when and why to use one rather than another.
I’ve found it sometimes useful to guess that there might be an example in the list of Live Components accessible from the Graph Browser, but it’s very hit or miss whether I guess the right name to search for, and I haven’t found a way of displaying everything. A single wild card character like * or % doesn’t work. Three asterisks produces more, but all?
And some of the examples that look potentially helpful - for example, Training - MF1 - are either incomplete or don’t work.
Temporarily stuck on my present attempt at a second LC following my moderately successful JWM shelves 4 and the tutorial based on that.
I want an LC to draw a box with a selection of options for width, height and depth drawn from lists of possible options for each, with a further option to type in a number not in the list, for any dimension.
I’d use it on my iPad to replace a hard coded Ruby extension I wrote (but haven’t published) to draw flats of standard sizes in my theatre set models in desktop SU.
But I’m stuck for the moment.
Any suggestions for a way forward would be welcome, but I’ll have to stop for today, as I can’t see a way forward.