Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Send to Maya and associated help. Patch from Jon Roberts.

git-svn-id: http://macromates.com/svn/Bundles/trunk@8424 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
commit be7a2660400411d3abc9bd52f0d677b69ff63c68 1 parent d845f8b
msheets authored
View
33 Bundles/MEL.tmbundle/Commands/Help.tmCommand
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>. "$TM_SUPPORT_PATH/lib/webpreview.sh"
+html_header "Maya Embedded Language Help" "MEL"
+Markdown.pl &lt;&lt;'EOF'
+## Send to Maya
+
+Running this command will execute either the current selection or the entire script in Maya, using commandPort. Before doing this, Maya must run the following command:
+
+ commandPort -n ":2222";
+
+It is recommended to save that command to a shelf.
+
+EOF
+html_footer
+</string>
+ <key>input</key>
+ <string>none</string>
+ <key>name</key>
+ <string>Help</string>
+ <key>output</key>
+ <string>showAsHTML</string>
+ <key>scope</key>
+ <string>source.mel</string>
+ <key>uuid</key>
+ <string>1687B611-98C8-4324-A1B1-88978692C4DB</string>
+</dict>
+</plist>
View
38 Bundles/MEL.tmbundle/Commands/Send to Maya.tmCommand
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+# Created by Jon Roberts on 2007-10-18.
+# Maya must first run the command:
+# commandPort -n ":2222";
+
+require 'socket'
+
+begin
+ mel = STDIN.read
+ s = TCPSocket.open("localhost", 2222)
+ s.puts(mel)
+rescue Exception =&gt; e
+ puts("Error:\n"+e+"\n...is commandPort enabled? See help command.")
+end
+</string>
+ <key>fallbackInput</key>
+ <string>document</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>keyEquivalent</key>
+ <string>@r</string>
+ <key>name</key>
+ <string>Send to Maya</string>
+ <key>output</key>
+ <string>showAsTooltip</string>
+ <key>scope</key>
+ <string>source.mel</string>
+ <key>uuid</key>
+ <string>F122D96A-781F-4934-89AD-3BE0BFCDB3C1</string>
+</dict>
+</plist>
View
16 Bundles/MEL.tmbundle/info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>contactEmailRot13</key>
@@ -8,12 +8,26 @@
<string>Chandler McWilliams</string>
<key>description</key>
<string>The &lt;a href="http://en.wikipedia.org/wiki/Maya_Embedded_Language"&gt;Maya Embedded Language&lt;/a&gt; is a scripting language used in Maya.</string>
+ <key>mainMenu</key>
+ <dict>
+ <key>items</key>
+ <array>
+ <string>F122D96A-781F-4934-89AD-3BE0BFCDB3C1</string>
+ <string>------------------------------------</string>
+ <string>1687B611-98C8-4324-A1B1-88978692C4DB</string>
+ </array>
+ <key>submenus</key>
+ <dict/>
+ </dict>
<key>name</key>
<string>MEL</string>
<key>ordering</key>
<array>
<string>69554E52-391D-42BC-9F65-7A77444BA1CF</string>
<string>1C33AB7C-A008-4148-85CB-5303C7ED8CC5</string>
+ <string>7FC6AD09-BA7B-4A76-BDFC-9D52BE631802</string>
+ <string>F122D96A-781F-4934-89AD-3BE0BFCDB3C1</string>
+ <string>1687B611-98C8-4324-A1B1-88978692C4DB</string>
</array>
<key>uuid</key>
<string>59F874B0-94DD-4DB3-AD89-5BA5F79FC2E9</string>
Please sign in to comment.
Something went wrong with that request. Please try again.