Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
default camera settings

default camera settings

2004-03-10       - By Jason Brynford-Jones

 Back
Reply:     1     2  

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>&nbsp;</DIV>
<DIV><SPAN class=157062718-10032004><FONT face=Arial color=#0000ff
size=2>Example.&nbsp; Make a script of what you want to do:&nbsp; IE Boundary
flags and ambience (Use this as a template for others)</FONT></SPAN></DIV>
<DIV>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>&nbsp;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>&nbsp;SetValue "Views.*.*.camvis.attrselboundaryflags",
True<BR>&nbsp;SetValue oRoot &amp; ".AmbientLighting.ambience.red",
0<BR>&nbsp;SetValue oRoot &amp; ".AmbientLighting.ambience.green",
0<BR>&nbsp;SetValue oRoot &amp; ".AmbientLighting.ambience.blue", 0</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>&nbsp;filename =
"C:\Event.vbs"<BR>&nbsp;language = "VBScript"<BR>&nbsp;Application.Advise
"OnEndNewScene",filename,,language,"MyEvent",,,TRUE</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>To see the event.&nbsp; Go to
File&gt;Addon&gt;Events</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><BR><FONT face=Arial color=#0000ff size=2>Chinny</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=157062718-10032004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</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&nbsp;</FONT></DIV>
 <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
 <DIV><FONT face=Arial size=2>&nbsp;is it possible to&nbsp;alter the default
 camera on start up&nbsp;&nbsp;to certain settings changed or turned on
 ,&nbsp;like have the&nbsp; field guides turned on&nbsp;etc ? and if so which
 file do i have to alter&nbsp; &nbsp;</FONT></DIV>
 <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
 <DIV><FONT face=Arial size=2>regards rob</FONT></DIV></BLOCKQUOTE></BODY><
/HTML>