Storyboard Pro
Scripting Interface Documentation
StoryboardManager Class Reference

This interface is used to access the main storyboard project. It can be used to query the sequences, scenes, panels and transitions of the project. As well, it can be used to create, delete or rename project objects. More...

Public Slots

Queries - Sequences
int numberOfSequencesInProject ()
 Returns the number of sequences in the project. More...
 
String sequenceInProject (int i)
 Returns the sequenceId of the ith sequence in project. More...
 
String sequenceIdOfScene (String &sceneId)
 Returns sequenceId of the sequence of the given scene. More...
 
Queries - Scenes
int numberOfScenesInSequence (String &sequenceId)
 returns the number of scenes in a sequence More...
 
String sceneInSequence (String &sequenceId, int i)
 Returns sceneId of the ith scene in sequence. More...
 
int numberOfScenesInProject ()
 returns the number of scenes in project More...
 
String sceneInProject (int i)
 Returns sceneId of the ith scene in project. More...
 
String sceneIdOfPanel (String &panelId)
 Returns sceneId of the panel. More...
 
Queries - Panels
int numberOfPanelsInScene (String &sceneId)
 Returns the number of panels in a scene. More...
 
String panelInScene (String &sceneId, int index)
 Returns the panelId of the ith panel in the scene. More...
 
int numberOfPanelsInProject ()
 returns the number of panels in project More...
 
String panelInProject (int i)
 Returns panelId of the ith panel in project. More...
 
Queries - General
String nameOfSequence (String &sequenceId)
 Returns the name of the sequence. More...
 
String nameOfScene (String &sceneId)
 Returns the name of the scene. More...
 
String nameOfPanel (String &panelId)
 Returns the name of the panel. More...
 
String sequenceId (String &sequenceName)
 Returns the unique id of the sequence. More...
 
String sceneId (String &sequenceName, String &sceneName)
 Returns the unique id of the scene. More...
 
String panelId (String &sequenceName, String &sceneName, String &panelName)
 Returns the unique id of the panel. More...
 
Commands to create/rename/delete
String createSequence (String &firstShotId, String &lastShotId)
 Creates a new sequence. More...
 
String insertScene (bool after, String &shotId, String &name)
 Inserts a new scene. More...
 
String appendScene (String &name)
 Append a scene at the end of the project. More...
 
String insertPanel (bool after, String &panelId, String &name)
 Inserts a new panel. More...
 
String appendPanel (String &name)
 Append a panel at the end of the project. More...
 
bool splitPanel (String &panelId, unsigned int atFrame)
 Split a panel into 2 panels. More...
 
bool deleteSequence (String &seqId)
 Deletes a sequence. More...
 
bool deleteScene (String &sceneId)
 Deletes a scene. More...
 
bool deletePanel (String &panelId)
 Deletes a panel. More...
 
bool renameSequence (String &seqId, String &newName)
 Renames a sequence. More...
 
bool renameScene (String &sceneId, String &newName)
 Renames a scene. More...
 
bool renamePanel (String &panelId, String &newName)
 Renames a panel. More...
 
int getPanelDuration (String &panelId)
 gets the panel Duration More...
 
bool setPanelDuration (String &panelId, int frames)
 sets the panel duration More...
 
void setPanelColor (String &panelId, QScriptValue &color)
 
String getPanelColor (String &panelId)
 
int sceneStartFrame (String &shotId)
 returns the start frame of a scene More...
 
int sceneEndFrame (String &shotId)
 returns the last frame of a scene More...
 
Transition Queries

For the sake of clarity, the trx is always associated with the shot to it's right.

StringList scenesWithTrx ()
 returns a list of the sceneIds of scenes that have leading transitions More...
 
String sceneIdOfTrx (String &trxId)
 returns the sceneId of the shot to the right of the transition More...
 
String trxIdOfScene (String &shotId)
 returns the transition ID of the transition to the left of the shot More...
 
bool sceneHasTrx (String &shotId)
 returns whether a scene has a leading transition More...
 
String trxType (String &trxId)
 returns a string identifying the transition type More...
 
int trxLength (String &trxId)
 returns the length of the transition More...
 
Transition Commands to create/delete/modify
String createTrx (String &shotId, unsigned int length, String &stringType, int angle=90, bool reverse=false)
 Create a transition ( at the beginning of the target shot ), and return the unique ID of the transition. More...
 
bool modifyTrx (String &trxId, String &stringType, int angle=90, bool revers=false)
 modify the transition More...
 
bool resizeTrx (String &trxId, unsigned int length)
 resize a transition More...
 
bool deleteTrx (String &trxId)
 delete a transition More...
 

Detailed Description

This interface is used to access the main storyboard project. It can be used to query the sequences, scenes, panels and transitions of the project. As well, it can be used to create, delete or rename project objects.

Scenes, Panels and Transitions are identified by a unique id. For the sake of clarity, a transition is considered to belong to the shot to it's right. Or, the shot owns the transition to it's left.

The following examples are provided:

function projectQuery()
{
var storyboard = new StoryboardManager();
// Iterate through all sequences
var nbSeqs = storyboard.numberOfSequencesInProject();
for ( var i =0; i < nbSeqs; ++i )
{
var id = storyboard.sequenceInProject( i );
System.println( "Sequence is " + id + " : " + storyboard.nameOfSequence( id ) ) ;
var nbScenes = storyboard.numberOfScenesInSequence( id );
for ( var j = 0; j < nbScenes; ++ j )
{
var sceneId = storyboard.sceneInSequence( id, j );
System.println( " scene is " + sceneId + " : " + storyboard.nameOfScene( sceneId ) ) ;
}
}
// Alternatively, iterate through all scenes.
var nbShots = storyboard.numberOfScenesInProject();
for ( var i =0; i < nbShots; ++i )
{
var sceneId = storyboard.sceneInProject(i);
var seqId = storyboard.sequenceIdOfScene( sceneId );
System.println( "Scene is " + sceneId + ": " + storyboard.nameOfScene( sceneId ) + " sequence is " + storyboard.nameOfSequence( seqId)) ;
}
}
function transitionQuery()
{
var sb = new StoryboardManager();
var sceneList = sb.scenesWithTrx();
for ( var i = 0; i < sceneList.length; ++i )
{
var trxId = sb.trxIdOfScene( sceneList[i] );
System.println(sb.nameOfScene( sceneList[i] )
+ " has a transition of type "
+ sb.trxType( trxId )
+ " and of length "
+ sb.trxLength( trxId ));
}
}

Member Function Documentation

◆ appendPanel

String StoryboardManager::appendPanel ( String &  name)
slot

Append a panel at the end of the project.

Parameters
name- name of new scene

◆ appendScene

String StoryboardManager::appendScene ( String &  name)
slot

Append a scene at the end of the project.

Parameters
name- name of new scene

◆ createSequence

String StoryboardManager::createSequence ( String &  firstShotId,
String &  lastShotId 
)
slot

Creates a new sequence.

Parameters
firstShotId- sceneId of first targetShot
lastShotId- sceneId of last targetShot

◆ createTrx

String StoryboardManager::createTrx ( String &  shotId,
unsigned int  length,
String &  stringType,
int  angle = 90,
bool  reverse = false 
)
slot

Create a transition ( at the beginning of the target shot ), and return the unique ID of the transition.

Parameters
shotId- unique ID of the shot
length- length of transition, must be less than the length of the preceding panel
stringType- "wipe", "dissolve", "edge wipe", "clock wipe" or "slide"
angle- angle in degrees ( used for wipes )
reverse- bool to reverse the wipe direction.

◆ deletePanel

bool StoryboardManager::deletePanel ( String &  panelId)
slot

Deletes a panel.

Parameters
panelId- panelId of target panel

◆ deleteScene

bool StoryboardManager::deleteScene ( String &  sceneId)
slot

Deletes a scene.

Parameters
sceneId- sceneId of target scene

◆ deleteSequence

bool StoryboardManager::deleteSequence ( String &  seqId)
slot

Deletes a sequence.

Parameters
seqId- sceneId of sequence

◆ deleteTrx

bool StoryboardManager::deleteTrx ( String &  trxId)
slot

delete a transition

Parameters
trxId- unique ID of the transition

◆ getPanelColor

String StoryboardManager::getPanelColor ( String &  panelId)
slot

get the color of the panel.

Parameters
panelId- panelId of the target panel
Returns
String of the panel's color name.

◆ getPanelDuration

int StoryboardManager::getPanelDuration ( String &  panelId)
slot

gets the panel Duration

Parameters
panelId- panelId of target panel

◆ insertPanel

String StoryboardManager::insertPanel ( bool  after,
String &  panelId,
String &  name 
)
slot

Inserts a new panel.

Parameters
after- whether the panel should be created after the target panel
panelId- panelId of target panel
name- name of new scene

◆ insertScene

String StoryboardManager::insertScene ( bool  after,
String &  shotId,
String &  name 
)
slot

Inserts a new scene.

Parameters
after- whether the scene should be created after the target Shot
shotId- sceneId of targetShot
name- name of new scene

◆ modifyTrx

bool StoryboardManager::modifyTrx ( String &  trxId,
String &  stringType,
int  angle = 90,
bool  revers = false 
)
slot

modify the transition

Parameters
trxId- unique ID of the transition
stringType- "wipe", "dissolve", "edge wipe", "clock wipe" or "slide"
angle- angle in degrees ( used for wipes )
reverse- bool to reverse the wipe direction.

◆ nameOfPanel

String StoryboardManager::nameOfPanel ( String &  panelId)
slot

Returns the name of the panel.

Parameters
panelId- unique id of panel

◆ nameOfScene

String StoryboardManager::nameOfScene ( String &  sceneId)
slot

Returns the name of the scene.

Parameters
sceneId- unique id of scene

◆ nameOfSequence

String StoryboardManager::nameOfSequence ( String &  sequenceId)
slot

Returns the name of the sequence.

Parameters
sequenceId- unique id of sequence

◆ numberOfPanelsInProject

int StoryboardManager::numberOfPanelsInProject ( )
slot

returns the number of panels in project

◆ numberOfPanelsInScene

int StoryboardManager::numberOfPanelsInScene ( String &  sceneId)
slot

Returns the number of panels in a scene.

Parameters
sceneId- unique id of scene

◆ numberOfScenesInProject

int StoryboardManager::numberOfScenesInProject ( )
slot

returns the number of scenes in project

◆ numberOfScenesInSequence

int StoryboardManager::numberOfScenesInSequence ( String &  sequenceId)
slot

returns the number of scenes in a sequence

Parameters
sequenceId- unique id of sequence

◆ numberOfSequencesInProject

int StoryboardManager::numberOfSequencesInProject ( )
slot

Returns the number of sequences in the project.

◆ panelId

String StoryboardManager::panelId ( String &  sequenceName,
String &  sceneName,
String &  panelName 
)
slot

Returns the unique id of the panel.

Parameters
sequenceName- name of sequence
sceneName- name of scene
panelName- name of panel

◆ panelInProject

String StoryboardManager::panelInProject ( int  i)
slot

Returns panelId of the ith panel in project.

Parameters
i- index in project

◆ panelInScene

String StoryboardManager::panelInScene ( String &  sceneId,
int  index 
)
slot

Returns the panelId of the ith panel in the scene.

Parameters
sceneId- unique id of scene
index- index in scene

◆ renamePanel

bool StoryboardManager::renamePanel ( String &  panelId,
String &  newName 
)
slot

Renames a panel.

Parameters
panelId- panelId of target panel
newName- new name

◆ renameScene

bool StoryboardManager::renameScene ( String &  sceneId,
String &  newName 
)
slot

Renames a scene.

Parameters
sceneId- sceneId of target scene
newName- new name

◆ renameSequence

bool StoryboardManager::renameSequence ( String &  seqId,
String &  newName 
)
slot

Renames a sequence.

Parameters
seqId- sequenceId of target sequence
newName- new name

◆ resizeTrx

bool StoryboardManager::resizeTrx ( String &  trxId,
unsigned int  length 
)
slot

resize a transition

Parameters
trxId- unique ID of the transition
length- length of transition

◆ sceneEndFrame

int StoryboardManager::sceneEndFrame ( String &  shotId)
slot

returns the last frame of a scene

Parameters
shotId- unique ID of scene

◆ sceneHasTrx

bool StoryboardManager::sceneHasTrx ( String &  shotId)
slot

returns whether a scene has a leading transition

Parameters
shotId- unique ID of the scene

◆ sceneId

String StoryboardManager::sceneId ( String &  sequenceName,
String &  sceneName 
)
slot

Returns the unique id of the scene.

Parameters
sequenceName- name of sequence
sceneName- name of scene

◆ sceneIdOfPanel

String StoryboardManager::sceneIdOfPanel ( String &  panelId)
slot

Returns sceneId of the panel.

Parameters
panelId- unique id of panel

◆ sceneIdOfTrx

String StoryboardManager::sceneIdOfTrx ( String &  trxId)
slot

returns the sceneId of the shot to the right of the transition

Parameters
trxId- unique ID of the transition

◆ sceneInProject

String StoryboardManager::sceneInProject ( int  i)
slot

Returns sceneId of the ith scene in project.

Parameters
i- index in project

◆ sceneInSequence

String StoryboardManager::sceneInSequence ( String &  sequenceId,
int  i 
)
slot

Returns sceneId of the ith scene in sequence.

Parameters
sequenceId- unique id of sequence
i- index in sequence

◆ sceneStartFrame

int StoryboardManager::sceneStartFrame ( String &  shotId)
slot

returns the start frame of a scene

Parameters
shotId- unique ID of scene

◆ scenesWithTrx

StringList StoryboardManager::scenesWithTrx ( )
slot

returns a list of the sceneIds of scenes that have leading transitions

◆ sequenceId

String StoryboardManager::sequenceId ( String &  sequenceName)
slot

Returns the unique id of the sequence.

Parameters
sequenceName- name of sequence

◆ sequenceIdOfScene

String StoryboardManager::sequenceIdOfScene ( String &  sceneId)
slot

Returns sequenceId of the sequence of the given scene.

Parameters
sceneId- unique id of scene

◆ sequenceInProject

String StoryboardManager::sequenceInProject ( int  i)
slot

Returns the sequenceId of the ith sequence in project.

Parameters
i- index in project

◆ setPanelColor

void StoryboardManager::setPanelColor ( String &  panelId,
QScriptValue &  color 
)
slot

sets the panel color

Parameters
panelId- panelId of the target panel.
color- numerical value (HEX) or the name (See HTML naming convention) of the color we want to set the panel.

◆ setPanelDuration

bool StoryboardManager::setPanelDuration ( String &  panelId,
int  frames 
)
slot

sets the panel duration

Parameters
panelId- panelId of target panel
frames- number of frames

◆ splitPanel

bool StoryboardManager::splitPanel ( String &  panelId,
unsigned int  atFrame 
)
slot

Split a panel into 2 panels.

Parameters
panelId- panelId of target panel
atFrame- frame at which to split ( measured from start of project )

◆ trxIdOfScene

String StoryboardManager::trxIdOfScene ( String &  shotId)
slot

returns the transition ID of the transition to the left of the shot

Parameters
shotId- unique ID of the scene

◆ trxLength

int StoryboardManager::trxLength ( String &  trxId)
slot

returns the length of the transition

Parameters
trxId- unique ID of the transition

◆ trxType

String StoryboardManager::trxType ( String &  trxId)
slot

returns a string identifying the transition type

Parameters
trxId- unique ID of the transition