justinfx / MayaSublime

Send selected Python and MEL code snippets from SublimeText to Maya via commandPort
MIT License
149 stars 38 forks source link

PY_MAYA_CALLBACK fails if sys is not imported before executing #33

Closed Jawabiscuit closed 7 years ago

Jawabiscuit commented 7 years ago

I put an import sys statement in Maya's userSetup.py or .mel and it works.

justinfx commented 7 years ago

Is this a duplicate of #28? I had fixed this same problem in the past. Can you confirm if you are on an old version? Fixed in 3.0.2

justinfx commented 7 years ago

Ok, so you manually cloned the plugin instead of using Package Control, which means it won't be auto updating. It will be however old it was when you cloned it. You could type git log to see the most recent commit. Or you could look at the "messages" subdirectory and see what the latest version file is. If you run git pull do you pick up any new changes.

Jawabiscuit commented 7 years ago

git pull Already up-to-date.

justinfx commented 7 years ago

I can't reproduce this problem at work. I will have to try when I have time from another computer. Seems like the problem should have already been fixed but you say you have the latest clone.

justinfx commented 7 years ago

Hah! I just figure out why I missed it. Needed to enabled the callback :-) I will push up a fix.

justinfx commented 7 years ago

Pull again and that should fix it. Thanks!

Jawabiscuit commented 7 years ago

Good on my end :+1: