Last active
January 11, 2022 15:30
-
-
Save deepakxyz/8da4e39b8313c88babbbbdd4ed8db9fe to your computer and use it in GitHub Desktop.
Copy the current file path to the clipboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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