The frame JavaScript global object. Get the current frame or number of frames. Add or remove frames in your scene. Manipulate the timeline marker.
More...
The frame JavaScript global object. Get the current frame or number of frames. Add or remove frames in your scene. Manipulate the timeline marker.
The frame global object can only be used in the Script Editor or the Master Controller node.
function sceneOpened()
{
newScene();
}
function newScene()
{
d.
title =
"Create New Scene";
nbFrames.label = "Number of Frames";
nbFrames.maximum = 300;
nbFrames.value = 60;
d.add(nbFrames);
if (d.exec())
{
}
}
◆ current
Returns the number of the current frame.
- Returns
- The current frame, the first frame is 1.
◆ hasTimelineMarker
bool frame::hasTimelineMarker |
( |
int |
frame | ) |
|
|
slot |
◆ insert
bool frame::insert |
( |
int |
atFrame, |
|
|
int |
nbFrames, |
|
|
QScriptValue |
options = QScriptValue() |
|
) |
| |
|
slot |
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
-
atFrame | The frame number at which the frames will be inserted. Frames are inserted after the frame indicated. Use 0 to insert frames before the first frame. |
nbFrames | The number of frames to insert |
options | This optional parameter should be an object with the desired behaviours for when the frames are inserted var options = { ripple_markers : true, extend_exposure : true };
Option | Default Value | Effect |
ripple_markers | false | Move the scene markers down the scene when inserting frames. |
extend_exposure | false | Extend the exposure of existing drawings when inserting frames. |
|
- Returns
- True if the number of frames given is valid.
◆ numberOf
Returns the number of frames in the scene.
- Returns
- The number of frames in the scene.
◆ remove
bool frame::remove |
( |
int |
atFrame, |
|
|
int |
nbFrames, |
|
|
QScriptValue |
options = QScriptValue() |
|
) |
| |
|
slot |
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
-
atFrame | The frame number at which the frames will be removed. Frames are removed after the frame indicated. Use 0 to remove frames before the first frame. |
nbFrames | The number of frames to remove |
options | This optional parameter should be an object with the desired behaviours for when the frames are removed var options = { ripple_markers : true };
Option | Default Value | Effect |
ripple_markers | false | Trim and/or delete the scene markers when removing frames. |
|
- Returns
- True if the number of frames given is valid.
◆ setCurrent
void frame::setCurrent |
( |
int |
frame | ) |
|
|
slot |
Allows you to change the current frame.
- Parameters
-
frame | The new current frame |
◆ setNumberOf
void frame::setNumberOf |
( |
int |
nbFrames | ) |
|
|
slot |
Allows you to change the number of frames in the scene.
- Parameters
-
nbFrames | The number of frames in the scene |
◆ timelineMarkerLength
int frame::timelineMarkerLength |
( |
int |
frame | ) |
|
|
slot |
◆ timelineMarkerNote
String frame::timelineMarkerNote |
( |
int |
frame | ) |
|
|
slot |
◆ timelineMarkerStart
int frame::timelineMarkerStart |
( |
int |
frame | ) |
|
|
slot |