vcViewAnimation
vcViewAnimation is a layout item used for animating camera movements during a simulation.
Inherits: vcLayoutItem
How It Works
vcViewAnimation executes a program of camera movements. The structure of the program is similar to a robot program, containing routines with each routine containing a scope of statements.
By default, the Main routine of the program is executed at the start of simulation. A simple program would contain View and Delay statements.
A View statement specifies a 3D world view and transition. The 3D world view refers to a view available in the scene by name. If the view does not exist, the statement will still execute its transition as a delay. The transition defines how long it takes the 3D world camera to reach a view. For example, a transition of 0 seconds would snap the 3D world camera to a view.
Generally, a Delay statement is used to keep the 3D world camera stationary until the camera transitions to the next view.
Properties
Name | Type | Access | Description |
Program | vcProgram | R | Gets the program of animator. |
Methods
Name | Return Type | Parameters | Description |
getProgram | vcProgram | None | Returns the program of animator. |
Examples
Example. Create program for animating 3D world camera
from vcScript import * def createViewAnimation(): app = getApplication() #get the view animator item = app.findLayoutItem("ViewAnimation") if not item: item = app.createLayoutItem("ViewAnimation") #get the program executed by animator and clear its Main routine prog = item.Program routine = prog.MainRoutine routine.clear() #add view statements #the view must exist in layout #otherwise you will need to create it using either View Editor in GUI or API #get vcApplication.Views to handle a list of user views vs = routine.addStatement(VC_STATEMENT_VIEW) vs.Delay = 4.0 vs.View = "View1" #add delay to wait until next camera movement vs = routine.addStatement(VC_STATEMENT_DELAY) vs.Delay = 4.0 vs = routine.addStatement(VC_STATEMENT_VIEW) vs.Delay = 4.0 vs.View = "View2" createViewAnimation() |