10 Maya tips to boost your workflow


In this post I will share some tips and tricks that will help you to improve your workflow when working in Maya. From small python scripts that can resize your 4k images to a smaller format when doing some preview renders, to simple tips and shortcuts, I am sure that there will be something for every maya artist around.

#01 Setup UV Texture editor for multi-tile workflow

maya uv multi tile

By default the uv texture editor only shows 1 tile. To set a multi uv tile workflow, in the uv texture editor to go View > grid [option box] and set how many tiles you want to show, use the above image settings as a reference,

#02 Freeze objects on the viewport without layers

maya actions viewport

If you want to set some objects/single object in wireframe mode but still see all the other objects in shaded, you can add the object(s) to a layer and “template” it. But maya provides a way to template or set the object in bounding box mode without using the layers system. Right click on the object and choose Actions >> Template/Bouding Box. Later to revert this effect you use the same shorcut but select Untemplate.

#03 Free some memory with flushUndo

flushUndo maya

This command will clear the undo queue and free some memory. Only use this if you don’t need to undo from that point, like when you delete history on objects, this will clear and start over the undo history.

// mel


#04 Avoid maya crashes disabeling swatch render

maya swatches crash

In bigger scenes we always experience some “freezing” time, waiting for maya not to crash. There are a lot of tricks like saving the scene in wireframe mode, this way when maya opens it it will be more light. Another trick that I use often is disabeling the swatch render. Most of the time the thumbails/swatches are useless and if you feel that your scene/node is taking some time to update it’s a good idea to turn off the swatch rendering. This will prevent some maya crashes and freezing. You can access this option in the node editor >> options >> render swatches, and you can always turn it on later.

#05 Resizing image files inside maya

resize images maya python

So you have your big 4k textures but still doing some preview renders and you need smaller files to speed up the rendering. You can always go to photoshop and resize the images using actions or something. Other option is to have a script inside maya that not only will resize your images but also load in the resized ones in your file nodes.

import maya.cmds as cmds
import maya.OpenMaya as om

fileNodes = cmds.ls(sl=1)
width = 1024
height = 1024
image = om.MImage()

for i in fileNodes:
    filePath = cmds.getAttr(i+'.fileTextureName')
    image.readFromFile ( filePath )
    image.resize( width, height, False )
    image.writeToFile( filePath.split(".")[0] +'_resized.png', 'png')

    # replace file textures with resized images
    cmds.setAttr(i+'.fileTextureName', filePath.split(".")[0]+'_resized.png', type='string')

So you just select the files nodes you want to resize and run this script in the script editor. You can do this for multiple files or just a single file. Turn this into a shelf button and make a nice function from this with more features like switch between file sizes.

#06 Align camera to polygons for UV projections

align camera polygon maya

Sometimes is usefull to start some UV’s with a plannar projection. You can either UV project selecting a specific axis (x,y,z) or camera project in an orthographic view.  In case that your object is not parallel to an orthographic camera you can select some faces and in your viewport menu go to view >> align camera to polygon. You can create a bookmark from it so you can now select the faces you want to project or you can have saved a quick selection set, and do you UV camera projection create uvs >> create uvs based on camera.

#07 Select adjacent faces

maya face selection

In some parts of your models selecting specific edges loops can be tricky and require “manual” selections. In the image above I want to select 2 face loops. If I used the grow selection I would get 3 loops, If I do it with face >> double click I might get perpendicular edge loops when selecting the second face loop. So in this case I selected the middle edge loop and transform the selection “to faces” with ctrl >> right click. The other option “contained faces” or “contained edges” is also usefull for other types of selection.

#08 Access previous commands

maya recent commands

Use the up arrow in the command line to access previously used commands. This way you don’t need to re-open the “readme file” if you trying to call the same command you used a few minutes before.

#09 Attribute editor Auto-Load

maya ae autoload

When you select an object in maya the attribute editor will auto load  the object’s attributes. In some situations you might not want this, like for example when playing with the smoth mesh preview subdivisions I don’t want to see the wireframe of the object, so if I uncheck the auto load selected attributes under the attribute editor menu I can deselect the object and still have the attributes in the AE to play with.

#10 Script to open temp images folder

tmp images maya

Maya saves your renders (not batch) in a folder “tmp” in your project’s images. Here is a quick script that you can have around your maya UI to quickly open your project’s in explorer.

import maya.cmds as cmds

def openImgTemp(*args):
	CurrentProject = cmds.workspace(q=1,fullName=1)
	path = CurrentProject + '/images/tmp/'

Hopefully you learned something from this, leave a comment below with your feedback or questions.

  • Roman Lapaev

    Such a great tips man! thanks!

  • Pingback: Maya | 10 Tips to Boost Your Productivity

  • Dave

    thanks but the last one has an issue: the startfile command only works with Windows. You’ll need to set it to use the “open” command on OS X or gnome-open/xdg-open on Linux.

  • Beqa

    Some great tips there!
    just a quick question, if I want to resize back to 4k texture, do I have to change “width and height“ tab in script back to 4k or is there another way for doing this?

    • therenderblog

      Hi Beqa, when you resize the image you are not replacing them, just duplicating. So if you want to get back your 4k textures in maya you can do something like this:

      for i in cmds.ls(type=’file’):
      filePath = cmds.getAttr(i+’.fileTextureName’)

      if filePath.split(‘.’)[0][-8:] == ‘_resized’:
      cmds.setAttr(i+’.fileTextureName’, filePath.split(‘_resized’)[0]+filePath.split(‘_resized’)[1], type=’string’)

      But make sure that when you resize the files in the first place, you use the same extension of the original file.

  • tommy norman

    Just wanted to note that for #7 there is another solution with maya 2014. Although I use that marking menu “to faces” option a lot, if the modeling toolkit is active you can properly select adjacent face loops without worrying about getting a perpendicular loop.