Script
Public Slots | List of all members
frame Class Reference

With the Frame functions, you can retrieve values from frames and you can add and remove frames in your scene. More...

#include <frameinterface.h>

Inheritance diagram for frame:
Inheritance graph
[legend]
Collaboration diagram for frame:
Collaboration graph
[legend]

Public Slots

int numberOf ()
 returns the number of frames in the scene
 
int current ()
 returns the number of the current frame.
 
bool insert (int atFrame, int nbFrames)
 insert: inserts frames at the selected frame number atFrame = 0 -> insert before first frame. atFrame = n -> insert after frame n. atFrame = Application.frame.numberOf() -> insert at end.
 
bool remove (int atFrame, int nbFrames)
 remove: deletes frames starting from the selected frame number. atFrame = 0 -> delete at the beginning atFrame = n -> delete frames following the nth frame atFrame = Application.frame.nbFrames() -> won't delete anything
 
void setCurrent (int frame)
 allows you to change the current frame
 

Detailed Description

With the Frame functions, you can retrieve values from frames and you can add and remove frames in your scene.

You can use it in Script Editor only.

function sceneOpened()
{
// this part of the function launches the newScene function if
// the scene has only one frame
if (frame.numberOf() == 1)
newScene();
}
function newScene()
{
// this function opens a dialog box named Create New Scene, which
// allows users to enter the number of frames to add to the scene
var d = new Dialog;
d.title = "Create New Scene";
var nbFrames = new SpinBox;
nbFrames.label = "Number of Frames";
nbFrames.minimum = 1;
nbFrames.maximum = 300;
nbFrames.value = 60;
d.add(nbFrames);
if (d.exec())
{
var oldNbFrames = frame.numberOf();
frame.insert(0, nbFrames.value - oldNbFrames);
}
}

Member Function Documentation

int frame::current ( )
slot

returns the number of the current frame.

bool frame::insert ( int  atFrame,
int  nbFrames 
)
slot

insert: inserts frames at the selected frame number atFrame = 0 -> insert before first frame. atFrame = n -> insert after frame n. atFrame = Application.frame.numberOf() -> insert at end.

Parameters
atFrameframe number at which the frames will be inserted. Frames are inserted after the frame indicated. Use 0 to insert frames before the first frame.
nbFramesnumber of frames to insert
int frame::numberOf ( )
slot

returns the number of frames in the scene

bool frame::remove ( int  atFrame,
int  nbFrames 
)
slot

remove: deletes frames starting from the selected frame number. atFrame = 0 -> delete at the beginning atFrame = n -> delete frames following the nth frame atFrame = Application.frame.nbFrames() -> won't delete anything

Parameters
atFrameframe number at which the frames will be removed. Frames are removed after the frame indicated. Use 0 to remove frames before the first frame.
nbFramesnumber of frames to remove
void frame::setCurrent ( int  frame)
slot

allows you to change the current frame

Parameters
atFramenew current frame

The documentation for this class was generated from the following file: