Dynamic Snapshot

From scripting
Jump to: navigation, search
//Author Nicholas Pisca Copyright 2005
//Dynamic snapshot script for particle-based mutation
//Requires file "110205a.mb" to be open and at currentTime 0

float $s1 = 0;
do {
     select -r mutator;
     duplicate -rr;
     move -r 0 0 ($s1/3);
     float $run1 = sin(8*$s1)*.05+2.5 ;
     scale -r $run1 0 $run1;
     $current = `ls -sl`;
     float $ht = `getAttr($current[0]+".scaleZ")`;
     if ( $ht > .8 ) {
          setAttr(($current[0]+".scaleY"), $s1/10);
          }
     $s1=$s1+.4;
     currentTime $s1;
}
while ($s1 < 50 );


More information on duplication and basic modifier commands, read pages 55-67 in YSYT.