Why not send to maya?
I am sure i can send command to maya with port 7002, and i test it in
sublime
import socket
> port = 7002
> sendST = 'import maya.cmds as mc;mc.polyCube()'
> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> sock.connect(('127.0.0.1', port))
> sock.settimeout(5)
> sock.send(sendST)
here is the error information
> Traceback (most recent call last):
> File "I:\workflow\python\b.py", line 5, in <module>
> c = Telnet("", int(7002), timeout=3)
> File "C:\Python26\lib\telnetlib.py", line 209, in __init__
> self.open(host, port, timeout)
> File "C:\Python26\lib\telnetlib.py", line 225, in open
> self.sock = socket.create_connection((host, port), timeout)
> File "C:\Python26\lib\socket.py", line 514, in create_connection
> raise error, msg
> socket.error: [Errno 10061]
> [Finished in 4.1s with exit code 1]
I tried to change
> c = Telnet("", int(port), timeout=3)
> c.write(mCmd)
instead of
> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
> sock.connect(('127.0.0.1', int(port))
> sock.settimeout(5)
> sock.send(mCmd)
in your MayaSublime.py file
but i failed, the shortcut ctrl+enter disappear . Please help me to know
why.
Why can not use on windows
Why the shortcut disappeared
2012/8/22 ZhangYu <[email protected]>
> hi Justin, I installed the plugin send to maya, it's ok on my mac, but
> there is an error on windows,
> "Failed to communicate with Maya
> [Error 10061]"
> Do you know why?
>
> On Jul 5, 2012, at 1:08 AM, Justin Israel wrote:
>
> I just did a clean install to check the steps. Here is the easiest way
> from a fresh SublimeText2 install:
> (Note: When I refer to the "super" key on mac, the equiv on win/linux is
> the "ctrl" key)
>
> 1. Install the Package Manager to make subsequent installs easy, and it
> will keep them up to date:
> a. Open up the Command Console: View -> Show Console
> b. Paste this python snippet which will install Package Manager, from
> this link: http://wbond.net/sublime_packages/package_control/installation
> c. Restart Sublime
>
> 2. Install SublimeCodeIntel
> a. Open the command palette (super+shift+p on mac), and type "Install
> Package"; hit enter
> b. Now search: CodeIntel; choose it and it will install.
> c. Restart Sublime
>
> 3. Test CodeIntel: The first time you start using CodeIntel, it will need
> to build an index of your pythonpath to find everything.
> a. open up a python script (something saved with a .py so sublime
> knows what language it is)
> b. import sys
> c. on a new line, start typing: sys.
> d. after the period, hit the manual completion hotkey. on mac its
> super+j
> e. You will see the status at the bottom telling you CodeIntel is
> scanning all your paths. When it is done, it will show the completion. And
> now autocompletion will be working right away.
>
> Personally, I turn off autocompletion in the settings and just use the
> hotkey when I want completion. I don't like it constantly popping up for
> everything I type.
>
> With this working, you could proceed to add more paths to your config, as
> listed in my previous reply.
>
> let me know if this stats working for ya.
>
>
>
> On Jul 3, 2012, at 9:00 PM, Ollarin wrote:
>
> Hey Justin,
>
> I've been trying to set up SublimeCodeIntel but I can't get it to work,
> according to ST2 it's installed. I've added the paths to the config file,
> though I don't get any auto completion. Even ctrl+shift+space doesn't work
> for bringing up the code completion manually.
>
> Would you happen to know what might cause something like that?
>
>
> On Tuesday, 3 July 2012 14:10:36 UTC-4, Justin Israel wrote:
>>
>> For anyone that ends up using SublimeCodeIntel, I just got completion
>> working fine with the maya commands and api.
>>
>> (adjust paths for your platform)
>>
>> In your ~/.codeintel/config, add this path to your "pythonExtraPaths
>> " python entry:
>>
>> ...
>> "Python": {
>> "python": '/usr/local/bin/python',
>> "pythonExtraPaths": [
>> ...
>> '/Applications/Autodesk/**maya2012/devkit/devkit/other/**
>> pymel/extras/completion/py'
>> ]
>> }
>> ...
>>
>> The next time you do a completion, it will want to scan that location
>> which might take a few seconds the first time:
>>
>> import maya.OpenMaya as om
>> om.<completion>
>>
>>
>> On Mon, Jul 2, 2012 at 8:13 PM, Justin Israel <[email protected]>wrote:
>>
>>> Read up to my previous reply about installing CodeIntel, to get code
>>> completion for general python standard lib.
>>> I can't remember if it works for the maya commands module though.
>>> CodeIntel would have to be able to load the .so like Eclipse does, as
>>> opposed to how other completers just parse an AST from the source files.
>>>
>>>
>>>
>>> On Jul 2, 2012, at 8:01 PM, "Kurian O.S" <[email protected]> wrote:
>>>
>>> code complete is working for anyone ? I tries some thing like os.path.
>>> but no compete window or do we need any plugin ? I am really looking
>>> for maya commands complete :)
>>>
>>> On Mon, Jul 2, 2012 at 7:34 PM, Justin Israel <[email protected]>wrote:
>>>
>>>> Unfortunately its not free. But its also not really expensive.
>>>>
>>>> I decided to throw something together today for being able to send
>>>> commands from SublimeText2 -> Maya:
>>>> https://github.com/justinfx/**MayaSublime<https://github.com/justinfx/MayaSublime>
>>>> Its a start, and works for the simple tests I have done so far.
>>>>
>>>>
>>>>
>>>> If someone ever decides to write a syntax file for MEL, I could include
>>>> that as well.
>>>>
>>>> On Mon, Jul 2, 2012 at 7:32 PM, Kurian O.S <[email protected]> wrote:
>>>>
>>>>> Is it free like scite ? because I saw a menu for "Enter License".
>>>>>
>>>>>
>>>>> On Mon, Jul 2, 2012 at 3:00 PM, Justin Israel
>>>>> <[email protected]>wrote:
>>>>>
>>>>>> @Jesse
>>>>>> SublimeCodeIntel -
>>>>>> https://github.com/Kronuz/**SublimeCodeIntel<https://github.com/Kronuz/SublimeCodeIntel>
>>>>>>
>>>>>> @PixelMucher
>>>>>> I don't think there is an existing plugin, from what I have searched,
>>>>>> but the editor allows for it by writing a python plugin:
>>>>>> http://www.sublimetext.com/**docs/api-reference<http://www.sublimetext.com/docs/api-reference>
>>>>>> You could make it something that fires on File Save, or an
>>>>>> application command that maybe binds to a hotkey for "Send To maya"
>>>>>>
>>>>>>
>>>>>> On Mon, Jul 2, 2012 at 2:32 PM, PixelMuncher <[email protected]>wrote:
>>>>>>
>>>>>>> Is there an easy way to connect to Maya so it can send commands?
>>>>>>> Thx.
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> view archives:
>>>>>>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
>>>>>>> change your subscription settings: http://groups.google.com/**
>>>>>>> group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> view archives:
>>>>>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
>>>>>> change your subscription settings: http://groups.google.com/**
>>>>>> group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --:: Kurian ::--
>>>>>
>>>>>
>>>>> --
>>>>> view archives:
>>>>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
>>>>> change your subscription settings: http://groups.google.com/**
>>>>> group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
>>>>>
>>>>
>>>>
>>>> --
>>>> view archives:
>>>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
>>>> change your subscription settings: http://groups.google.com/**
>>>> group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
>>>>
>>>
>>>
>>>
>>> --
>>> --:: Kurian ::--
>>>
>>>
>>> --
>>> view archives:
>>> http://groups.google.com/**group/python_inside_maya<http://groups.google.com/group/python_inside_maya>
>>> change your subscription settings: http://groups.google.com/**
>>> group/python_inside_maya/**subscribe<http://groups.google.com/group/python_inside_maya/subscribe>
>>>
>>>
>>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
>
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>
>
>
--
My Blog <http://zhangyu.me> Maya Programing
BBS<http://maya-programing.cgget.info>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe