justinfx / MayaSublime

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

print() not always working #9

Closed fredrikaverpil closed 11 years ago

fredrikaverpil commented 11 years ago

When you're trying to print a string, such as print "hello world" having selected only one single row of code, this doesn't seem to work.

However, if you make sure you have an empty row at the end, the print goes through. Meaning:

Does not work: 1 | print "hello world"

Works: 1 | print "hello world" 2 |

justinfx commented 11 years ago

I'm trying to reproduce this behavior, but I am seeing it work in both cases. My test is on OSX, with Maya 2013, using a python command port on :7002. What is your configuration?

fredrikaverpil commented 11 years ago

This is happening with the following configuration: OSX 10.8, Maya 2014, Sublime Text 2, port 7002.

justinfx commented 11 years ago

What version of Sublime? I am not sure how to fix it since I can't reproduce it. If you find a fix that works for you, I would be happy to accept the patch.

justinfx commented 11 years ago

Can you confirm if commit 580d2a8 fixes this issue as well? It's possible that it might have been the same problem

fredrikaverpil commented 11 years ago

I'll be sure to test this out as soon as possible, probably not until Monday though.

fredrikaverpil commented 11 years ago

Hm... It seems like this is related to using " vs '.

Selecting and sending over the text print "hello world" to Maya works just fine, while print 'hello world' does not. If adding an empty row underneath the latter, the command with apostrophes is being sent over to Maya.

justinfx commented 11 years ago

I didn't try testing this until after merging issue #12 , but I can't reproduce this behavior. Going to close this issue. If it is still a problem can you please re-open?

fredrikaverpil commented 11 years ago

Seems it got fixed in the mix.