Wed Mar 20, 2019 10:15 pm
Is it possible to convert a string in expression into a variable name to call the value of another tool?
I have several easing functions in custom tool (Easing.e0, Easing.e1, Easing.e2 etc...)
I also have a ComboControl (Easing.Easing) to choose one of the easings (output a number: 0, 1, 2 etc...)
In transform, I want it to get value of the selected easing function from the custom tool.
This:
"Easing.e"..Easing.Easing
Returns a string "Easing.e0" (when Easing.Easing is set to 0).
_G[Easing.e0] - the function that gets a value of global variable. It returns "nil".
How do I make it return the value of Easing.e0?