ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Maya​Sublime

by justinfx ALL

Send selected Python and MEL code snippets from SublimeText to Maya via commandPort

Details

Installs

  • Total 13K
  • Win 10K
  • Mac 2K
  • Linux 664
Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9
Windows 0 0 0 1 0 3 0 0 0 1 2 0 1 0 0 0 1 0 0 0 2 2 0 0 1 0 0 1 0 0 1 2 2 0 0 0 0 0 1 3 1 2 0 0 2
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
01234Jun 22Jun 19Jun 16Jun 13Jun 10Jun 7Jun 4Jun 1May 29May 26May 23May 20May 17May 14May 11Jun 22 Linux: 0 Mac: 0 Windows: 0Jun 21 Linux: 0 Mac: 0 Windows: 0Jun 20 Linux: 0 Mac: 0 Windows: 0Jun 19 Linux: 0 Mac: 0 Windows: 1Jun 18 Linux: 0 Mac: 0 Windows: 0Jun 17 Linux: 0 Mac: 0 Windows: 3Jun 16 Linux: 0 Mac: 0 Windows: 0Jun 15 Linux: 0 Mac: 0 Windows: 0Jun 14 Linux: 0 Mac: 0 Windows: 0Jun 13 Linux: 0 Mac: 0 Windows: 1Jun 12 Linux: 0 Mac: 0 Windows: 2Jun 11 Linux: 0 Mac: 0 Windows: 0Jun 10 Linux: 0 Mac: 0 Windows: 1Jun 9 Linux: 0 Mac: 0 Windows: 0Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 0Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 0 Windows: 0Jun 4 Linux: 0 Mac: 0 Windows: 0Jun 3 Linux: 0 Mac: 0 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 2Jun 1 Linux: 0 Mac: 1 Windows: 2May 31 Linux: 0 Mac: 0 Windows: 0May 30 Linux: 0 Mac: 0 Windows: 0May 29 Linux: 0 Mac: 0 Windows: 1May 28 Linux: 0 Mac: 0 Windows: 0May 27 Linux: 0 Mac: 0 Windows: 0May 26 Linux: 0 Mac: 1 Windows: 1May 25 Linux: 0 Mac: 0 Windows: 0May 24 Linux: 0 Mac: 0 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 1May 22 Linux: 0 Mac: 0 Windows: 2May 21 Linux: 0 Mac: 0 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 0May 18 Linux: 0 Mac: 0 Windows: 0May 17 Linux: 0 Mac: 0 Windows: 0May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 3May 13 Linux: 1 Mac: 0 Windows: 1May 12 Linux: 0 Mac: 0 Windows: 2May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 0May 9 Linux: 0 Mac: 0 Windows: 2Jun 22 Linux: 0 Mac: 0 Windows: 0Jun 21 Linux: 0 Mac: 0 Windows: 0Jun 20 Linux: 0 Mac: 0 Windows: 0Jun 19 Linux: 0 Mac: 0 Windows: 1Jun 18 Linux: 0 Mac: 0 Windows: 0Jun 17 Linux: 0 Mac: 0 Windows: 3Jun 16 Linux: 0 Mac: 0 Windows: 0Jun 15 Linux: 0 Mac: 0 Windows: 0Jun 14 Linux: 0 Mac: 0 Windows: 0Jun 13 Linux: 0 Mac: 0 Windows: 1Jun 12 Linux: 0 Mac: 0 Windows: 2Jun 11 Linux: 0 Mac: 0 Windows: 0Jun 10 Linux: 0 Mac: 0 Windows: 1Jun 9 Linux: 0 Mac: 0 Windows: 0Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 0Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 0 Windows: 0Jun 4 Linux: 0 Mac: 0 Windows: 0Jun 3 Linux: 0 Mac: 0 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 2Jun 1 Linux: 0 Mac: 1 Windows: 2May 31 Linux: 0 Mac: 0 Windows: 0May 30 Linux: 0 Mac: 0 Windows: 0May 29 Linux: 0 Mac: 0 Windows: 1May 28 Linux: 0 Mac: 0 Windows: 0May 27 Linux: 0 Mac: 0 Windows: 0May 26 Linux: 0 Mac: 1 Windows: 1May 25 Linux: 0 Mac: 0 Windows: 0May 24 Linux: 0 Mac: 0 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 1May 22 Linux: 0 Mac: 0 Windows: 2May 21 Linux: 0 Mac: 0 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 0May 18 Linux: 0 Mac: 0 Windows: 0May 17 Linux: 0 Mac: 0 Windows: 0May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 3May 13 Linux: 1 Mac: 0 Windows: 1May 12 Linux: 0 Mac: 0 Windows: 2May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 0May 9 Linux: 0 Mac: 0 Windows: 2Jun 22 Linux: 0 Mac: 0 Windows: 0Jun 21 Linux: 0 Mac: 0 Windows: 0Jun 20 Linux: 0 Mac: 0 Windows: 0Jun 19 Linux: 0 Mac: 0 Windows: 1Jun 18 Linux: 0 Mac: 0 Windows: 0Jun 17 Linux: 0 Mac: 0 Windows: 3Jun 16 Linux: 0 Mac: 0 Windows: 0Jun 15 Linux: 0 Mac: 0 Windows: 0Jun 14 Linux: 0 Mac: 0 Windows: 0Jun 13 Linux: 0 Mac: 0 Windows: 1Jun 12 Linux: 0 Mac: 0 Windows: 2Jun 11 Linux: 0 Mac: 0 Windows: 0Jun 10 Linux: 0 Mac: 0 Windows: 1Jun 9 Linux: 0 Mac: 0 Windows: 0Jun 8 Linux: 0 Mac: 0 Windows: 0Jun 7 Linux: 0 Mac: 0 Windows: 0Jun 6 Linux: 0 Mac: 0 Windows: 1Jun 5 Linux: 0 Mac: 0 Windows: 0Jun 4 Linux: 0 Mac: 0 Windows: 0Jun 3 Linux: 0 Mac: 0 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 2Jun 1 Linux: 0 Mac: 1 Windows: 2May 31 Linux: 0 Mac: 0 Windows: 0May 30 Linux: 0 Mac: 0 Windows: 0May 29 Linux: 0 Mac: 0 Windows: 1May 28 Linux: 0 Mac: 0 Windows: 0May 27 Linux: 0 Mac: 0 Windows: 0May 26 Linux: 0 Mac: 1 Windows: 1May 25 Linux: 0 Mac: 0 Windows: 0May 24 Linux: 0 Mac: 0 Windows: 0May 23 Linux: 0 Mac: 0 Windows: 1May 22 Linux: 0 Mac: 0 Windows: 2May 21 Linux: 0 Mac: 0 Windows: 2May 20 Linux: 0 Mac: 0 Windows: 0May 19 Linux: 0 Mac: 0 Windows: 0May 18 Linux: 0 Mac: 0 Windows: 0May 17 Linux: 0 Mac: 0 Windows: 0May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 0 Mac: 0 Windows: 1May 14 Linux: 0 Mac: 0 Windows: 3May 13 Linux: 1 Mac: 0 Windows: 1May 12 Linux: 0 Mac: 0 Windows: 2May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 0 Windows: 0May 9 Linux: 0 Mac: 0 Windows: 2

Readme

Source
raw.​githubusercontent.​com

MayaSublime

A Sublime Text 2/3 plugin

Send selected MEL/Python code snippets or whole files to Maya via commandPort

Features

  • Optional streaming of all Maya Script Editor output back to Sublime console
  • Maya undo support
  • Includes MEL Syntax Highlighting for Sublime

Installation

Easy Install

You can install this plugin directly from Sublime Package Control:

https://packagecontrol.io/packages/MayaSublime

Manual install

  1. clone this repo into the SublimeText2/3 -> Preference -> Browse Packages directory:
    git clone git://github.com/justinfx/MayaSublime.git

  2. Edit the MayaSublime.sublime-settings file, setting the port to match the commandPorts you have configured in Maya

  3. Optionally edit the keymap file to change the default hotkey from ctrl+return to something else.

Note - Ideally you would make your custom changes to the user settings and not the default settings, so that they do not get overwritten when the plugin is updated.

Usage

To send a snippet, simply select some code in a MEL or python script, and hit Ctrl+Return, or right click and choose “Send To Maya”. A socket connection will be made to a running Maya instance on the configured port matching MEL or python, and the code will be run in Maya's environment.

As an example, if you want to open a commandPort on port 7002 for python (the default port in the config), you can do the following:

# if it was already open under another configuration
cmds.commandPort(name=":7002", close=True)

# now open a new port
cmds.commandPort(name=":7002", sourceType="python")

# or open some random MEL port (make sure you change it to this port in your config file)
cmds.commandPort(name=":10000", sourceType="mel")

Receiving results from Maya

By default, results from commands sent to Maya will not returned to Sublime, so output would be viewed from Maya. The ability to stream all output from the Maya Script Editor can be enabled in two different ways.

Edit the MayaSublime.sublime-settings file to make feature enabled by default:

"receive_maya_output": true

Or, use the Command Palette to toggle the feature on or off: “Maya: Enable ScriptEditor Output”