I'm trying to update my TCPServer for Softimage addon so that it runs properly under Softimage 2013 and I'm running into a few troubles but let's start with the big one: How can I have data persistence within my Addon upon startup.
Basically the idea is that I will create an instance of a class when Softimage starts on siConstants.siOnStartup event. Then I would like to reuse it later during the session. Problem is that the module seems to be discarded and reloaded entirely and I lose my instance. I did a small example here: https://gist.github.com/KelSolaar/5370212
The idea being to store a Foo instance into the Runtime class.
Code: Select all
class Runtime(object):
instance = None
class Foo(object):
def __init__(self, bar):
self.bar = bar
Code: Select all
# VERBOSE : checkPersistence'Persistence_startupEvent_OnEvent' called!
# INFO : <__ax_main__.Foo object at 0x0000000019C08DD8>
# INFO : 432049624Code: Select all
# INFO : None
# INFO : 513988696Cheers!
PS: Oh and how one suscribe to Softimage Mailing List? Sending a suscribe email doesn't work and get bounced.
KS
