Hey guys,
I had a global proc as my main entry. And, in that proc, it source other three proc in a subfolder reltive to itself.
So, say mainEntry.mel is located at D:\myScript and the other three proc, A.mel, B.mel, C.mel, are in D:\myScript\proc\
In mainEntry.mel, I have the following script.
CODE
global proc mainEntry(){
source "./proc/A.mel";
source "./proc/B.mel";
source "./proc/C.mel";
}
And, this all works fine if I source mainEntry.mel manually.
However, If I then copy the mainEntry.mel and the subfolder to any folder in my MAYA_SCRIPT_PATH, so Maya will source it automatically at startup, I get an error while calling mainEntry proc. Although it recognized mainEntry, Maya can not locate my other proc in the subfolder for the source statement. Does that mean that if Maya source my mainEntry at startup, "./" is not relative to my mainEntry.mel? Is there any way to solve this? I mean, how can have my script sourced successfully manually and automatically?