QUOTE(DangerWeeni @ 06/19/08, 11:31 AM) [snapback]287254[/snapback]
for the first hting, take all those faces, and run some type of dynamic system, ... cache it up, solve it, then bake the animation curves and delete the dynamic system nodes. viola. you have keyframes. reverse the animation curves if you have to have it go backwards.
Yes but even so what is random isnt the one you need, sorry (offcourse you can download someone esles script, thing is tough blind trust in others scripts is not so sane, i could rootkit your machine whith a single script). I mean no way you look at it your going to benefit form scripting. PERIOD.
Thing is i dont really understand why its such a big taboo t say you need to know sripting, i mean scripting isnt terriby hard to do:
for example let us suppose you wanted to do the following, create a sphere, move it to the world postion 0 10 10, and assign it to a material called RedBalMat that allready exists. the script would look like:
CODE
sphere -r 1.0;
move -ws 10 10 0;
sets -e -forceElement RedBalMatSG;
please note how close this is to writing:
create a sphere,
move it to the world postion 0 10 10,
and assign it to a material called RedBalMat
the best part is you dont even need to KNOW how to write the script, when you do it by hand maya shows you what the script would look like. So you can do it and extend form there.
Now its not that i assume people need to know scripting for scripting sake! they need to know scripting for communications sake.
So the reason i wouldn't hire a person who cant script is that the same person exhibits loss in ability to communicate what they want. Im not saying everybody should be a scripter, im saying everybody should be able to fullfill rudimantary scripting requirements on paper.
So if you needed a script for this problem then you msut have a affirmate idea what you need. For example the requirement could read like this.
for each face move individual face to ist origin place in 10 seconds from a place in the faces normal direction 10 units away. each face 10 seconds apart form eachother. Unhide them on start.
Now this is a bit harder but once in that form NOT impossibly so let us assume user selects faces he wants to behave like this:
CODE
$time=10;
string $face="";
//lets make the move
for ($face in ls -sl -fl
){
$chip=polyChipOff -ch 1 -kft 0 -dup 0 -off 0 $face
;
setKeyframe -t ($time)($chip[0]+".localTranslateZ");
setAttr ($chip[0]+".localTranslateZ") 1;
setKeyframe -t ($time-10) ($chip[0]+".localTranslateZ");
$time+=10;
}
changeSelectMode -component;
select -r $face;
changeSelectMode -object;
//split up and set visibility
for ($item in ls -sl
){
$all=polySeparate -ch 1 $item
;
$time=-10;
for ($object in $all){
setAttr ($object+".visibility") 0;
setKeyframe -t (0) -ott step ($object+".visibility");
setAttr ($object+".visibility") 1;
setKeyframe -t (clamp(0,1000000,$time))($object+".visibility");
$time+=10;
}
}
codes not entirely optimal but was easiest to wirte this way.