string to array1
Paste '0, 30, 60' and get a real list
- array
Every 3D workflow eventually needs a list of numbers you don't want to build node-by-node: camera elevations, frame indices, orbit angles. You could drag in a handful of constant nodes, or you could paste 0, 30, 60, 90 into one text box and let string to array1 turn it into an actual LIST for you. This is that node, and it's more forgiving than you'd expect.
The inputs are string_input (a multiline text box) and arrangement, a boolean that defaults to true. That boolean is the "clean it up for me" switch: when it's on, the node strips out whitespace and quote characters before parsing. The actual parsing happens through the pack's own string utility, and it's impressively tolerant - it handles Chinese commas (,), extra spaces, brackets of every shape, and it throws away junk characters that aren't digits, dots, minus signs, or brackets. So "[0, 30, 60]", 0, 30,60, or even a sloppy pasted mess all land as a clean [0, 30, 60] list. It'll even parse nested structures like [1,2],[3,4] into a 2D list.
The single output is array (a LIST). An empty input gives you an empty list rather than an error. If you've turned arrangement off, expect stricter behavior - it skips the whitespace/quote stripping, so clean input is on you.
Where you'll actually use this: as the human-friendly front door to the pack's whole array1 family. Type a list once, feed it to array1 select element, array1 number to angle, array1 append, or straight into the camera-pose converter. It's also the fastest way to turn a list you copied from documentation or a paper into something the graph can consume.
Caveat worth knowing: the node keeps numbers as whatever they parse to - integers stay integers, floats stay floats - and it'll quietly drop malformed bits of text. If your list comes back shorter than you typed, that's the junk-filter working, not data loss. Verify in the UI output before you build a whole render on it.
This is part of 807502278/ComfyUI-3D-MeshTool, a one-author 3D utility pack. Pure Python, no models. Install via ComfyUI Manager (search "ComfyUI-3D-MeshTool") and restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-3D-MeshTool
cd ComfyUI-3D-MeshTool
pip install -r requirements.txt
The usual pack gotcha applies: node renames between releases turn old instances red - recreate the node and reconnect. For a utility like this, the ten seconds it takes beats rebuilding the list by hand.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| string_input | STRING | — | |
| arrangement | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| array | LIST | — |