home
StrataCafe Forums
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 StrataCafe
 Strata Design 3D CX: Lua Scripting
 Replace Object Script
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Roger Krueger
Infrequent Poster

USA
5 Posts

Posted - 08/29/2008 :  03:17:36  Show Profile  Visit Roger Krueger's Homepage
This is a little rough around the edges, but it solves a problem someone posed in another thread--it replaces a bunch of objects with some other object. So if you import an arrangement of circles from illustrator you can replace them all with boxes... or light bulbs.

Throw it in your Scripts/Autoload folder and restart Strata.

Position the object to "replace with" at a greater Z axis position than any of the objects to be replaced. Select the "replace with" and "to be replaced" objects. (Yes, this is an ugly kludge, but I couldn't see any better way to do it.)

Run the script from the scripts menu.

This mostly assumes time 0, but I haven't tested what it'll do invoked from a different time.

Groups get treated as single objects, if you want to replace each part you'll need to ungroup. Note that lllustrator imports start life grouped.

http://www.punktures.com/strata/ReplaceObjects.lua

tbgriswold
Regularly Educational

USA
1443 Posts

Posted - 08/29/2008 :  11:19:06  Show Profile  Visit tbgriswold's Homepage
Very Cool! Worked as promised! A great start!
But it does destroy any animation attached to the previous objects and places them at their Zero time location, and ignores any rotation or scaling of the original object as well.

Britt

Edited by - tbgriswold on 08/29/2008 11:21:18
Go to Top of Page

Webb Simon
Infrequent Poster

United Kingdom
21 Posts

Posted - 08/29/2008 :  15:04:01  Show Profile
Will try it this week end thanks

Simon
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
StrataCafe Forums © 2009 StrataCafe Go To Top Of Page
Snitz Forums 2000