Python for Maya & Nuke Workshop at Digitales Studios

It was a great experience to conduct a 6-day Python for Maya and Nuke Artists workshop for Digitales Studio, Mumbai. Artists attended the workshop with great enthusiasm and spirit. While conducting the workshop I focused on the basics but I also explored many new exciting areas of Python. And I am sure artists of Digitales Studios has found this workshop worthwhile.


Aim of this workshop was to make artists know what Python is all about and what they can do with it in their respective softwares i.e. Maya and Nuke. As a artist knowledge of Python is a plus point, it can save time from doing repetitive tasks, writing small scripts and tools for better productivity, customization and alike. It was a 6-day workshop so we began with only Python for first three days, then two days of Python for Maya and one day of Python for Nuke.

On first day of Python we started with Introduction to Python, print statement, Variable, Reserved Keywords, Data Types (Int, Float, String, List, Tuple, Dictionary, etc.) and how can I forget to mention ‘Hello World’. We began second day with revision of Data Types, Operators, If…Elif…Else and Loops (for loop and while loop). Third day was dedicated to Functions, Global vs Local Variables, Modules, Exception Handling and how to further learn and enhance Python skills. While training the artists it was necessary for me to give real world examples as most of the artists were new to the world of programming and making them familiar with basic terminologies was important before getting started to learn Python for Maya and Nuke.

Fourth and fifth day was of Python in Maya. Here’s what we did on fourth day, Since there are many ways of implementing Python in Maya such as Maya Commands, PyMEL and Python API, learning Maya’s Architecture was important even before starting to learn Python for Maya so we began with studying how Maya works at it’s core. Most easy and friendly way to implement Python in Maya is Maya Commands and to learn Maya Commands knowing reference documentation is necessary so we learnt how to reference documentation. Now it was time to really start coding in Python with introduction to basic Maya Commands such as select, getAttr, setAttr, ls, etc. After practicing Maya Commands we wrote small scripts with implementing for loop and If…Else. Fifth day of workshop started with how to use Python and MEL together and continued with Render Callbacks. Then it was a interesting topic i.e. to use Maya without opening Maya (I mean in GUI) with Mayapy aka Maya’s own Python interpreter, with this artists learnt how to open Maya on command line and benefits and working of Mayapy. By now artists were familiar with Maya Commands so it was time to introduce PyMEL (developed and maintained by Luma Pictures). It is a another Python wrapper for Maya’s MEL commands. And at the end artists were provided with learning path for further implementation of Python in Maya.

Selfie Time

Sixth day and last day of day workshop was of Python in Nuke using Nuke Python API. Artists learnt how to reference documentation guides and API for finding needed functions. Before starting to code in Nuke a brief and introduction was given to Nuke’s PLUGIN_PATH, menu.py and init.py. Python is used for many aspects of Nuke and one of the important aspect is customization. So I started session with how to assign shortcuts to nodes and commands, setting of default knob values, adding formats and creating custom menus. As a artist having control over software’s customization is very important as it can save time while working. Next topic was of how to set and get values of nodes knobs, for this artists were introduced to functions such as selectedNodes, toNode, setValue, getValue, etc. With combination of these simple functions, for loop and If…Else, artists can write short scripts to get work done faster within minutes. Nuke scripts can get computationally heavy sometimes and to exactly know what is causing that problem artist were introduced to Performance Timers to debug there Nuke scripts. Nuke has many callbacks which basically call specified functions before a task, artists were introduced to render and Nuke script related callbacks. These callbacks were explained with simple practical example which was to enable nodes of specific class before render and to disable those nodes after render and after opening Nuke script. After callbacks it was writing of a script to set project settings from a Read node. And at the end of session artist were provided with learning path for further implementation of Python in Nuke.

Overall it was a excellent learning experience for artists of Digitales Studio and also for me to conduct the workshop. And at the end I express my thanks to Digitales Studios for permitting me to conduct the workshop and Artists for attending the workshop.


 

Leave a Reply

Your email address will not be published. Required fields are marked *