Skip to main content

Scene()

Constructors​

Scene()​

The default constructor of a Scene object creates a basic scene object with an empty list of actors.

Scene(name: str, actors: List[Actor])​

The parameterized constructor requires a name and a list of actors to create a Scene object.

scene = pygerm.Scene(name="scene1", actors=[Actor(), Actor()])

Scene(kwargs)​

You can also initialize a Scene object with kwargs. This is useful for setting a couple of values at once or making your code more verbose.

scene = pygerm.Scene(name="scene1", actors=[Actor(), Actor()])

Read Write Properties​

Additionally, if you choose to modify some of the configuration values after the constructor as been called (but before run() is called), you can do so by setting the following properties:

name The name of the scene.
actors The list of actors in the scene.

scene = pygerm.Scene()
scene.name = "scene1"
scene.actors = [Actor(), Actor()]