To create and modify movie templates programmatically, you need to interact with the object model. This section shows different ways to create and manage objects that make up dynamic movie templates.
Each object type is exposed as a class in the object hierarchy. For example a movie is represented by the Movie
class. To create a new movie you instantiate an instance of that class.
Javascript
var sdl = new FX.SDL(); var movie = new sdl.Movie();Python
from impossiblefx import sdl movie = sdl.Movie()Java
import io.impossible.fx.sdl.Movie; movie = new Movie();PHP
$movie = new SDL\Movie();
The properties of an object can be set when it is created or they can be modified afterwards.
Javascript
// set params during creation var movie = new sdl.Movie({ params: { vparams: { width: 640, height: 360 } } }); // set params after creation movie = new sdl.Movie(); movie.params.vparams.width = 640; movie.params.vparams.height = 360;Python
# set params during creation movie = Movie(params=StreamParams(vparams=VideoParams(width=640, height=360))) # set params after creation movie = sdl.Movie() movie.params.vparams.width = 640 movie.params.vparams.height = 360Java
// Java SDK does not support setting parameters in the constructor movie = new Movie(); movie.params.vparams.width = 640 movie.params.vparams.height = 360
Objects like Scenes
and Tracks
are collections, i.e they are containers that hold many objects of that type. For example, a Movie
has a scenes
collection that make up all scenes in that movie.
Javascript
var scene = new sdl.Scene(); movie.scenes.push(scene)Python
scene = sdl.Scene() movie.scenes.extend([scene])Java
scene = new Scene(); movie.addScene(scene);PHP
$scene = new SDL\Scene(); $movie->addScene($scene);
Terms of Use | © 2017, Impossible Software, or its affiliates.