6/9/15

NUKE / PYTHON _ copy text from .txt file and paste into the DAG

create a .txt file containing a nuke group or nodes (copy from nuke and paste as a text) then use this function in nuke to create a node from it

import nuke
from PySide import QtGui

def FromTxtToNukeNode():
 with open ("O:/_WORK/.../textfile.txt", "r") as myfile:
  data=myfile.read() #get the text in the .txt file as a string variable
 QtGui.QApplication.clipboard().setText(data) # set to clipboard
 nuke.nodePaste("%clipboard%") # paste into nuke DAG

1 comment: