View Single Post
# 4 11-09-2009 , 08:30 AM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095
some lines of code thrown together

string $stem = "dupe_";
string $suffix= "_GEO";
string $dupeSel[] = `ls ($stem + "*" + $suffix)`;



// this is from an older script of mine. the default objects
// to randomly duplicate them are named like
// dupe_1_GEO, dupe_2_GEO, ... / I painted particles to a
// live surface and instanced geometry to them



int $count = `particle -q -count particleShape1`;
for ($i =0 ; $i < $count; $i++)
{
$pPos = `getParticleAttr -at position particleShape1.pt[$i]`;
$object = `duplicate $dupeSel`;
move $pPos[0] $pPos[1] $pPos[2] $object;
}


everything starts and ends in the right place at the right time.