Package Things :: Module ThingObjects :: Class SceneThing
[frames] | no frames]

Class SceneThing

       object --+        
                |        
timeline.Timeline --+    
                    |    
                Thing --+
                        |
                       SceneThing

A SceneThing is a simple collection for other Things. It starts on a blank frame with a stop, so it's invisible and nothing is happening. In order to start it, call the play() method.

You can make many SceneThings and add them to your AllThings instance (in my examples and demos it's called 'app'). They get recorded in sequence and you can get one to start the next by calling the Allthings.playNextScene() method.

See also AllThings.startScene().

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
add(self, *args, **kwargs)
Override of Timeline.add to cater for adding things to a SceneThing.
 
play(self)
Tell this Thing to start playing again.

Inherited from Thing: __len__, changeLayer, changeProps, funcs, getProps, goPlay, goStop, jumps, keys, labels, loop, nextFrame, showData, stop, stops, toTop

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables

Inherited from Thing: currentFrame, frame, globalProps, lifespan

Inherited from timeline.Timeline: parentThing

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • id - A string to identify this Thing. It's mainly for debug purposes, but handy within your own code too.
Overrides: object.__init__
(inherited documentation)

add(self, *args, **kwargs)

 

Override of Timeline.add to cater for adding things to a SceneThing.

See Timeline.add

Note

This adds Things to a SceneThing: for this operation you only use the thing argument to add.

Note2

You can add more than one Thing to a Scene (in many separate add calls), but be sure to control when stuff plays or they will all play at once.

Parameters:
  • thing - The Thing you want to add.
  • layer - Layering of this thing (z-order.) 0 is the bottom. The default is to draw everything overlapping on layer zero. If you want to use thing.changeLayer() then make sure you give things layers that are > 0.
  • parentFrame - What frame number (in self) you want the thing being added to begin playing from. This is the same as padding the thing being added with blanks "....#" implies it starts from frame 5. So you could have "#" and set parentFrame = 5 instead.
  • globalProps - This is a Props() object. If you skip it, an ordinary Props() object is employed (position 0, alpha 1 etc.) If you want to control the placement/rotation of the Thing you are adding, then use this param.
Overrides: timeline.Timeline.add

play(self)

 

Tell this Thing to start playing again. However it was stopped, this will cause it to start again.

Use

thing.play()

Overrides: Thing.play
(inherited documentation)