"View B" default camera

General questions and troubleshooting SOFTIMAGE©
keeper
Posts: 19
Joined: 07 Jul 2013, 09:39

"View B" default camera

Post by keeper » 15 Jul 2013, 10:10

How to setup default view of "View B" to something else than "Camera"? For example User view.

User avatar
rray
Moderator
Posts: 1810
Joined: 26 Sep 2009, 13:51
Location: Bonn, Germany

Re: "View B" default camera

Post by rray » 15 Jul 2013, 13:05

For the shelf shortcuts you can right click the shelf button and add
vw.setattributevalue "activecamera:b", "User"
to the script commands
For the initial view I don't know, you'll probably need to create a custom layout with a different cam set it the view properties.
softimage resources section updated Sep 26th 2026

keeper
Posts: 19
Joined: 07 Jul 2013, 09:39

Re: "View B" default camera

Post by keeper » 18 Jul 2013, 10:26

Found a solution. A simple custom "Startup" event plugin with code:

// Callback for the Startup event.
function Startup_OnEvent( in_ctxt )
{
Application.LogMessage("Startup_OnEvent called",siVerbose);

// TODO: Put your code here.
var views = desktop.ActiveLayout.Views.Find("View Manager");
views.SetAttributeValue( "activecamera:b", "User");

// Return value is ignored as this event can not be aborted.
return true;
}

User avatar
AceMastermind
Posts: 161
Joined: 14 Jun 2009, 22:57

Re: "View B" default camera

Post by AceMastermind » 18 Jul 2013, 14:20

You'll probably want to add another event for when you start a new scene too, I use what you have plus this(in vbs though) so that view 'B' defaults to 'User' at all times after launching the application.

Code: Select all

' Callback for the siOnEndNewSceneEvent event.
function siOnEndNewSceneEvent_OnEvent( ctxt )
	Application.LogMessage "siOnEndNewSceneEvent_OnEvent called",siVerbose

' 	TODO: Put your code here.
set vw = Desktop.ActiveLayout.Views.Find( "View Manager" )
vw.setattributevalue "activecamera:b","user"

' 	This event can be aborted by returning true or false if you don't want to abort.
	siOnEndNewSceneEvent_OnEvent = false
end function

keeper
Posts: 19
Joined: 07 Jul 2013, 09:39

Re: "View B" default camera

Post by keeper » 18 Jul 2013, 15:04

Thanks, I missed that.