All Classes Functions Enumerations Enumerator Properties Modules Pages
PrjMgtManager Class Reference

This interface is used to merge/extract another storyboard into the main storyboard. More...

Public Slots

Insert/Merge Options
void setMergeSoundClips (bool flag)
 Set the flag to merge sound clips from the source project. More...
 
void setRespectLockedSoundTracks (bool flag)
 Set the flag to respect locked sound tracks. More...
 
void setKeepOriginalScenes (bool flag)
 Set the flag to keep the original scenes ( when overwriting ) and move them to the end of the project. More...
 
void setMergeOnlyTrackChanges (bool flag)
 Set the flag to merge only panels with track changes ( when overwriting scene or project merge ) More...
 
void setReplaceArtWork (bool flag)
 Set the flag to replace only art work in panels ( when overwriting scene or project merge ) More...
 
void setMergeOnlyExistingScenes (bool flag)
 Set the flag to merge the panels only in existing scenes ( when overwriting scene or project merge ) More...
 
void setPreserveMasterCaptions (bool flag)
 Set the flag to preserve the panel captions ( when project merge ) More...
 
void setPreserveMasterTransform (bool flag)
 Set the flag to preserve transforms when replace only art work in panels ( when overwriting scene or project merge ) More...
 
void setMergeAdditionalCaptions (bool flag)
 Set the flag to merge additional captions (when project merge), merge canceled if flag is false and there are new captions fields. More...
 
void setUpdateProjectLink (bool flag)
 Set the flag to update the project link (when project merge). More...
 
Source Project Introspection ( used for scene insertion )
bool loadSourceProject (String &scenePath)
 Loads the specified storyboard project to be used as a source for insertion or project merge. More...
 
StringList sourceProjectSceneIds ()
 Returns a list of sceneIds from the loaded storyboard project. More...
 
StringList sourceProjectPanelIds (String &sceneId)
 Returns a list of panelIds from the specified scene of the loaded storyboard project. More...
 
StringList sourceProjectCaptionNames ()
 Returns a list of captions from the loaded storyboard project. More...
 
void setCaptionRemapByName (bool flag)
 Map source Captions by caption name, on insert. True by default. More...
 
String sourceProjectSceneName (String &sceneId)
 Returns the scene Name for a given source project scene Id. More...
 
String sourceProjectSequenceName (String &sceneId)
 Returns the sequence Name for a given source project scene Id. More...
 
Project Management Methods
String insertScene (String &srcSceneId, String &dstSceneId, bool overwrite, bool before)
 Inserts the specified source scene Id into the project. More...
 
String insertPanel (String &srcSceneId, String &dstSceneId, bool overwrite, bool before)
 Inserts the specified source panel Id into the project. More...
 
bool extractRange (String &newProjectPath, String &newProjectName, String &fromShotId, String &toShotId, bool removeScenes, bool linkExtracted=false)
 Extracts the specified range of scenes, and creates a new project with them. More...
 
bool mergeProject ()
 Merge the loaded source project into the current main project by matching the panels by panel Ids. More...
 

Detailed Description

This interface is used to merge/extract another storyboard into the main storyboard.

The following examples are provided:

For scene insertion, the source scene must be loaded using loadSourceProject. Once loaded, the sceneIds of the source may be retrieved. Using this information, the insertScene command can be created.

var pM = new PrjMgtManager();
if ( pM.loadSourceProject("/pathToProject/something.sboard"))
{
var scenes = pM.sourceProjectSceneIds();
for ( var i =0; i < scenes.length; ++i )
{
MessageLog.trace( scenes[i] + " : " + pM.sourceProjectSequenceName( scenes[i]) + ":" + pM.sourceProjectSceneName( scenes[i]) );
}
var SM = new StoryboardManager();
var dstId = SM.sceneInProject( 3 );
// Insert the first scene from the source after the 3rd scene in the destination.
var overwrite = false;
var before = false;
pM.insertScene( scenes[0], dstId, overwrite, before );

Member Function Documentation

◆ extractRange

bool PrjMgtManager::extractRange ( String &  newProjectPath,
String &  newProjectName,
String &  fromShotId,
String &  toShotId,
bool  removeScenes,
bool  linkExtracted = false 
)
slot

Extracts the specified range of scenes, and creates a new project with them.

Note
Projects with modifications MUST be saved prior to the use of this function. ( use scene.saveAll() )
Parameters
newProjectPath- path to the directory where the new project is to be saved.
newProjectName- name of the new project
fromShotId- used to determine the start of the extraction range ( first frame of the shot is used )
toShotId- used to determine the end of the extraction range ( last frame of the shot is used )
removeScenes- whether the extracted range is to be removed from the original project
linkExtracted- if true, add a link between extracted and the original project. Default is false.

◆ insertPanel

String PrjMgtManager::insertPanel ( String &  srcSceneId,
String &  dstSceneId,
bool  overwrite,
bool  before 
)
slot

Inserts the specified source panel Id into the project.

Note
Adjacent transitions on the target panel will be deleted.
Parameters
srcSceneId- uniqueId of the source panel
dstSceneId- uniqueId of the destination panel
overwrite- if true, overwrites the destination panel, if false, inserts next to it
before- used when inserting to specify before the target or after

◆ insertScene

String PrjMgtManager::insertScene ( String &  srcSceneId,
String &  dstSceneId,
bool  overwrite,
bool  before 
)
slot

Inserts the specified source scene Id into the project.

Note
Adjacent transitions on the target scene will be deleted.
Parameters
srcSceneId- uniqueId of the source shot
dstSceneId- uniqueId of the destination shot
overwrite- if true, overwrites the destination shot, if false, inserts next to it
before- used when inserting to specify before the target or after

◆ loadSourceProject

bool PrjMgtManager::loadSourceProject ( String &  scenePath)
slot

Loads the specified storyboard project to be used as a source for insertion or project merge.

Parameters
scenePath- path to project
var pM = new PrjMgtManager();
if ( pM.loadSourceProject("/pathToProject/something.sboard") )
{
// Source project loaded
}

◆ mergeProject

bool PrjMgtManager::mergeProject ( )
slot

Merge the loaded source project into the current main project by matching the panels by panel Ids.

Returns
Returns true if successful merge.
var pM = new PrjMgtManager();
if ( pM.loadSourceProject("/pathToProject/something.sboard") )
{
// Set merge project options (optional), the default values are used.
pM.setMergeOnlyTrackChanges(false);
pM.setMergeOnlyExistingScenes(false);
pM.setRespectLockedSoundTracks(false);
pM.setPreserveMasterCaptions(false);
pM.setReplaceArtWork(false);
pM.setPreserveMasterTransform(false);
pM.setMergeAdditionalCaptions(false);
pM.setUpdateProjectLink(false);
var res = pM.mergeProject();
MessageLog.trace( "Merge result : " + res );
}

◆ setCaptionRemapByName

void PrjMgtManager::setCaptionRemapByName ( bool  flag)
slot

Map source Captions by caption name, on insert. True by default.

Parameters
flag- boolean

◆ setKeepOriginalScenes

void PrjMgtManager::setKeepOriginalScenes ( bool  flag)
slot

Set the flag to keep the original scenes ( when overwriting ) and move them to the end of the project.

Parameters
flag- boolean

◆ setMergeAdditionalCaptions

void PrjMgtManager::setMergeAdditionalCaptions ( bool  flag)
slot

Set the flag to merge additional captions (when project merge), merge canceled if flag is false and there are new captions fields.

Parameters
flag- boolean

◆ setMergeOnlyExistingScenes

void PrjMgtManager::setMergeOnlyExistingScenes ( bool  flag)
slot

Set the flag to merge the panels only in existing scenes ( when overwriting scene or project merge )

Parameters
flag- boolean

◆ setMergeOnlyTrackChanges

void PrjMgtManager::setMergeOnlyTrackChanges ( bool  flag)
slot

Set the flag to merge only panels with track changes ( when overwriting scene or project merge )

Parameters
flag- boolean

◆ setMergeSoundClips

void PrjMgtManager::setMergeSoundClips ( bool  flag)
slot

Set the flag to merge sound clips from the source project.

Parameters
flag- boolean

◆ setPreserveMasterCaptions

void PrjMgtManager::setPreserveMasterCaptions ( bool  flag)
slot

Set the flag to preserve the panel captions ( when project merge )

Parameters
flag- boolean

◆ setPreserveMasterTransform

void PrjMgtManager::setPreserveMasterTransform ( bool  flag)
slot

Set the flag to preserve transforms when replace only art work in panels ( when overwriting scene or project merge )

Parameters
flag- boolean

◆ setReplaceArtWork

void PrjMgtManager::setReplaceArtWork ( bool  flag)
slot

Set the flag to replace only art work in panels ( when overwriting scene or project merge )

Parameters
flag- boolean

◆ setRespectLockedSoundTracks

void PrjMgtManager::setRespectLockedSoundTracks ( bool  flag)
slot

Set the flag to respect locked sound tracks.

Parameters
flag- boolean

◆ setUpdateProjectLink

void PrjMgtManager::setUpdateProjectLink ( bool  flag)
slot

Set the flag to update the project link (when project merge).

Parameters
flag- boolean

◆ sourceProjectCaptionNames

StringList PrjMgtManager::sourceProjectCaptionNames ( )
slot

Returns a list of captions from the loaded storyboard project.

◆ sourceProjectPanelIds

StringList PrjMgtManager::sourceProjectPanelIds ( String &  sceneId)
slot

Returns a list of panelIds from the specified scene of the loaded storyboard project.

Parameters
sceneId- unique ID of the scene

◆ sourceProjectSceneIds

StringList PrjMgtManager::sourceProjectSceneIds ( )
slot

Returns a list of sceneIds from the loaded storyboard project.

◆ sourceProjectSceneName

String PrjMgtManager::sourceProjectSceneName ( String &  sceneId)
slot

Returns the scene Name for a given source project scene Id.

Parameters
sceneId

◆ sourceProjectSequenceName

String PrjMgtManager::sourceProjectSequenceName ( String &  sceneId)
slot

Returns the sequence Name for a given source project scene Id.

Parameters
sceneId