hello every body.can it be possible to take variable from a file by using 'source' ?
ex:
the file C:/testfile.mel contains string $VAR = "ISCOOL";
if I do
[b]source C:/testfile.mel ;print $VAR;
[/b]maya say me '$VAR is an undeclared variable.'
Yes, but the variable must be global. So if the file contains
global string $VAR = "ISCOOL";
then is works. Please note that this is not particularly elegant, or safe.
thank I had already tested that. I move on python.
Nothing wrong with that. But just remember usually you do not want to design you system states like this.