|
@@ -55,6 +55,9 @@ var followZoom = 0.5 ;
|
|
|
var followRatems = 1.;
|
|
|
var followDelta = 0.;
|
|
|
|
|
|
+var prevKey = script.addTrigger("prev Key", "");
|
|
|
+var nextKey = script.addTrigger("next Key", "");
|
|
|
+
|
|
|
var layerHeight = script.addFloatParameter("layer height", "", 70., 10., 150.); //part of sequence time to show
|
|
|
// var sequence_structure = { params: {},
|
|
|
// groups:{},
|
|
@@ -126,7 +129,10 @@ function scriptParameterChanged(param){
|
|
|
|
|
|
else if(param.is(rebuildValues)){struct_updateValuesFromSeq();}
|
|
|
|
|
|
- else if (param.is(layerHeight)){setLayerHeight();}
|
|
|
+ else if (param.is(layerHeight)){seq_setLayerHeight();}
|
|
|
+
|
|
|
+ else if (param.is(prevKey)){seq_prevNextCue(0);}
|
|
|
+ else if (param.is(nextKey)){seq_prevNextCue(1);}
|
|
|
|
|
|
else if (param.is(refreshKeys)){
|
|
|
script.log("refreshKeys");
|
|
@@ -286,7 +292,7 @@ function refreshSequenceEnum(){
|
|
|
}
|
|
|
|
|
|
function importSequenceFile(loadFile){
|
|
|
-
|
|
|
+ script.setExecutionTimeOut(60);
|
|
|
doSync = false ;
|
|
|
script.log("loading file "+loadFile.get());
|
|
|
loadData = loadFile.readFile(true);
|
|
@@ -399,6 +405,7 @@ function importSequenceFile(loadFile){
|
|
|
// updateSynchronize() ;
|
|
|
}
|
|
|
doSync = true;
|
|
|
+ script.setExecutionTimeOut(5);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1190,7 +1197,7 @@ function seq_readZoomValue(){
|
|
|
|
|
|
}
|
|
|
|
|
|
-function setLayerHeight(){
|
|
|
+function seq_setLayerHeight(){
|
|
|
if(sequence!=""){
|
|
|
var tl_seq = root.sequences.getItemWithName(sequence);
|
|
|
var tl_layers = tl_seq.layers.getItems() ;
|
|
@@ -1202,7 +1209,22 @@ function setLayerHeight(){
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+}
|
|
|
|
|
|
- root.sequences.keys.layers.pan.uiHeight.set(layerHeight.get());
|
|
|
+function seq_prevNextCue(prevNext){
|
|
|
+ //use first layer keys to navigate
|
|
|
+ if(sequence!=""){
|
|
|
+ var tl_seq = root.sequences.getItemWithName(sequence);
|
|
|
+ var tl_layer = tl_seq.layers.getItems()[0].automation;
|
|
|
+ var tl_currentTime = tl_seq.currentTime.get() ;
|
|
|
+ var currentKey = tl_layer.getKeyAtPosition(tl_currentTime);
|
|
|
+ script.log(currentKey.name);
|
|
|
+ var moveToKey ;
|
|
|
+ if(prevNext){ moveToKey = tl_layer.getItemAfter(currentKey);}
|
|
|
+ else{moveToKey = tl_layer.getItemBefore(currentKey);}
|
|
|
+ //if there is a key go there, else go to currentkey
|
|
|
+ if(moveToKey!=undefined){tl_seq.currentTime.set(moveToKey.position.get());}
|
|
|
+ else{tl_seq.currentTime.set(currentKey.position.get());}
|
|
|
+
|
|
|
+ }
|
|
|
}
|