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?
 
Get the current camera in a view with v4

Get the current camera in a view with v4

2004-07-01       - By OO's mailbot

 Back
Reply:     1     2     3  

Great, thanks.

Camera switching is done by using the
SetAttributeValue("activecamera:b", "Camera Name")
but there is a little excentricity that the other cameras
(user,top,right,...) return their names
as "&Top" but you need to use "Top" to set the viewport to use that
camera.

  // get the view manager
  var oLayout = Desktop.ActiveLayout;
  var oViewManager = oLayout.Views("vm");

  //Set the active camera to user
  oViewManager.SetAttributeValue( "activecamera:b", "User" );

  //This will now print: "&User" as the camera name
  var cameraName = oViewManager.GetAttributeValue( "activecamera:b" );
  LogMessage( "B View Camera: " + cameraName );

OO


On Jul 2, 2004, at 6:53 AM, Alain Laferri�re wrote:

>
> Hi Olivier,
>
> I use this method in Xgs_Slate to get the current camera name in a
> view :
>
>   // get the view manager
>   var oLayout = Desktop.ActiveLayout;
>   var oViewManager = oLayout.Views("vm");
>
>   var cameraName = oViewManager.GetAttributeValue( "activecamera:b" );
>   LogMessage( "B View Camera: " + cameraName );
>
> Xgs display callbacks have access to a "XSI_ViewData" structure, which
> contains the name of the view for which the display callback is being
> evaluated - this allows to get the active camera name for the current
> view.
>
> If you need the camera object, you can find it by name under the
> active scene root.
>
> I hope this helps,
> Alain
>
> -- --Original Message-- --
> From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On
> Behalf Of OO's mailbot
> Sent: Thursday, July 01, 2004 10:28 PM
> To: XSI@(protected)
> Subject: Get the current camera in a view with v4
>
> Did anyon figure out how to get/set the active camera of the views in
> the vie manager? I know how to get to the views using the new OM
> objects, but I don't know if there is an attribute on the views that
> allows the camera to be set or get.
>
> //Get the View A from the View Manager
> var oLayout = Desktop.ActiveLayout;
> var oViewManager = oLayout.Views("vm");
> var oViewB = oViewManager.Views("B");
>
> LogMessage(oViewB.Name +" is a "+ oViewB.Type);
>
> //This is no it:
> var currCam = oViewB.GetAttributeValue("Camera");
>
> How do I get/set the current camera of that view? Seems a shame to be
> so close and yet so far...
>
> ---
> Olivier Ozoux's mailing list robot
> mailbot@(protected)
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following text in
> body:
> unsubscribe xsi
>
>
> ---
> Unsubscribe? Mail Majordomo@(protected) with the following text in
> body:
> unsubscribe xsi


---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi