Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Action button script to copy the value of a parameter to the clipboard (linux)
"""Action button script."""
import os
if kwargs["shift"]:
# Copy evaluated parameter string
text = kwargs["parmtuple"][0].evalAsString()
command = "echo -n {0}| xclip -sel clip".format(text)
# Copy a reference to this parameter
Copy link

jamesrobinsonvfx commented Aug 20, 2021

os.system might not be the greatest. I think houdini has a clipboard? Maybe for more than just parms? I'll update if this ever becomes an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment