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 |
Returns if marker exists at this frame.
- Parameters
-
◆ insert
bool frame::insert |
( |
int |
atFrame, |
|
|
int |
nbFrames |
|
) |
| |
|
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 |
◆ 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 |
|
) |
| |
|
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 |
- Returns
- True if the number of frames give is valid.
◆ setCurrent
void frame::setCurrent |
( |
int |
frame | ) |
|
|
slot |
Allows you to change the current frame.
- Parameters
-
frame | The new current frame |
◆ timelineMarkerLength
int frame::timelineMarkerLength |
( |
int |
frame | ) |
|
|
slot |
Returns markers length.
- Parameters
-
◆ timelineMarkerNote
String frame::timelineMarkerNote |
( |
int |
frame | ) |
|
|
slot |
Returns markers text.
- Parameters
-
◆ timelineMarkerStart
int frame::timelineMarkerStart |
( |
int |
frame | ) |
|
|
slot |
Returns markers start frame.
- Parameters
-