View Full Version : transform all my group of copied shape to a group of instanced mesh ?

05 May 2006, 04:08 PM
How I can retreieve all transform of multiple object and use there information to create an instanced plane at every of these transform.

That's because I've copy many object but without instance, so I want to retreive all the transform and recreate a bunch of object with just one Plane_shape instanced at all of these coordinate.

thanks to reply if you've got a melscript for that ^^

05 May 2006, 07:11 PM
select the plane you want to instance, then Ctrl+Shift select the rest of the objects and apply this:

string $sel[]=`ls -sl -l -fl -typ "transform"`;
string $instanceNames[];
int $len=size($sel);
float $position[3];
for($i=1; $i<$len; $i++)
select -r $sel[0];
$instanceNames=`ls -l -sl -fl -typ "transform"`;
$position=`xform -a -ws -q -t $sel[$i]`;
xform -a -ws -t $position[0] $position[1] $position[2] $instanceNames[0];

05 May 2006, 10:05 AM
thanks a lot for that work... your a great scripter .. not to difficult compared to my level in mel scripting :-)

CGTalk Moderation
05 May 2006, 10:06 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.