Parametric-Organic Design

Useful/Great/Cool Scripts for Maya

Hi there,

Here are my favorite scripts 🙂

Bonus Tools: it is not a single script but the most important Plug-in for Maya

SOuP: Maya without limits (all right not quite, but a useful plug-in pack)

  1. Rename (MEL)
    Rod Green’s script for complex renaming tasks (really great)
  2. Delete Turtle (MEL)
    A simple script which removes the unwanted Turtle nodes
    lockNode -l off TurtleDefaultBakeLayer;
    delete TurtleDefaultBakeLayer;
  3. Auto Scale for Directional Light (MEL)
    A simple script which automatically scales the locator (easier to see)
  4. Correct the Shape nodes name (Python) by ari-gold
    all = cmds.ls(sl=True, dag=True, shapes=True)
    for shape in all:
    '''
    shape contain the dag path
    exm.:
    grp_a
    grp_aShape
    grp_b
    grp_bShape
    print cmds.ls('grp_a', dag=1, shapes=1)
    >>('grp_a|grp_aShape', 'grp_b|grp_bShape')
    now rename the object, we have already the dag path so
    the input of the rename command is unique, you can also split the dag
    path by '|'[0] as parent
    '''
    cmds.rename(shape, "{0}Shape".format(cmds.listRelatives(shape, parent=True)[0]))
  5. DOF (MEL)
    A useful Depth of Field related script (thanks Domonkos for the help)
  6. Convert Shader to Arnold (aiStandard) (Python)
    A shader converter script from Solid Angle
  7. Lights for Viewport 2.0
    A simple script which creates a Directional Light, an Ambient Light and set some camera and light attribute (nicer shadow in Viewport 2.0)
    expression -s "perspShape.farClipPlane=perspShape.nearClipPlane*100000";
    defaultDirectionalLight(1, 1,1,1, "0", 0,0,0, 0);
    defaultAmbientLight(1, 0.45, 1,1,1, "0", 0,0,0, "1");
    setAttr "ambientLightShape1.color" -type double3 1 1 1 ;
    setAttr "ambientLightShape1.color" -type double3 0.577 0.869843 1 ;
    setAttr "ambientLightShape1.intensity" 0.34;
    select -r directionalLight1 ;
    rotate -r -ws -fo -64.777186 0 0 ;
    setAttr "directionalLightShape1.useDepthMapShadows" 1;
    setAttr "directionalLightShape1.dmapResolution" 4096;
    setAttr "directionalLightShape1.dmapFilterSize" 5;
    setAttr "directionalLightShape1.useRayTraceShadows" 1;
    setAttr "directionalLightShape1.locatorScale" 50;
    select -add ambientLight1 ;
    move -r 0 500 0 ;
    modelEditor -e -shadows true -displayLights all modelPanel4;
  8. Kludge City
    Ed Whetsone’s cool script which is a Procedural City Generator
  9. djPFXUVs
    Great UV randomizer (additional information)
  10. Adjacent Selection (MEL)
    Useful script for adjacent selections.
  11. Ming Tang’s procedural modeling scripts (MEL)
    A script pack for procedural modeling (cool stuff)
  12. Select every nth component (MEL)
    This is a core feature of Maya (nothing special), but you can’t find it in any menu (as far as i know 🙂 ).
    The number 2 means every second component (change the number as you like).
    polySelectEdgesEveryN "edgeLoop" 2;
    polySelectEdgesEveryN "edgeRing" 2;
    polySelectEdgesEveryN "edgeBorder" 2;
    polySelectEdgesEveryN "edgeLoopOrBorder" 2;
  13. Simple Studio Backgound (MEL)
    //Create a small backgroud for product shots.
    polyPlane -w 1 -h 1 -sx 10 -sy 10 -ax 0 1 0 -cuv 2 -ch 1;
    setAttr "polyPlane1.height" 40;
    setAttr "polyPlane1.width" 40;
    setAttr "polyPlane1.subdivisionsHeight" 50;
    setAttr "polyPlane1.subdivisionsWidth" 50;
    setAttr "pPlaneShape1.castsShadows" 0;
    select -r -sym pPlane1 ;
    nonLinear -type bend -lowBound -1 -highBound 1 -curvature 90;
    setAttr "bend1.highBound" 1;
    setAttr "bend1.lowBound" 0;
    rotate -r -os -fo 0 -90 0 ;
    rotate -r -os -fo 0 0 90 ;
    select -r -sym pPlane1 ;
    nonLinear -type bend -lowBound -1 -highBound 1 -curvature 110;
    rotate -r -os -fo 0 -90 0 ;
    rotate -r -os -fo -90 0 0 ;
    move -r 0 0 7 ;
    select -add bend1Handle;
    select -add bend2Handle;
    select -add pPlane1;
    parent;
    select -r -sym pPlane1 ;
    move -r 0 0 -10 ;
    select -r bend1Handle bend2Handle ;
    HideSelectedObjects;

  14. spPaint3d (python)
    Great script for random placement (a bit irrelevant since Maya 2017 Update 3/MASH Placer node, but I still love it)
  15. Unlimited Draw Segments for every selected Paint Effects Stroke (MEL)
    string $pfxSel[] = `ls -sl`;string $pfxSel[] = `ls -sl`;string $current;for ($current in $pfxSel){ setAttr ($current + ".maxDrawSegments") 0;}
  16. ParticleInstancerBaking (MEL)
    You can’t live without this.
  17. Water Drop Generator (Python)
    Cool 🙂
  18. Generate Bind Pose (MEL)
    dagPose -save -bindPose;
  19. djRivet
    You want this believe me. 🙂
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s