' NewEvent Plug-in ' Initial code generated by Softimage SDK Wizard ' Executed Sat Nov 5 12:15:23 UTC+0900 2011 by Martin ' ' Tip: To add a command to this plug-in, right-click in the ' script editor and choose Tools > Add Command. ' ' Tip: To get help on a callback, highlight the callback name ' (for example, "Init", "Define", or "Execute") and press F1. function XSILoadPlugin( in_reg ) in_reg.Author = "myara" in_reg.Name = "NewEvent Plug-in" in_reg.Major = 1 in_reg.Minor = 0 in_reg.RegisterEvent "siOnEndNewSceneEvent",siOnEndNewScene in_reg.RegisterEvent "siOnStartupEvent",siOnStartup 'RegistrationInsertionPoint - do not remove this line XSILoadPlugin = true end function function XSIUnloadPlugin( in_reg ) dim strPluginName strPluginName = in_reg.Name Application.LogMessage strPluginName & " has been unloaded.",siVerbose XSIUnloadPlugin = true end function ' Callback for the siOnEndNewSceneEvent event. function siOnEndNewSceneEvent_OnEvent( in_ctxt ) Application.LogMessage "siOnEndNewSceneEvent_OnEvent called",siVerbose ' TODO: Put your code here. '--------------------------------------------------------------------- set vw = Desktop.ActiveLayout.Views.Find ("View Manager") vw.setattributevalue "suspenddrawing","true" vw.setattributevalue "activecamera:b","User" SetValue "Views.ViewB.*.camvis.sceneinfo", 1 SetValue "Views.ViewB.*.camvis.selectioninfo", 1 SetDisplayMode "Views.ViewB.UserCamera", "shaded" 'SetValue "Views.*.*.camvis.sceneinfo", 1 'SetValue "Views.*.*.camvis.selectioninfo", 1 SetValue "Views.ViewA.*.camvis.constructionlevel", false SetValue "Views.ViewC.*.camvis.constructionlevel", false SetValue "Views.ViewD.*.camvis.constructionlevel", false vw.setattributevalue"suspenddrawing","false" '--------------------------------------------------------------------- ' Return value is ignored as this event can not be aborted. siOnEndNewSceneEvent_OnEvent = true end function ' Callback for the siOnStartupEvent event. function siOnStartupEvent_OnEvent( in_ctxt ) Application.LogMessage "siOnStartupEvent_OnEvent called",siVerbose ' TODO: Put your code here. call siOnEndNewSceneEvent_OnEvent( in_ctxt ) ' Return value is ignored as this event can not be aborted. siOnStartupEvent_OnEvent = true end function