Mel Functions
Jump to navigation
Jump to search
Small objects rig
for($o in `ls -sl`){ select -cl; select -r ($o+".vtx[*]"); setToolTo moveSuperContext; vector $centerPos = `manipMoveContext -q -position Move`; $c = `circle -nr 0 1 0 -c 0 0 0 -sw 360 -ch 0 -r .8 -n "cookieCtrl"`; move -r ($centerPos.x) ($centerPos.y) ($centerPos.z); float $rr[] = sphrand(40); rotate -r ($rr[0]) ($rr[1]) ($rr[2]); zero($c[0]); select -cl; select $c $o; performParentConstraint 0; performScaleConstraint 0; }
'Zero Out' ctrller
proc zero(string $obj){ select -cl; select $obj; string $grandParents[] = `listRelatives -p`; string $zer = `group -em -w -n ($obj+"_ZERO")`; parent $zer $obj; setAttr ($zer+".rotateZ") 0; setAttr ($zer+".translateX") 0; setAttr ($zer+".translateY") 0; setAttr ($zer+".translateZ") 0; setAttr ($zer+".rotateX") 0; setAttr ($zer+".rotateY") 0; setAttr ($zer+".scaleZ") 1; setAttr ($zer+".scaleX") 1; setAttr ($zer+".scaleY") 1; if(size($grandParents)==0){ parent -w $zer; }else{ parent $zer $grandParents[0]; } parent $obj $zer; }
Bake Texture Sequence
- http://pastebin.com/raw/2wWPduBt bakeTextureSequence() bakes a maya texture to file with animation (PYTHON)
Particle & instances
- http://pastebin.com/raw.php?i=9e630r4i duplicateParticleInstanceFinal 3.1.0 (baking - no animation)
- http://pastebin.com/raw.php?i=V6QPPws7 tk_bakeParticleInstancer 1.4.0 (baking - animation. Slow start on large systems)
- http://pastebin.com/raw.php?i=qxkXjLeA vmvInstanceObjects (objects to instances)
- zooms and pans inside of a shot camera: http://pastebin.com/raw.php?i=eM1pBCJc
Select By Edge Angle
Show reflection angle
Create Follicles on selected components
Sppaint for layout
maya2022/ python3: https://berniebernie.fr/public/sppaint3D.zip
https://www.highend3d.com/maya/script/sppaint3d-for-maya/topics