Skip to content

Instantly share code, notes, and snippets.

@michimussato
michimussato / clipboardfix.py
Created April 6, 2016 09:51
Copy/Paste fix (from PyCharm to Maya 2014)
from PySide import QtGui, QtCore
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)