Why Script?
- Rename hundreds of objects
- Place many objects by a rule
- Build tools for your team
- Export files in batches
The Script Editor
- Open it with the Script Editor button at the bottom right
- Use the MEL tab or the Python tab
- Turn on History > Echo All Commands to see the code for what you do in the UI
- Select code and middle-mouse drag it onto a shelf to make a button
A Simple Python Script
It loops five times, creates a cube, names it and moves it along X. Run it by selecting the code and pressing Ctrl + Enter in the Script Editor.
maya.cmds pattern but was not run. Test it in a new scene.
MEL
MEL is Maya's older scripting language. It is still found in many studio tools and in the Script Editor history, so learn to read it. Python is usually the better choice for new code.
Batch Rename Logic
['Cube_01', 'Cube_02', 'Sphere_03', 'Cylinder_04']
The logic strips the prefix and numbers and adds a clean counter. In Maya you would loop over cmds.ls(selection=True) and call cmds.rename.
Practice
- Turn on Echo All Commands and create a sphere
- Run the five-cube script
- Change it to ten spheres in a ring
- Write a loop that renames the selection
Conclusion
Scripts automate repeated jobs. Use Echo All Commands to learn the commands and start with small tests.

