1/27/15

NUKE / PYTHON _ Toggle heavy node by class


def disableHeavyNodes():
    # Toggle value / 1 disable - 0 enable
    # RSMB / frischluft / sapphire zblur-zdefocus-glow
    global tgl
    try:
        tgl = not tgl
    except NameError:
        tgl = 1 

    nodeArray = ['OFXcom.revisionfx.rsmb3_vectors_v3','OFXcom.revisionfx.rsmb3_v3',
                         'OFXcom.frischluft.openfx.depthoffield_v1','OFXcom.frischluft.openfx.outoffocus_v1',
                         'OFXcom.genarts.sapphire.blursharpen.s_zblur_v1','OFXcom.genarts.sapphire.blursharpen.s_zdefocus_v1','OFXcom.genarts.sapphire.lighting.s_glow_v1']
    for a in nuke.allNodes():
        if a.Class() in nodeArray :
            a['disable'].setValue(tgl)

1/4/15

NUKE / PYTHON _ snippets

nuke.selectedNode().Class()

def reloadReads():
 for myNode in nuke.allNodes("Read") :
  myNode["reload"].execute()
 print "--> Reads reloaded"