  | | | default camera settings | default camera settings 2004-03-10 - By Jason Brynford-Jones
Back see my recent post using events: There are events in XSI which will call a script after you do newscene (or others) Example. Make a script of what you want to do: IE Boundary flags and ambience (Use this as a template for others)
sub XSIApplication_OnEndNewScene( CustomData ) 'script goes here - IE setting all camera to use field guides etc set oRoot = ActiveProject.ActiveScene.Root SetValue "*.*.camvis.gridfieldguidevis", True
SetValue "Views.*.*.camvis.attrselboundaryflags", True SetValue oRoot & ".AmbientLighting.ambience.red", 0 SetValue oRoot & ".AmbientLighting.ambience.green", 0 SetValue oRoot & ".AmbientLighting.ambience.blue", 0 'script end end sub 'Save all of this, beginning with sub... Save this script and call it whatever you want : EG C:\Event.vbs Now use another script to call this script and create the event 'put this in the script editor and run filename = "C:\Event.vbs" language = "VBScript" Application.Advise "OnEndNewScene",filename,,language,"MyEvent",,,TRUE 'MyEvent is just the name I chose for this event - you can change MyEvent to anything you want That's it! - The event has been logged and will be called when you do newscene. To see the event. Go to File>Addon>Events
Chinny PS to see more types of events - open the help pages and look up events OnBeginNewScene: just before flushing the current scene and starting a new one. OnEndNewScene: just after creating a new scene. OnBeginSceneOpen: just before flushing the current scene and opening a different one. OnEndSceneOpen: just after opening a scene. OnBeginSceneSave: just before saving a scene. OnEndSceneSave: just after saving a scene. OnBeginSceneSaveAs: just before saving a scene under a new name. OnEndSceneSaveAs: just after saving a scene under a new name. OnTerminateApp: when XSI is closed. OnSelectionChange: just after the selection is changed.
-- --Original Message-- -- From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of rob Sent: Wednesday, March 10, 2004 12:37 PM To: XSI@(protected) Subject: default camera settings hi list is it possible to alter the default camera on start up to certain settings changed or turned on , like have the field guides turned on etc ? and if so which file do i have to alter regards rob
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>Message</TITLE> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2600.0" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><SPAN class=157062718-10032004><FONT face=Arial color=#0000ff size=2><STRONG>see my recent post using events:</STRONG></FONT></SPAN></DIV> <DIV><SPAN class=157062718-10032004><FONT face=Arial color=#0000ff size=2>There are events in XSI which will call a script after you do newscene (or others)</FONT></SPAN></DIV> <DIV> </DIV> <DIV><SPAN class=157062718-10032004><FONT face=Arial color=#0000ff size=2>Example. Make a script of what you want to do: IE Boundary flags and ambience (Use this as a template for others)</FONT></SPAN></DIV> <DIV> </DIV><SPAN class=157062718-10032004> <DIV><BR><FONT face=Arial color=#0000ff size=2>sub XSIApplication_OnEndNewScene ( CustomData )</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2>'script goes here<SPAN class=157062718-10032004> - IE setting all camera to use field guides etc</SPAN></FONT></FONT></FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2> set oRoot = ActiveProject.ActiveScene.Root</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2><FONT size=2> <P><STRONG>SetValue "*.*.camvis.gridfieldguidevis", True</STRONG></P></FONT> SetValue "Views.*.*.camvis.attrselboundaryflags", True<BR> SetValue oRoot & ".AmbientLighting.ambience.red", 0<BR> SetValue oRoot & ".AmbientLighting.ambience.green", 0<BR> SetValue oRoot & ".AmbientLighting.ambience.blue", 0</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>'script end<BR>end sub</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>'Save all of this, beginning with sub...</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>Save this script and call it whatever you want : EG C:\Event.vbs</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>Now use another script to call this script and create the event</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>'put this in the script editor and run</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2> filename = "C:\Event.vbs"<BR> language = "VBScript"<BR> Application.Advise "OnEndNewScene",filename,,language,"MyEvent",,,TRUE</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>'MyEvent is just the name I chose for this event - you can change MyEvent to anything you want</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>That's it! - The event has been logged and will be called when you do newscene.</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>To see the event. Go to File>Addon>Events</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><BR><FONT face=Arial color=#0000ff size=2>Chinny</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>PS to see more types of events - open the help pages and look up events</FONT></DIV> <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV> <DIV><FONT face=Arial color=#0000ff size=2>OnBeginNewScene: just before flushing the current scene and starting a new one.<BR>OnEndNewScene: just after creating a new scene.<BR>OnBeginSceneOpen: just before flushing the current scene and opening a different one.<BR>OnEndSceneOpen: just after opening a scene.<BR>OnBeginSceneSave: just before saving a scene.<BR>OnEndSceneSave: just after saving a scene.<BR>OnBeginSceneSaveAs: just before saving a scene under a new name.<BR>OnEndSceneSaveAs: just after saving a scene under a new name.<BR>OnTerminateApp: when XSI is closed.<BR>OnSelectionChange: just after the selection is changed.</FONT></SPAN></DIV> <DIV><SPAN class=157062718-10032004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=157062718-10032004><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"> <DIV></DIV> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma size=2>-- --Original Message-- --<BR><B>From:</B> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <B>On Behalf Of </B>rob<BR><B>Sent:</B> Wednesday, March 10, 2004 12:37 PM<BR><B>To:</B> XSI@(protected)<BR><B>Subject:</B> default camera settings<BR><BR></FONT></DIV> <DIV><FONT face=Arial size=2>hi list </FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2> is it possible to alter the default camera on start up to certain settings changed or turned on , like have the field guides turned on etc ? and if so which file do i have to alter </FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>regards rob</FONT></DIV></BLOCKQUOTE></BODY>< /HTML>
|
|
|