MatthiasBuehlmann
03-08-2012, 07:19 AM
How can I make a copy of the array "selection" to use later? my script changes the selection of objects, but i still want to maintain a list of what was originally selected. But as soon as i make a change to the selection, the copy of my list changes too. I made a simple script to illustrate this:
allObjs = deepCopy selection
for obj in allObjs do(
select obj
move obj [0,0,10]
)
I would expect this script to move all selected Objects upwards. If the line "select obj" is commented out, it does this. but with the line "select obj", only one object will be moved, as apparently as soon as "selection" changes, also my allObjs array changes (which is supposed to be a copy though)
how to properly create a duplicate array containing the current selection?
allObjs = deepCopy selection
for obj in allObjs do(
select obj
move obj [0,0,10]
)
I would expect this script to move all selected Objects upwards. If the line "select obj" is commented out, it does this. but with the line "select obj", only one object will be moved, as apparently as soon as "selection" changes, also my allObjs array changes (which is supposed to be a copy though)
how to properly create a duplicate array containing the current selection?
