kcpsychman
11-10-2007, 12:17 AM
Hello. Simple question here. I am just starting trying to learn code, so my appologies for the noob question. I have used the split polygon tool on 300 somthing objects and created an offset. I want that offset to be animated so I would like to make maybe two short scripts, one for the starting keyframe and one for the ending keyframe. My process would be selecting one of the 300 polygon models, setting the time slider at starting point, hit the first script button to set the key for the first frame, move time slider to end and hit second script button to set a key at the end. I'm sure that whole process could be automated, but I thought I would start as simple as possible.
//starting key
int $i
setAttr "polyCut$i.extractOffsetX" 0;
setKeyframe "polyCut$i.extractOffset";
//ending key
int $i
setAttr "polyCut$i.extractOffsetX" 7.874;
setKeyframe "polyCut$i.extractOffset";
//starting key
int $i
setAttr "polyCut$i.extractOffsetX" 0;
setKeyframe "polyCut$i.extractOffset";
//ending key
int $i
setAttr "polyCut$i.extractOffsetX" 7.874;
setKeyframe "polyCut$i.extractOffset";
