FI_NukePython

List gizmos

Gets all the gizmos! nodez = nuke.allNodes(recurseGroups=True) levelnum = 1 #for eachGiz in nodez: #    print eachGiz for a in nodez:     if type(a) == nuke.Gizmo:         #print a[‘name’].value()         #print a.name()         eachGrp =[…]

FI_MayaPython.3

Connection Hierarchy

Just a quick recursing utility function to get all the nodes in a connected hierarchy def getConnectionHierarchy(sourceNode, delList):     try:         nextConn = list(set(cmds.listConnections(sourceNode, s = True, d = False)))         #print “NEXT CONN: “[…]

Nuke groups

Prints a recursive listing of all the group nodes in the nuke file nodez = nuke.allNodes(“Group”, recurseGroups=True) levelnum = 1 for a in nodez:     if a.Class() == ‘Group’:         #print a[‘name’].value()         #print a.name()[…]

Nuke node type

Reports the node type of a selected node namedNode = nuke.selectedNode().name() print namedNode thisNode = nuke.selectedNode().Class() print thisNode nodeType = type(nuke.selectedNode()) print nodeType if nodeType == nuke.Gizmo:     print “Yay, gizmo!”

Turn on/off Hypershade updating

Just what the title says! import maya.cmds as cmds swatchState= cmds.renderThumbnailUpdate(q=True) if swatchState == 0:     cmds.renderThumbnailUpdate (1)     print(“\nSwatches turned ON”) else:     cmds.renderThumbnailUpdate (0)     print(“\nSwatches turned OFF”)

Adding render passes

This snippets adds in new passes… for now, it’s just connecting an Ambient Occlusion pass string $passPrefix = $charName; print(“Pass Prefix: ” + $passPrefix + “\n”); setAttr “defaultRenderGlobals.imageFilePrefix” -type “string” $passPrefix; string $defaultLICPasses[]; $defaultLICPasses =[…]

Get Maya version

Simply queries the particular version of Maya being used. float $mV = `getApplicationVersionAsFloat`; print(“Application Version: ” + $mV + “\n”);

Disable ‘Visible in Reflections’

Another attribute standardization. This turns off ‘visible in reflections’ for all selected objects. string $selGeo[] = `ls -sl`; string $eachGeo; for($eachGeo in $selGeo) {     print(“Object Name: ” + $eachGeo + “\n”);     string $visParam[…]

Region Render (Part 1)

So I oftentimes have to render at ridiculously large sizes for print, which is time and resource consuming. And sometimes, I make little mistakes (I admit it!). Little mistakes… not enough to require me to[…]

Reconnecting Shader Networks

Sometimes I have to work with files from older, outdated projects that contain nodes that just don’t apply anymore. For example, I have a file with shader networks than contain a unique user created node[…]