stuff like this usually happen because the message box pump messages, and therefore lets notifications through and xsi refreshes/updates some things it would not have otherwise. it probably lets timer events through too. On 2013-06-27 7:10 AM, "Oscar Juarez" <tridi.animei...@gmail.com> wrote:
> Hello list, > > This is a weird problem and the title doesn't fully describe what is > happening since there is quite a lot of things involved in what I'm doing > and I decided to post here since it's not really an Arnold thing but more > of Softimage, it's just that if you have Arnold installed it is very easy > to replicate. You just have to paste this, you must have Arnold and set it > up as default on Softimage preferences. Change the path to a file you > actually have. > > Application.NewScene("", "") > Application.OpenScene("C:\\Program Files\\Autodesk\\Softimage 2013 > SP1\\Data\\XSI_SAMPLES\\Scenes\\OLD\\club_bot.scn", 0, "") > > I replicated on 2012 SP1, 2013 SP1 and in other computer with 2013 SP1 too. > > So a little bit of background. > > Arnold has an onEndNewScene event which basically checks if you have > arnold as a default renderer and sets the scene to be ready to render with > arnold, changes a shader on the default light, creates the framebuffers, > etc. One of these things that changes is setting the render regions options > for every view to use the pass rendering options. This is from a factory > installation of Arnold. > > So for the actual problem, Tank has some routines for opening files that > basically first reset the state of softimage with a NewScene, and after > that opens the required scene turning off the confirmation dialog for > saving the previous scene if Softimage detected it was dirty. Since the > Arnold event is changing shaders and what not, a new scene will always be > dirty so avoids asking the user. > > If I change to ask for confirmation, it doesn't crash anymore, if I skip > the NewScene routine in tank, it doesn't crash, if I comment the block of > code in Arnold event that sets the region options for all the views to use > pass options it doesn't crash, that block of code is this one: > > SetValue( > > > "Views.ViewA.RenderRegion.UsePassOptions,Views.ViewB.RenderRegion.UsePassOptions,"+ > > > "Views.ViewC.RenderRegion.UsePassOptions,Views.ViewD.RenderRegion.UsePassOptions", > Array(true, true, true, true), null > ); > > I'm only assuming that it has to do to setting up values on parameters of > viewports that are not loaded yet, since while every of this is happening > the viewports are not really there. > > For now I can live with turning on confirmation on the tank routine but > it's a weird bug because apparently the scene is opened but the crash comes > from code that comes from an onEndNewScene Event. > > Does anybody had this before? > Thanks in advance. > > Oscar > > > >