Replacing footage in sequence with footage from bin while keeping clip effects via API
Hi,
I'm writing a script to automatically replace the footage inside a Premiere timeline with graded versions of the same footage. Problems arise when multiple instances of the same source file are used in the edit and have recieved different color grades: now the script iterates through the timeline, swapping the footage via changeMediaPath() but changing the filepath for EVERY instance of the original clip, leaving all of them looking the same in the timeline.
I tried importing all graded footage into a new bin to be able to have multiple file path references for every grade, but there doesn't seem to be a function within the Premiere API to replace footage from within a bin.
I found the correct function for AfterEffects (replaceSource()), but I need something similiar to work for Premiere, while keeping all effect properties, masks, transforms and so on in place.
Is there any way to achieve this?
P.S.: A way to copy and paste attributes like it is possible in the GUI but via the API would also work, is there something I missed to do this maybe?