Monday, April 21, 2014

Maya basic scripting : 10 ideas

  1. A script that rotating x axis 180 degree of selected mesh
  2. A script that clean history, combine them and move the mesh and pivot to 0,0,0 (*)
  3. A script that assign a specific shader to the mesh (*)
  4. A script that transfer specific UV to another objects
  5. A script that smooth and mirror the geometry
  6. A script that auto mapping UV
  7. A script that separates all combined mesh 
  8. A script that saves UV snapshot 
  9. A script that hides objects and shows hidden objects (*)
  10. A script that shows face normal

for #4 : 


import maya.cmds as cmds
#create geo sphere
cmds.sphere()
#create a shader
shader = cmds.shadingNode('blinn', asShader=True)
#textrue node
filenode = cmds.shadingNode("file", asTexture=True)
cmds.select( 'pSphere1' )
cmds.hyperShade( assign=shader )