ScriptSpot

Forum topic · General Scripting

Adding multiple objects.....

By Mrjacks2o · 2015-11-04

Description

Hi Everyone
how can i add 4 different objects instead of 1? for example the bottom script is only "L1"
but i want to add "L1" "L2" "L3" "L4"

someArray = for o in selection where o.name == "L1" collect o
if someArray.count > 0 then rendTimeType = 3
else rendTimeType = 4 rendpickupframes = "1,2"

thanks

Comments (3)

Swordslayer · 2015-11-05

Or

someArray = #() + $selection...L1 + $selection...L2 + $selection...L3 + $selection...L4

.

miauu · 2015-11-04


(
	namesArr = #("L1","L2","L3","L4")
	someArray = #()
	for n in namesArr do
	(
		for o in selection where o.name == n do append someArray o	
	)
	format "someArray: % \n" someArray
)

Thanks!!

Mrjacks2o · 2015-11-04

Thanks for the Quick reply and help Miauu!!!!