Skip to content

Instantly share code, notes, and snippets.

@deepakxyz
Last active January 11, 2022 15:30
Show Gist options
  • Save deepakxyz/8da4e39b8313c88babbbbdd4ed8db9fe to your computer and use it in GitHub Desktop.
Save deepakxyz/8da4e39b8313c88babbbbdd4ed8db9fe to your computer and use it in GitHub Desktop.
Copy the current file path to the clipboard
import hou
# get current path
current_file_path = hou.hipFile.name()
# copy to clipboard using PySide2
from PySide2 import QtGui
app = QtGui.QGuiApplication.clipboard()
app.setText(current_file_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment