Copy link to clipboard
Copied
Nothing happens when you click on the button "Detect cuts in active sequence" - No UpdateEventPanel update either. Is this functionality broken?
Just a typo. 🙂 This works:
var activeSeq = app.project.activeSequence;
if (activeSeq) {
var sel = activeSeq.getSelection();
if (sel[0]) {
var action = 'ApplyCuts'; //'ApplyCuts', 'CreateMarkers'
var shouldApplyCutsToLinkedAudio = true;
var sensitivity = 'LowSensitivity'; //'LowSensitivity', 'MediumSensitivity', 'HighSensitivity'
var result = activeSeq.performSceneEditDetectionOnSelection(action, shouldApplyCutsToLinkedAudio, sensitivity);
} else {
alert("performSceneEdi
...
Copy link to clipboard
Copied
Just a typo. 🙂 This works:
var activeSeq = app.project.activeSequence;
if (activeSeq) {
var sel = activeSeq.getSelection();
if (sel[0]) {
var action = 'ApplyCuts'; //'ApplyCuts', 'CreateMarkers'
var shouldApplyCutsToLinkedAudio = true;
var sensitivity = 'LowSensitivity'; //'LowSensitivity', 'MediumSensitivity', 'HighSensitivity'
var result = activeSeq.performSceneEditDetectionOnSelection(action, shouldApplyCutsToLinkedAudio, sensitivity);
} else {
alert("performSceneEditDetectionOnSelection: Nothing selected, in sequence.");
}
} else {
alert("performSceneEditDetectionOnSelection: No active sequence.");
}
Copy link to clipboard
Copied
Using the above code - nothing happens. I am using ver 23.4.0 - Premeire Pro.
No error is thrown and no alert boxes are shown. Is this performing the functionality of the following menu item? right click on Sequence and select "Scene Edit Detection..."? Just verifying if this is the functionality of the performSceneEditDetectionOnSelection function in ExtendScript?
Copy link to clipboard
Copied
I have confirmed that the code provided works correctly in 23.6 (and the API hasn't changed since its introduction).
The snippet is designed to do nothing, if no trackItems are selected; did you step through it in a debugger? Perhaps try again, with some trackItems selected...?
Copy link to clipboard
Copied
There are other reasons also to get off 23.4, update to 23.6.
Copy link to clipboard
Copied
@Bruce Bullis In your reply above you have
var sel = activeSeq.getSelection();
if (sel[0]) {
--------
}
Firstly I dont find this method (getSelection()) listed under Sequence Object. Also is there a corresponding setSelection method? Sometimes getSelection is returning null, so maybe I should set it before getting the selection
Copy link to clipboard
Copied
Typically, scripts operate on the user's current selection.
sequence.setSelection() takes an array of trackItems; I'll look for some example usage.
Here's example usage of getSelection(), in PProPanel: https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPR...
Here's how to get/set selection, for individual trackItems: https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPR...