I've been trying to get my head around some max script where I have a loop and I want to create and populate some arrays within the loop. I already have an array which I can use to name. -- get all object namesAllobjects = for g in geometry collect g.name-- get base object namesfor a=1 to Allobjects.count do( s =…
Thanks that's pretty neat, it's better than what I did: NamesArrayCopy[p] = ("$" + NamesArray[p] + "*")TempArray = (execute NamesArrayCopy[p]) as array I'd read that using execute should be avoided unless really necessary but I don't know the reasons why. I'm guessing performance.
As far as I know, execute() would be the only way to dynamically generate (and subsequently access) variable names (I tend to abuse the hell out of it to generate my rollouts).
Cheers dude, that allowed me to access the objects quicker than the string filtering but I was after generating the array names dynamically. I'm not sure if that's possible so I managed to get around it by using a temporary array and filling that in a loop instead. It means I have to do a few more calculations each time it…