Adverti horiz upsell

Source Python & Script Editor Dockable 1.0.0 for Maya (maya script)

The reload of your Python script is now on a button

License
Button download
332 Downloads

Compatibility

  • 2012, 2011

Operating Systems

  • Irix
  • Linux
  • Mac
  • Solaris
  • Windows

History

Created:02/15/2012
Last Modified:03/02/2012
File Size: 39.6 KB
This python script has the objective to assist the development process between your favorite IDE and Maya.

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

Usage
    import source_python
    test = source_python.SourcePython()
    see the installation to put the menu in the main Maya window/General Editors and the auto-start.

Installation:
    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
buildDeferredMenus();
// this add the menu Source Python below the Script Editor
python("import source_python;source_python.add_menu()");
// this load the interface on Maya start
evalDeferred "python(\"import source_python;test = source_python.SourcePython()\")";

Description:
    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:
            Right :
                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
            Left :
                the text zone to define the execution request
        On top of all, the Run button to execute after reloading the script

Menus
    File:
        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)
    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)
        Recents:
            Set length : define the max recent list length
            Reset      : clear the history
        Settings:
            Save  : Store the settings of the ui
            Reset : Restore the defaults ui settings
    Help : This help

Limitations:
    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.

Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.

People who favorited this item:

  • Alex Veresov
    Alex Veresov
  • xtvjxk
    xtvjxk
  • Hewa
    Hewa
  • crisosphinx
    crisosphinx