Self installing Prop survive New Scene
Hello, Was wondering if there is a way to have a self installing property survive a New Scene call. Typically I attach it to the Scene Root but that won't survive a New Scene call. I have a UI that I would like to save the state of over a new scene call. Anyone have a trick for this? Eric T.
Re: Self installing Prop survive New Scene
I never got it to work, but you can try this. http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_cmds/SetGlobal.html On 23-Mar-15 11:07, Eric Thivierge wrote: Hello, Was wondering if there is a way to have a self installing property survive a New Scene call. Typically I attach it to the Scene Root but that won't survive a New Scene call. I have a UI that I would like to save the state of over a new scene call. Anyone have a trick for this? Eric T.
Re: Self installing Prop survive New Scene
Add the creation of the property to a NewScene event, maybe? Greetz Leendert -- Leendert A. Hartog AKA Hirazi Blue Administrator NOT the owner of si-community.com
Re: Self installing Prop survive New Scene
If I do this, I lose the selected values in the property. :\ On 3/23/2015 12:04 PM, Leendert A. Hartog wrote: Add the creation of the property to a NewScene event, maybe? Greetz Leendert
Re: Self installing Prop survive New Scene
Not exactly what I was looking for. I want to attach my Property to something in the application so the UI stays open and valid when creating a new scene. Not just values. Thanks though, Eric T. On 3/23/2015 11:59 AM, Francois Lord wrote: I never got it to work, but you can try this. http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_cmds/SetGlobal.html On 23-Mar-15 11:07, Eric Thivierge wrote: Hello, Was wondering if there is a way to have a self installing property survive a New Scene call. Typically I attach it to the Scene Root but that won't survive a New Scene call. I have a UI that I would like to save the state of over a new scene call. Anyone have a trick for this? Eric T.
Re: Self installing Prop survive New Scene
Hey Eric, here's what I would try: (brainstorming alert - I've never done this myself this way... :) ) Inside your custom property implementation I'd implement an onChanged() callback that collects all relevant parameter values, serializes them into a json string and stores this string outside your scene (either store it in a custom preference, or just dump it to a text file in the user folder) Then I'd implement events that ensure that your CustomProperty is always present on the ActiveSceneRoot (onStartup, onEndSceneOpen, onEndNewScene, ...) After ensuring the presence of your CustomProperty instance these events would load back your json string and update the Property accordingly. Cheers, Martin -- Martin Chatterjee [ Freelance Technical Director ] [ http://www.chatterjee.de ] [ https://vimeo.com/chatterjee ] On Mon, Mar 23, 2015 at 4:07 PM, Eric Thivierge ethivie...@hybride.com wrote: Hello, Was wondering if there is a way to have a self installing property survive a New Scene call. Typically I attach it to the Scene Root but that won't survive a New Scene call. I have a UI that I would like to save the state of over a new scene call. Anyone have a trick for this? Eric T.
Re: Self installing Prop survive New Scene
A custom user preference page are the only solution. Everything else will get flushed. On Mon, Mar 23, 2015 at 12:05 PM, Eric Thivierge ethivie...@hybride.com wrote: Not exactly what I was looking for. I want to attach my Property to something in the application so the UI stays open and valid when creating a new scene. Not just values. Thanks though, Eric T. On 3/23/2015 11:59 AM, Francois Lord wrote: I never got it to work, but you can try this. http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_cmds/SetGlobal.html On 23-Mar-15 11:07, Eric Thivierge wrote: Hello, Was wondering if there is a way to have a self installing property survive a New Scene call. Typically I attach it to the Scene Root but that won't survive a New Scene call. I have a UI that I would like to save the state of over a new scene call. Anyone have a trick for this? Eric T.
Re: Self installing Prop survive New Scene
SetGlobals is definitely a good solution. I have worked with this successfully before. But it only to retrieve and set single boolean value. In your case I would rather have json save out running on each scene close event and retrieve on scene open event. Sent from my iPhone On 23-Mar-2015, at 9:29 pm, Francois Lord flordli...@gmail.com wrote: I never got it to work, but you can try this. http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_cmds/SetGlobal.html On 23-Mar-15 11:07, Eric Thivierge wrote: Hello, Was wondering if there is a way to have a self installing property survive a New Scene call. Typically I attach it to the Scene Root but that won't survive a New Scene call. I have a UI that I would like to save the state of over a new scene call. Anyone have a trick for this? Eric T.
Re: Self installing Prop survive New Scene
If you implement your UI in Netview, it will survive a new scene call. Other options include using custom preferences, or dumping your UI state to storage such as a file on the hard drive or as data in memory where a onBeginNewScene event can access the data. Another option is plugin userdata. When your new scene event fires, store the parameter values of the custom property in the custom property's plugin userdata. After the scene is wiped clean as a new one, instruct your new scene event to install the custom property at the scene root using the plugin userdata as the parameter values. This will work in the general case because plugin userdata only lasts as long as the session. If the same code is run on a new session, your UI will remain virgin as it should. Matt Date: Mon, 23 Mar 2015 11:07:14 -0400 From: Eric Thivierge ethivie...@hybride.com Subject: Self installing Prop survive New Scene To: softimage@listproc.autodesk.com Hello, Was wondering if there is a way to have a self installing property survive a New Scene call. Typically I attach it to the Scene Root but that won't survive a New Scene call. I have a UI that I would like to save the state of over a new scene call. Anyone have a trick for this? Eric T.
Re: Self installing Prop survive New Scene
Luc-Eric is right on the money with this one. We have several of these in our pipeline to have data persist even between closing and opening a session On Mon, Mar 23, 2015 at 11:11 AM, Luc-Eric Rousseau luceri...@gmail.com wrote: A custom user preference page are the only solution. Everything else will get flushed. On Mon, Mar 23, 2015 at 12:05 PM, Eric Thivierge ethivie...@hybride.com wrote: Not exactly what I was looking for. I want to attach my Property to something in the application so the UI stays open and valid when creating a new scene. Not just values. Thanks though, Eric T. On 3/23/2015 11:59 AM, Francois Lord wrote: I never got it to work, but you can try this. http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/si_cmds/SetGlobal.html On 23-Mar-15 11:07, Eric Thivierge wrote: Hello, Was wondering if there is a way to have a self installing property survive a New Scene call. Typically I attach it to the Scene Root but that won't survive a New Scene call. I have a UI that I would like to save the state of over a new scene call. Anyone have a trick for this? Eric T. -- -=T=-
Re: Self installing Prop survive New Scene
Saving a preset of the property in a siOnCloseScene event and reloading in a NewScene event? Can't test this ATM, not near Softimage. But it's inelegant even if it works... I'll shut up now... ;) Greetz Leendert -- Leendert A. Hartog AKA Hirazi Blue Administrator NOT the owner of si-community.com
Re: Self installing Prop survive New Scene
Yeah not something I really want to do for saving the state and I can just deal with it for now. Guess this is why doing a QT Window UI that is attached to the application would be best. Thanks, Eric T. On Monday, March 23, 2015 12:59:40 PM, Leendert A. Hartog wrote: Saving a preset of the property in a siOnCloseScene event and reloading in a NewScene event? Can't test this ATM, not near Softimage. But it's inelegant even if it works... I'll shut up now... ;) Greetz Leendert