Notifications
Clear all
[Closed] Instance multiple objects
Jan 10, 2007 5:10 pm
Hello,
Im quite new at max script. we are using RTRE and need to light several objects so i am trying to merge in a light dome and then instance over and align objects to this light dome…once the lighting is complete delete all the instanced objects…
i have managed various elements of this in a fashion but its all a little messy…i got it working fro one object but then when i tried to do it for several it fell apart…
heres where im up to now
macroScript deleteinstance Category:"tools" toolTip:"delete instance"
(
delete $tempinstance*
)
macroScript makedome Category:"tools" toolTip:"Make Dome"
(
thecopypastedir = getdir #scripts
thecopypastefile = "\RTRE_LDOME.max"
thecopypastestring = thecopypastedir + thecopypastefile
mergemaxfile (thecopypastedir + thecopypastefile) #select
)
macroScript deletedome Category:"tools" toolTip:"delete Dome"
(
delete $EL*
)
macroScript align Category:"tools" toolTip:"align"
(
cs = getcurrentselection()
cscount = cs.count
for i = 1 to csamount do
(
newobject = instance selection[i]
newobject.name = "tempinstance"[i]
newobject.pos.x = $el_dome.pos.x
newobject.pos.y = $el_dome.pos.y
)
)
thanks in advance for you help