Maya Problem and Solution

  • Problem: “Constraint1 has no ‘w0′ attribute”, Rig or Constraint created in Maya 2015 can't open properly in Maya 2014
  • Cause: a constraint flag called “-bcd 0” is added in Maya 2015 while not available in Maya 2014
  • Solution: to Fix it, save your Maya 2015 file as MA file, open in text editor, replace “ -bcd 0” with “”, done and ok; while, sometimes, additional error may occur, just check script editor on what is the extra attribute there in file causing problem, and delete it.
  • mel code is like
    string $affect_boneList[] = `skinPercent -ignoreBelow 0.01 -q -t $srcSkin $vtxList`;
  • Python code is actually not t=1, but t=None
    # the t=1 one, will not work for multiple points, you need put t=None to enable you query all vtx at once
    affect_boneList = cmds.skinPercent(srcSkin, vtxList, ignoreBelow=0.01, q=1,t=None)

About Maya

  • Maya 6.5
    • but maybe I used Maya 6.5 initially but I forgot exactly.
  • Maya 7, introduced dedicated Toon shader;
    • note: first version I used at university in 2006;
  • Maya 8.5, introduced nCloth and Python 2.4.3; (Python is biggest game changer for dev in Maya)
    • note: later school moved to Maya 8 and Maya 8.5 and I used Maya 8.5 on my first Intel Mac after sold my PC in 2006 Sep;
  • Maya 2008
    • note: didn't used much, still sticked with Maya 8.5
  • Maya 2009, introduced nParticle, maya Asset, animation layer
    • replaced my Maya 8.5
  • Maya 2010, bundle Matchmover
  • Maya 2011, introduced Qt GUI
  • Maya 2012, introduced PhysX
    • replaced my Maya 2009, and first what I use at work (maybe 2010)
  • Maya 2013, introduced Bullet Physics, nHair
  • Maya 2014,
    • current working Maya I use.
  • so What version do I suggest to use:
    • for general 3D artwork creation, Maya 8.5 is good enough and plus simple dynamics
    • for Qt Gui development works, then just get latest Maya, like Maya 2014.

Custom plugin, script, mod folder

  • For version based plugins and mods, here is folder list
file type default path environment variable
.mll %userprofile%/Documents/maya/version/plug-ins MAYA_PLUG_IN_PATH
.so for linux ~/maya/version/plug-ins
.bundle for osx ~/Library/Preferences/Autodesk/maya
scripts maya/version/scripts
mel MAYA_SCRIPT_PATH
py PYTHONPATH
shelf MAYA_SHELF_PATH
module maya/version/modules MAYA_MODULE_PATH
icones maya/version/prefs/icons
Projects MAYA_PROJECTS_DIR
Project -proj MAYA_PROJECT

* to custom the default maya personal stuffs folder, set this environment variable

MAYA_APP_DIR

Maya Video and Article List

customize maya splash screen and ui

  • start Maya in other language
    REM Maya
    set MAYA_UI_LANGUAGE=en_US
    
    REM others: zh_CN, ja_JP

old maya splash screen list : http://www.toxik.sk/maya-startup-window-history/

  • maya 2009,2010 32_64bit splash: use Resource Extract tool to open MAYA\BIN\mayares.dll or mac,linux related;
    bitmap\MAYASTARTUPIMAGE.XPM  is the file to replace.
  • maya 2011 32_64bit splash: replace Maya2011\icons\MayaStartupImage.png and other related pngs;
  • maya 2011 ui:
    maya.exe -style [ plastique | cleanlooks | motif | cde ]

application preference related

  • user preference dir
    Mac: ~/Library/Preferences/Autodesk/maya 
    Win: %userprofile%\Documents\maya
    Linux: ~/maya
  • Maya customize hotkey in 2017 onwards, note you need to go Windows > Settings > Hotkey Editor, and duplicate default Maya hotkey set to be able to make hotkey changes

Maya cmd tools

Startup maya in commands

  • maya -noAutoloadPlugins
  • maya -script /mel/myStartup.mel
imf_convert .map file convertor
imf_disp image viewer
xpm2bmp xpm file to bmp file convert (or use GIMP)
use: xpm2bmp.exe img1.xpm img2.bmp

Maya Tips and Guides

  • increase texture display resolution by script
    global proc BumpMaxTextureResolution(int $maxRes)
    {
      string $files[] = `ls -type "file"`;
      for ($file in $files)
      {
        if (!`attributeExists "resolution" $file`) addAttr -ln "resolution" -at long $file;
        setAttr  ($file + ".resolution") $maxRes;
      }
    }
    BumpMaxTextureResolution(512);
  • render naming
    %s: scene name
    %c: camera
    %l: render layer