Misc. topics, loose ends
particle -p 1 2 3 -p 3 4 5 -name myParticle;
vector $pos = position; // can refer to the position attribute directly
acceleration = <<2,1,0>>; // can set an attribute directly
select myParticleShape.pt[0];
float $tmp[] = getParticleAttr("-attribute","position","myParticleShape.pt[0]");
vector $pos2 = <<$tmp[0], $tmp[1], $tmp[2]>>; // for pt[0]
setParticleAttr("-attribute",acceleration,"-vectorValue",2,1,0,"myParticleShape.pt[0]");//for pt[0]
- in an expression, 'time' and 'frame' are attributes that can be accessed
directly:
perp.translateZ = frame; persp.rotateX = time; currentUnit -time frame; float $frame = `currentTime -q`; currentUnit -time sec; float $time = `currentTime -q`;
optionVar -iv "testIntVar" $myVar; // create an int var. -fv, -sv create float & string vars resp. optionVar -exists testIntVar; int $storedVal = `optionVar -q testIntVar`; // NEED to know the type before retrieving optionVar -remove testIntVar; optionVar -list;