Copy link to clipboard
Copied
Hey everyone. This seems like a relatively simple ask but how can I split a clip using ExtendScript. Basically exact same as using Ctrl + K but instead using ExtendScript to do it? I've beeen searching everywhere but I only found insertClip function, but how do I split a clip? Do I need to duplicate the trackitem first somehow? I'm lost on this one. Thanks for any help!
There's no such thing as a 'cut', in the API.
Instead, you would adjust the duration of the existing trackItem, then insert a new trackItem, representing the remaining portion of the original trackItem.
Copy link to clipboard
Copied
There's no such thing as a 'cut', in the API.
Instead, you would adjust the duration of the existing trackItem, then insert a new trackItem, representing the remaining portion of the original trackItem.
Copy link to clipboard
Copied
Ok I get that, but how do I duplicate the original trackItem?
Copy link to clipboard
Copied
You'd need to recreate it, as best you can.
[Admittedly, this is sub-optimal.]
Copy link to clipboard
Copied
Yes, but recreate the trackItem how??? Is the only way by using the sequence clone method?
Copy link to clipboard
Copied
>...recreate the trackItem how???
You would create a new trackItem using everything you know (source projectItem, speed changes, footage reinterpretation) about the trackItem you're "cutting" (truncating).
Copy link to clipboard
Copied
Oh I see, thanks. Is there an example of creating a trackItem anywhere?
Copy link to clipboard
Copied