ScriptSpot home

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)
Vojtech Cada

Or

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

miauu

.


(
	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
)
Reply to miauu
Mrjacks2o

Thanks!!

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