Simply choose the working script, from the right list tree, choose the fonctions, the class to instanciate and there methods to run and just press thebutton Run : <your script path>
Requirement : Pymel
test = source_python.SourcePython()
see the installation to put the menu in the main Maya window/General Editors and the auto-start.
In your usersetup.mel (not userSetup.py)
(if you don't have one yet, create one on your mel folder)
put the lines below:
// put this line if you don't have it, it force the build of Maya menus
// this add the menu Source Python below the Script Editor
// this load the interface on Maya start
evalDeferred "python(\"import source_python;test = source_python.SourcePython()\")";
The Source Python and Script Editor windows (or dock) is divided in two zone.
On bottom side: the standard Script Editor.
On the up side: the new Source Python zone.
This is divided in 2 panes:
the list of all the functions, classes and methodes of the loaded module
Filter / Sort / Doc
Filter : enter the string you're looking for and define the test:
in, startswith or endswith
Sort Alphabetical : enable the sorting or keep the original order
Show doc : on each selection, the corresponding doc is printed
the text zone to define the execution request
On top of all, the Run button to execute after reloading the script
Open : open a python script to work on it
Refresh : read again the file to update the list of python object
Recents : the list of last opened python scripts
(the length is settable on the options)
Insert ScriptEditor : to force the insertion of the scriptEditor
Run Reset History : the scriptEditor history is cleaned on each run
In dock : to dock the window (by default on right side)
Set length : define the max recent list length
Reset : clear the history
Save : Store the settings of the ui
Reset : Restore the defaults ui settings
Help : This help
The scripts using some relatives informations using, for exemple __file__ or have some particular python object like singleton should not work. This because of the used method: execfile, where a new temporary file is used.
This script use the utf-8 encoding.
Thanks to Mako developers to implement the string conversion of the ast objects arguments.