PDA

View Full Version : Sourcing at startup


superduper10000
05-03-2007, 02:03 AM
Suppose you have a script in your maya user directory called "myMel.mel"


It looks like:


global proc myMel()
{
print "Hello to Me \n";
}

global proc yourMel()
{
print "Hello to you \n";
}



Typically both functions myMel and yourMel will be accesible in memory after starup.

However, I have a more complicated (long) file where only the function with the file name gets sourced -- none of the other functions in the file get sourced. Sourcing this file manually from maya loads all functions into memory. I can't see anything that should be different from this simple example... anyone know what might make a difference for selective sourcing like this?

HelioAraujo
05-04-2007, 07:05 PM
Hi SuperDuper10000,


Try removing "global" from all the procs that shouldn't be called directy from maya. I guess this is the way to go.

Regards,

CGTalk Moderation
05-04-2007, 07:05 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.