carson-katri / carson-katri/geometry-script
[QUESTION] Index Switch and multiple Items
- Dominant language
- Python
- Stars
- 339
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
I am using Blender 4.1 and Geometry Script addon.
I wonder why the code below does not work?
In case, I just want to "fill up" the Index Switch and have more "add items" to the strings, how is the easiest way to do this without having to create and connect lots of String node?
BELOW FAILED:
blah = index_switch(data_type = "STRING", index = 1, 0 = "apple", 1 = "banana")
blah = index_switch(data_type = "STRING", index = 1, inputs[1] = "apple", inputs[2] = "banana")
FULL CODE BELOW FAILED:
```python
from geometry_script import *
@tree("String Combo")
def stringcurve(geometry: Geometry):
a = string(string = "apple")
b = string(string = "banana")
c = string(string = "orange")
d = string(string = "papaya")
blah = index_switch(data_type = "STRING", index = 1, a, b)
blih = blah.string_to_curves()
#bluh = blih.fill_curve().Geometry
return blih
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.