[Closed] modifier parameter type
I’m experimenting with modifier scripts and am trying to save list of items from listbox as a parameter type. However it seems as if the string in the listbox items cannot be saved but only the integer for which ever item has been picked. Is there anyway to capture listbox items as parameter type?
You can use the items property to access the array of text strings. Then you can use the integer index to get the array you want. Is that what you meant?
theListBox.items[integer]
Not exactly. I’m creating a modifier which includes listbox with different lenses for user to create, remove or select. Have found that with parameters I can basically have values from spinners and strings from edittext saved for whenever scene is saved or plugin script is reloaded. Am trying to find simplest way to have string or array saved this way.
Here’s example of what I have as parameter setup:
myParam_LensList type:#string default:”” ui:CamDatabase_LensList
Integer works if I want to save whichever item has been selected but string doesn’t seem to work here.
If you check “Parameter Blocks” in the MXShelp… you’ll see you want to use a [b][b]#stringTab type for your type, not a string…
[/b][/b]myParam_LensList type:#stringTab default:”” ui:CamDatabase_LensList
If it’s going to change in number of items, you’ll have to designate it as a variable size too.
myParam_LensList type:#stringTab default:”” ui:CamDatabase_LensList tabSizeVariable:true