When and Why to Use “If Name Equals Main” in Maya Scripts

Are you creating Maya scripts with Python? Confused about some conditional statements? Here, Chris discusses what the Python if __name__ == “__main__” means. Additionally, Chris walks through when you would use the Python conditional statement when making Maya scripts. Most important of all, Chris explains why you should use it in scripting work.

Chris Zurbrigg is the creator of some great tools for Maya. Blue Pencil, Keyframe MP, and the Charcoal Editor can all round out your Maya Projects with tools that have much needed finesse. Chris has also given back to the community with great tutorials, particularly getting started with Maya Scripting with Python.