PDA

View Full Version : Storing user settings between calls/invocations but not sessions



evenflcw
10-11-2007, 06:53 PM
I'm using store() and recall() to remember user settings between calls. However this stores the values permanently. So next time Lightwave starts it uses the values from the last session. I don't want this. It is not how these things usually work. After a clean restart values should be set to default.

So, I would like to store values only as long as a LW session lasts. How to do that? Is it at all possible? Is there maybe a value I can read that will regularly be unique for every LW session, but doesn't change between calls, that I could check to determine if the session is new?

faulknermano
10-12-2007, 05:15 AM
well, you can use a master class (or other "callback" types). if you declare your variables global they will persist until it the plugin is removed.

evenflcw
10-12-2007, 01:10 PM
Hmm, thats true. I suppose I could hide it aswell, and make it into more of a general purpose service, my own globalstore, sorta. Abit of a hack, but we're all used to that by now I guess. Thanks.