PDA

View Full Version : Replace multiple objects



Boris Goreta
05-23-2008, 04:38 AM
I have 1000 a.lwo objects in my scene. I want to replace 500 of them with b.lwo. How do I do that ?

Thanks

walfridson
05-23-2008, 05:25 AM
Do those 500 objects share the same filename?

Pirk
05-23-2008, 05:26 AM
Just rename a.lwo to b.lwo in .lws scene file :)

Boris Goreta
05-23-2008, 05:30 AM
Yes, they share the same file name, b.lwo.

Thanks Pirk for the solution but Lightwave is at beta version 9.5 at the moment and still doesn't have multi replace ?

Btw, I can't select the objects I want to replace in WordPad, since all 1000 are named a.lwo and I want to select and replace specific 500.

walfridson
05-23-2008, 05:33 AM
@script generic
@name "ReplacewithX"
@warnings


generic
{
selected=Scene().getSelect();
SelectItem(selected[1].id);
for(i=1;i<=selected.size();i++)
{
AddToSelection(selected[i].id);
ReplaceWithObject("E://project//car//Objects//boll.lwo");
}

}
Little script for you, replace the file path to your object. Be sure to use // and not \

Cheers

Boris Goreta
05-23-2008, 05:40 AM
Thanks a bunch !

LW rocks ! :jam: