
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to write a macro that selects individual nParticles then applies a cluster deformer to each particle in turn. The steps I'd like to follow would involve the following:
1) Use the particle tool to paint a random number of nparticles in the workspace
2) Run the following code to pick out each nparticle in turn and add a cluster deformer to it:
int $partCount = getAttr("nParticleShape1Deformed.count");
for ($i=0; $i<$partCount;$i++)
{
select -r nParticle1.pt"["+$i+"]";
newCluster " -envelope 1";
};
When I run the above code I get an error relating to the syntax I've used in applying the "i" counter to the selection of each nparticle in the loop. What am i doing wrong??
Any and all suggestions would be very welcome.
D
Solved! Go to Solution.