Overriding a class method

I needed to use the functionality of a method in an outside python script that I could look at, but not alter at all. This method used a GUI to gather some information before acting[…]

Unlocking Maya nodes

Unlocking Maya nodes is straightforward. import maya.cmds as cmds lockedList = [‘PxrCamera’, ‘PxrDebugShadingContext’, ‘PxrDefault’, ‘PxrDirectLighting’, ‘PxrOcclusion’, ‘PxrPathTracer’, ‘PxrValidateBxdf’, ‘PxrVCM’, ‘PxrVisualizer’, ‘TurtleBakeLayerManager’, ‘TurtleDefaultBakeLayer’, ‘TurtleRenderOptions’, ‘TurtleUIOptions’, ‘OmnidirectionalStereo’] for locked in lockedList:         cmds.lockNode(locked, lock[…]

List Comprehensions

List Comprehensions are wonderful things. What is a list comprehension? It’s a bit of syntactic sugar that helps you filter and/or alter a list to create a new list. It makes your code shorter, more[…]

Finding a module’s path

If you’re working on a script that has imported a bunch of modules, and you need to know where they actually live so you can take a look at them then use the __file__ command.[…]

FI_MayaPython.3

Connect/Disconnet UI

When you want to create a Maya UI, every modern Maya tutorial will chastise you if you don’t put that UI in a class. It makes sense… that way once you’ve initialized the UI class,[…]

FI_MayaPython.3

Exploring Maya API

I decided to mess around with the MayaAPI a little bit, just to see what it could do. This is by no means a finished script! You can NOT undo, so only test it out[…]

FI_NukePython

Get Nuke version

Reports the Nuke version information print nuke.NUKE_VERSION_STRING versionMaj = nuke.NUKE_VERSION_MAJOR versionMin = nuke.NUKE_VERSION_MINOR versionRel = nuke.NUKE_VERSION_RELEASE if versionMaj < 9:     print “Old version!” else:     print “Newer version!”

FI_NukePython

Roto Recursion

I needed to change the motion blur attribute for a long list of roto splines in Nuke. Note here that all of the roto nodes I’m searching for are by convention, contained in groups. If[…]