PDA

View Full Version : retaining a selection before and after a script runs


gmask
10-13-2008, 05:53 PM
I was working with a script that had a habit of changing the selection when it ran. I twas easy enough to store the selection and reselect the objects afterwards but this had a serious impact on the runtime speed.

I thought about storing the selection in a global var but I ran into issues with declaring the var only once when the file opens.

Also I want the selection to be stored when you hit play on the timeline and then reselects when play stops.

I have since had to move on to other things but I wanted to see if anybody had solved this before.

DOor
10-13-2008, 09:50 PM
I am not sure I fully understand where your issue is BUT I think you may benefit from using a set for your selection. I dont think it will make your performance any different (although a global var should not have impacted performance much either...) but I dont like global vars and instead prefer creating sets and then deleting them when they are no longer needed.

CGTalk Moderation
10-13-2008, 09:50 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.