Alternatively, you could write your data to a dictionary saved out to a json file to that same path, and there wouldn't be errors ever.
On Wed, Jun 27, 2012 at 7:21 PM, Bradley Gabe <witha...@gmail.com> wrote: > Thanks Simon. > > Just an additional note, these preference PPG's are saved out in your user > install location: > > ~/Autodesk/Softimage_2012.SAP/Data/Preferences > > If any of these stored PPG's were created using registered plugins that > are removed in the future, XSI will log warnings complaining about missing > Property definitions. > > You can stop the warning messages by clearing out the files in that > directory. > > -B > > > On Wed, Jun 27, 2012 at 6:30 PM, Simon Anderson < > simonbenandersonl...@gmail.com> wrote: > >> Thats pretty handy piee of code, especially for persisting data >> >> Thanks >> >> >> On Thu, Jun 28, 2012 at 2:40 AM, Bradley Gabe <witha...@gmail.com> wrote: >> >>> Don't forget, you can also create a custom PPG and install it into the >>> user preferences. Once there, Softimage saves all the values out to disk >>> each time you quit a session, so it will persist. >>> >>> I use this technique for all of my custom tools so as to prevent a >>> buildup of PPG chaff under the SceneRoot (which has sadly become all too >>> common). >>> >>> Here's a snippet of Python that demonstrates: >>> >>> >>> findColl = win32com.client.Dispatch( "XSI.Collection" ) >>> findColl.items = 'preferences.MyStoredPPG' >>> if findColl.count: >>> oPPG = findColl(0) >>> else: >>> oPPG = CreateCustomPPGFunction() >>> Application.InstallCustomPreferences(oPPG, 'MyStoredPPG') >>> findColl.items = 'preferences.MyStoredPPG' >>> oPPG = findColl(0) >>> >>> Application.InspectObj(oPPG, '', 'MyStoredPPG', c.siLock, 0) >>> >> >> >> >> -- >> ------------------- >> Simon Ben Anderson >> blog: http://vinyldevelopment.wordpress.com/ >> >> >