Copying file name to clipboard in an RV session?

Hi there!

Any suggestions for a quick n easy way of copying the file name of the file I’m currently viewing in an RV session to my clipboard? (Ideally in a way that is bindable to a hotkey)
I used to have this funtionality with a hotkey in a previous company and assumed it was a feature present in vanilla RV until now! But unless I’m missing something, I can’t seem to find it

Looked briefly into adding a hotkey by modifying the file, but before going to deep into that I thought I’d check in here :slight_smile:


The core of this is just a few lines:

import rv
sources = []
# Loop through all currently visible sources and gather the media name.
for source in rv.commands.sourcesAtFrame(rv.commands.frame()):
    sources.extend(rv.commands.getStringProperty("" % source))

# Take all the sources, and put them on the  clipboard.
from PySide2 import QtWidgets
cb = QtWidgets.QApplication.clipboard()
cb.setText(','.join(sources), mode=cb.Clipboard)

If you want to package that up into an RV package and bind it to a keyboard shortcut, it would probably be appreciated by others.

Thanks a lot for this Michael! Did the job :slight_smile:
Have attached the package I used it in to bind to “ctrl+c” below for others to grab

Copy_Path-1.0.rvpkg (911 Bytes)

1 Like