-
Notifications
You must be signed in to change notification settings - Fork 3
myData
The myData property is an array of data that configures the controls drawn in the working area. The keys of myData are numeric, beginning with 1 and must be sequential. Each key in the array draws a separate control.
The subkeys of each control vary based on type. The widget will automatically fill in missing information, primarily setting them to "default."
The myData settings for each control type are listed in the description of each control.
Here is a quick example of a basic creation of a set of 3 controls via script (can apply to any type except Dialog Box):
put "Raspberry Bacon" into tData[1]["label"]
put "Audacious Platypus" into tData[2]["label"]
put "Elegant Coyote" into tData[3]["label"]
set the myData of widget "My Controls" to tData
The bare minimum you need is to add the numeric sub key and everything else will be filled in. If a label is not set for a control, it will be set to a random ingredient from my recipe for Jambalya.
Properties can also be set by adding them to an array key "props" like so:
put true into myData["props"]["overlayMode"]
put 10 into myData["props"]["controlBufferV"]
put "shadow" into myData["props"]["controlObjectColor"]
set the myData of widget "My Controls" to tData