Hey there. Begginer question. Is it possible in MEL to convert string text back to variable name. Here is rough example:
$x=smoothstep(0,30,frame);
$y=smoothstep(50,60,frame);
$a=$x*$y;
//down the script i have this:
string $a="$x*$y";
Can i convert it back from string variable to $a=$x*$y; consisting corresponding values ?
Replies
https://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/Commands/eval.html
In general I have for loop for queried keyframes. After that i have to multiply every array item from this loop to each other.The only way i know of to do so is to make another for loop and then "stringArrayToString" to get desire result: So i got this:
But now i have to convert it back to variables values. And it seems doesn't work.
So what Is another way may be in this case to multiply every item of array to each other?