Pycharm and Maya 2016 / Copy + Paste Issue

Just wondering if anyone has a work around for this issue?

The Nathan Horne work around found on the Pycharm Support site seems to be absolete in 2016.

def removeInvalidClipboardData():

oldMimeData = QtGui.qApp.clipboard().mimeData()

newMimeData = QtCore.QMimeData()

for format in oldMimeData.formats():

     if 'text/uri-list' in format: #This breaks maya paste

          continue

     data = oldMimeData.data(format)

     newMimeData.setData(format, data)

clipboard = QtGui.qApp.clipboard()

clipboard.blockSignals(True)

clipboard.setMimeData(newMimeData)

clipboard.blockSignals(False)

QtGui.qApp.clipboard().dataChanged.connect(removeInvalidClipboardData)

It worked on 2015 for me all the time but then 2016 came out and had to ruin it for me :frowning:

If you use Charcoal cut and paste from Pycharm works

[QUOTE=Theodox;28971]If you use Charcoal cut and paste from Pycharm works[/QUOTE]

unfortunately I don’t Theo, How did you get mayacharm working and how does it feel? I use the telnet send to maya which is driven from the sublime send to maya but where as it is good for somethings it will not work for others. I tried to work with mayacharm but when sending code it refused to hand over permissions so i scrapped it and the PMIP plugin.

I use Mayacharm with Pycharm for heavy lifting and Charcoal for working directly inside of Maya (usually prototyping where you need to do things with the UI and in script in quick succession). There’s a little setup with MayaCharm (I think http://tech-artists.org/forum/member.php?2406-bryceclark is has a post on this somewhere on the site)

Hey mate, im the one that wrote MayaCharm, if you want to get it working you need to install this file http://rightsomegoodgames.ca/scripts/MayaCharm.jar in PyCharms Plugin manager, restart pycharm and search for mayacharm in the settings. In the Settings pallet for MayaCharm you need to define a hostname and port number. For the host localhost will do fine, and for the port really any port that isn’t already used will do.

Once you fill in that information, it will provide you with some code that you have to run in Maya, i recommend just adding that code to your UserSetup.py since this will force Maya to Open a port for MayaCharm to connect to on run. After that it is setup, you can send the current document or the current selection to Maya using either the alt+a or alt+s key commands, which you can also access via the run menu of PyCharm.

@passerby thanks for dropping in my friend. I will give it a try just now and see how things fly :). wish me luck :wink:

EDIT:

connection refused by maya with the script executed :confused: