Revision: 36016
Updated Code
at November 16, 2010 16:51 by donaldstrubler
Updated Code
import nuke def TrackerToSyntheyes(): filenameSearch = 'choose your path' singleLine1 = '1920' singleLine2 = '1080' rangeLine = '1,100' prefix = 'nuke_' p = nuke.Panel('Tracker to Syntheyes') p.addFilenameSearch(" Filename:", filenameSearch) p.addSingleLineInput("Width", singleLine1) p.addSingleLineInput("Height", singleLine2) p.addSingleLineInput("Range", rangeLine) p.addSingleLineInput("Prefix", prefix) result = p.show() filenameVal= p.value(" Filename:") width = float(p.value("Width")) height = float(p.value("Height")) rangeVal = p.value("Range") rangeValFirst = int(rangeVal.split(',')[0]) rangeValLast = int(rangeVal.split(',')[1]) prefix2 = p.value("Prefix") print filenameVal tracker = nuke.selectedNode()['name'].value() + ' ' f = open(filenameVal, 'w') f.write for j in nuke.selectedNodes(): tracker = j['name'].value() + ' ' for i in range(rangeValFirst,rangeValLast): i = i+1 nuke.frame(i) x = str(((nuke.selectedNode()['track1'].getValueAt(i)[0]/width)*2)-1) + ' ' y = str(((((nuke.selectedNode()['track1'].getValueAt(i)[1]/height)*2)-1)*(-1))) + ' ' #tr = nuke.selectedNode()['track1'].getValueAt(i) ls = [] sent = prefix + tracker + str(i) + ' ' + x + y + '7' + '\n' f.write(sent) print sent f.close() #TrackerToSyntheyes() #menu #m = nuke.menu('Animation') #m.addCommand('File/Export to Syntheyes', "pxTrackerToSyntheyes.TrackerToSyntheyes()")
Revision: 36015
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 16, 2010 16:37 by donaldstrubler
Initial Code
def TrackerToSyntheyes(): filenameSearch = 'choose your path' singleLine1 = '1920' singleLine2 = '1080' rangeLine = '1,100' prefix = 'nuke_' p = nuke.Panel('Tracker to Syntheyes') p.addFilenameSearch(" Filename:", filenameSearch) p.addSingleLineInput("Width", singleLine1) p.addSingleLineInput("Height", singleLine2) p.addSingleLineInput("Range", rangeLine) p.addSingleLineInput("Prefix", prefix) result = p.show() filenameVal= p.value(" Filename:") width = float(p.value("Width")) height = float(p.value("Height")) rangeVal = p.value("Range") rangeValFirst = int(rangeVal.split(',')[0]) rangeValLast = int(rangeVal.split(',')[1]) prefix2 = p.value("Prefix") print filenameVal tracker = nuke.selectedNode()['name'].value() + ' ' f = open(filenameVal, 'w') f.write for j in nuke.selectedNodes(): tracker = j['name'].value() + ' ' for i in range(rangeValFirst,rangeValLast): i = i+1 nuke.frame(i) x = str(((nuke.selectedNode()['track1'].getValueAt(i)[0]/width)*2)-1) + ' ' y = str(((((nuke.selectedNode()['track1'].getValueAt(i)[1]/height)*2)-1)*(-1))) + ' ' #tr = nuke.selectedNode()['track1'].getValueAt(i) ls = [] sent = prefix + tracker + str(i) + ' ' + x + y + '7' + '\n' f.write(sent) print sent f.close() TrackerToSyntheyes() #menu #m = nuke.menu('Animation') #m.addCommand('File/Export to Syntheyes', "pxTrackerToSyntheyes.TrackerToSyntheyes()")
Initial URL
donaldstrubler.com
Initial Description
Right click menu to send Nuke trackers to Syntheyes.
Initial Title
pxTrackerToSyntheyes
Initial Tags
python
Initial Language
Python