예제 #1
0
def submitNukeCmdline_render(executeNodes=''):
    '''launch the qubegui submit dialog for nuke'''
    allNodes = nuke.allNodes()
    allNodes_Write  = [str(i.name()) for i in allNodes if i.Class() == 'Write'] 
    allNodes_Viewer = [str(i.name()) for i in allNodes if i.Class() == 'Viewer'] 
    nuke.tprint(allNodes_Write)
    nuke.tprint(allNodes_Viewer)
    range = '%s-%s' % (int(nuke.animationStart()), int(nuke.animationEnd()))
    rangeInc = int(nuke.animationIncrement())
    if rangeInc > 1:
        range += 'x%s' % rangeInc

    submitDict = {
        'name'      : 'nuke '+os.path.basename(str(nuke.root().name())),
        'prototype' : 'cmdrange',
        'env': {'NUKE_PATH': os.environ['NUKE_PATH']},
        'priority': 500,
        'cpus': 10,
        'reservations': 'global.nuke=1,host.processors=1',
        'groups': 'RENDERBOX',
        'package' : {
            'simpleCmdType': 'Nuke (cmdline)',
            'script': str(nuke.root().name()),
            'range' : range,
            'executeNodes' : executeNodes,
            'allNodes_Write' : ','.join(allNodes_Write),
            'allNodes_Viewer' : ','.join(allNodes_Viewer),
            'executable': 'C:\\Program Files\\Nuke9.0v5\\Nuke9.0.exe',
            } 
        }
    return launchgui(submitDict=submitDict)
예제 #2
0
def _asciiparse(filename):
    """
    Parses the tracking data out of the export file(s) (ASCII pathway).  All files must remain as named by Mocha (ie, _TrackerN,txt with N = [1,2,3,4])
    """
    filename = filename
    mocha_filetest = [
        '_Tracker1.txt', '_Tracker2.txt', '_Tracker3.txt', '_Tracker4.txt'
    ]
    truncName = filename[:-13]
    fileList = [truncName + filetest for filetest in mocha_filetest]
    start = int(nuke.animationStart())
    formattedList = []
    for file in fileList:
        procFile = open(file)
        alldata = [line.rstrip().split(' ') for line in procFile]
        trackStart = "{curve L x" + str(start)
        trackBodyX, trackBodyY = '', ''
        for coord in alldata:
            trackBodyX += " " + coord[0]
            trackBodyY += " " + coord[1]
        trackBodyX += "}"
        trackBodyY += "}"
        trackTxt = trackStart + trackBodyX + " " + trackStart + trackBodyY
        formattedList.append(trackTxt)
    unpackedList = [
        formattedList[0], formattedList[1], formattedList[3], formattedList[2]
    ]
    return unpackedList
예제 #3
0
def submitNukeCmdline_render(executeNodes=''):
    '''launch the qubegui submit dialog for nuke'''
    allNodes = nuke.allNodes()
    allNodes_Write  = [str(i.name()) for i in allNodes if i.Class() == 'Write'] 
    allNodes_Viewer = [str(i.name()) for i in allNodes if i.Class() == 'Viewer'] 
    scenefile = '[NUKE NOPIPE] %s' % os.path.basename(str(nuke.root().name()))
    nuke.tprint(allNodes_Write)
    nuke.tprint(allNodes_Viewer)
    range = '%s-%s' % (int(nuke.animationStart()), int(nuke.animationEnd()))
    rangeInc = int(nuke.animationIncrement())
    if rangeInc > 1:
        range += 'x%s' % rangeInc
    submitDict = {
        'name'      : scenefile,
        'prototype' : 'cmdrange',
        'package' : {
            'simpleCmdType': 'Nuke (cmdline)',
            'script': str(nuke.root().name()),
            'range' : range,
            'executeNodes' : executeNodes,
            'allNodes_Write' : ','.join(allNodes_Write),
            'allNodes_Viewer' : ','.join(allNodes_Viewer),
	    'executable' : '/atomo/apps/linux/x86_64/nuke/8.0v3/Nuke8.0',
            },
	'reservations' : 'host.processors=1+,license.nuke',
        'groups' : 'pipe',
        'cpus' : 6,
        'omithosts' : 'rhradec.local',
	'env': {'FOUNDRY_LICENSE_FILE':'[email protected]','NUKE_PATH':'/atomo/pipeline/tools/nuke/script:/atomo/pipeline/tools/nuke/gizmo','NUKE_TEMP_DIR':'/tmp/nuke_farm'}
        }
    return launchgui(submitDict=submitDict)
예제 #4
0
def _asciiparse(filename):
    """
    Parses the tracking data out of the export file(s) (ASCII pathway).  All files must remain as named by Mocha (ie, _TrackerN,txt with N = [1,2,3,4])
    """
    filename = filename
    mocha_filetest = ['_Tracker1.txt','_Tracker2.txt','_Tracker3.txt','_Tracker4.txt']
    truncName = filename[:-13]
    fileList = [truncName + filetest for filetest in mocha_filetest]
    start = int(nuke.animationStart())
    formattedList = []
    for file in fileList:
        procFile = open(file)
        alldata = [line.rstrip().split(' ') for line in procFile]
        trackStart = "{curve L x" + str(start)
        trackBodyX, trackBodyY = '',''
        for coord in alldata:
            trackBodyX += " " + coord[0]
            trackBodyY += " " + coord[1]
        trackBodyX += "}"
        trackBodyY += "}"
        trackTxt = trackStart + trackBodyX + " " + trackStart + trackBodyY
        formattedList.append(trackTxt)
    unpackedList = [formattedList[0], formattedList[1], formattedList[3], formattedList[2]]
    return unpackedList