Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   about global variables (https://simplymaya.com/forum/showthread.php?t=23704)

laiamulet 30-10-2006 05:17 PM

about global variables
 
I would like to ask if the global variable that I have defined in one of the scripts of the folder :my files>maya>scripts are loaded automatically, like happens with the procedures that I have defined in that folder, or if I have to define it each time that I'm using it,...

Alan 03-11-2006 10:06 PM

global variables will be defined when the script that defines them is called.

e.g.

myfile.mel:
<<

global float $a;

global proc myProc()
{
//$a will now be available to use in this function
global float $a;
//assign a value to $a
$a = 1.0;
}

>>


All times are GMT. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018