diff --git a/colorbleed/__init__.py b/colorbleed/__init__.py index e5d1aee374..9d9a050ac3 100644 --- a/colorbleed/__init__.py +++ b/colorbleed/__init__.py @@ -24,3 +24,8 @@ def uninstall(): print("Deregistering global plug-ins..") pyblish.deregister_plugin_path(PUBLISH_PATH) avalon.deregister_plugin_path(avalon.Loader, LOAD_PATH) + + +def register_loader_plugins(): + """Wrap to install Loader plugins for standalone""" + install() diff --git a/colorbleed/plugins/global/load/copy_file.py b/colorbleed/plugins/global/load/copy_file.py index bbb8e1d6f7..5bb2b11bb1 100644 --- a/colorbleed/plugins/global/load/copy_file.py +++ b/colorbleed/plugins/global/load/copy_file.py @@ -24,10 +24,12 @@ class CopyFile(api.Loader): assert app, "Must have running QApplication instance" # Build mime data for clipboard - data = QtCore.QMimeData() - url = QtCore.QUrl.fromLocalFile(path) - data.setUrls([url]) + file_path = QtCore.QUrl.fromLocalFile(path) + byte_array = QtCore.QByteArray("copy\n").append(file_path) + + mime = QtCore.QMimeData() + mime.setData("text/uri-list", byte_array) # Set to Clipboard clipboard = app.clipboard() - clipboard.setMimeData(data) + clipboard.setMimeData(mime) \ No newline at end of file