Daniyar, here's the short answer (and I was working on a reply to your direct message):
- Use the Panel SDK, which relies on ExtendScript.
- Export the current sequence to FCP XML, and parse that to find the interesting time points.
- Set the sequence's in and out points to match the segment you want to render
- Render using the Encoder API (as exercised in PProPanel sample), using whatever preset you like.
I did what you said:
1. Exported an active sequence to FCP XML
2. Parsed it in order to get the information on the segments
3. I set the in/out points of the sequence in a loop (let's assume I have 2 segments)
4. Send the adjusted sequence to the render
But there is an issue - all files are got rendered with the timing of the last segment.
The problem is that the segments are sent to MediaEncoder only after the script finishes, which means if I run a loop all my adjustments are overridden by the last setting.
How to overcome the problem?
Save the project between each call to encodeSequence().
No, it does not work! Even I save the project the parts get render the same way as before.
It's working, today, at a couple animation shops.
Please send me your exporting code, directly (b b b at adobe dot com).
I sent the extend script to you.
You're calling saveAs(), which creates a new project (but does not open it).
I suggested calling .save(), which saves the current project.
Ok. I thought of it.
I was neither able to find the "save" function in the DataBrowser nor via Reflection.
"app.project.reflect.methods" gives the following output:
I assumed that it should be at the same level as "saveAs" function. Am I doing something wrong?
I got it.
Thank you, it worked!
The script is working!
Now I have to run the script from the command prompt. There are some issues arise when I call getActiveSequence() method. It seems that running the script from the command prompt launches new Premiere Pro instance and tries to execute the instructions of the script before Sequence data is loaded.
How to overcome the issue?
Best approach == make a panel, and execute your ExtendScripts from there!
Work through the quick start guide, and feel free to ask me anything (directly; b b b at adobe dot com).