Closed hmcmurray closed 11 years ago
Did you forget to set the sourceType Param of the commandPort to "python"? The default is MEL so you are sending Python syntax to a Mel port.
Try deleting and creating it again http://download.autodesk.com/us/maya/2011help/CommandsPython/commandPort.html
Yep,
Pretty embarrassing.
Thanks. H
No worries. Thanks for checking out the plugin!
I'm definitely happy with it! Helps A LOT!
Thanks! Hez
On Sat, Aug 24, 2013 at 3:49 PM, Justin Israel notifications@github.comwrote:
No worries. Thanks for checking out the plugin!
— Reply to this email directly or view it on GitHubhttps://github.com/justinfx/MayaSublime/issues/13#issuecomment-23218094 .
Hezekiah McMurray hez.mcmurray@gmail.com
Why not treat all the scripts as mel, and then when it comes as python, use the mel command "python" to exec it.
@kurtontheway I haven't really tried to make that approach work with much effort, but I think it requires more complicated escaping of the python code that gets executed through the mel python() command. The approach I am using now ensures that the python code that is executing is using a persistent namespace that isn't the main namespace.
Here's the output in the Maya session:
Line 4 is an import most likely NOT related to the problem - I'm guessing.
Here's what I'm running in Sublime that produces the error:
Maybe I'm just missing something and I'm wasting your time. Apologies if that's the case.
Hez