If you are using svn setup or like env setting it will help lost like you can simply use myScript.blalala
On Tue, Nov 4, 2008 at 7:43 PM, Shawn Patapoff <[EMAIL PROTECTED]>wrote: > What does the __init__.py do for Maya outside of a class? I several custom > PYTHONPATH setup and I just use sys.path.append() to add any custom script > paths in my userSetup.py. Any other workflow would be great to hear. > > > On Tue, Nov 4, 2008 at 9:33 AM, Sylvain Berger <[EMAIL PROTECTED]>wrote: > >> First you need to make sure that the path where the python file is save is >> in your python path, you can usse your computer environment variable or maya >> maya.env file. I prefer using the maya.env file (located in your the maya >> pref folder) >> >> Then let's say the python file is named myPythonFunctions.py and in this >> file you have the doStuff() function >> >> in Maya you type: >> >> # import all the function contained in the python script in the main >> namespace >> import myPythonFunctions >> # make sure all the functions are up to date (this let's you edit the >> python file in an external editor without having to reload maya to update >> the script) >> reload(myPythonFunctions) >> >> # call the doStuf function >> myPythonFunctions.soStuff() >> >> Hope this helps >> >> >> I always use this method, I edit in Eclipse and simply import, reload and >> execute my functions without having to connect Eclipse with Maya. >> I usually create a shelf button containing the 3 lines, edit the script in >> eclipse, save, go in maya and hit the shelf button to run the command, go >> back in eclipse, edit some more, save ... you get the idea :) >> >> Good luck >> >> >> On Mon, Nov 3, 2008 at 10:42 PM, Beau Garcia <[EMAIL PROTECTED]> wrote: >> >>> Hi, >>> Sorry to ask such a basic question, but basically i want to source and >>> run a externally stored python script. Similarly to using "source >>> melScript.mel; melScript;" commands in Mel. Ive tried doing this by saving >>> the .py file as the same name as the main function used and then placing it >>> in a scripts folder. Then after re-loading maya, I tried to run the function >>> name , but no luck. Any help would be great. Thanks >>> >>> Beau >>> >>> >>> >> >> >> -- >> They say, "Evil prevails when good men fail to act." What they ought to >> say is, "Evil prevails." >> Nicolas Cage as Yuri Orlov in Lord of War. >> >> >> >> > > > > -- സ്നേഹിക്കയില്ല ഞാന് നോവുമാത്മാവിനെ സ്നേഹിച്ചിടാത്തൊരു തത്വശാസ്ത്രത്തെയും --~--~---------~--~----~------------~-------~--~----~ Yours, Maya-Python Club Team. -~----------~----~----~----~------~----~------~--~---
