-
extendscript to pre-compose selected layers, moving all attributes and adjust composition to the time span of the selected layers
So, I’m surprised I can’t find this on the web, but I’m trying to write a script to essentially precompose selected layers like you would manually by Ctrl/cmd+Shift+C, selecting to move all attributes and adjust the composition to the time span of the selected layers.
I’ve found a great case study tweaked by Dan Ebberts from an idea by Brian Maffitt and coded by Keiko Yamada here:
https://www.motionscript.com/ae-scripting/pre-comp-to-layer-dur.htmlBut alas, it doesn’t seem to behave like the manual steps in AE.
It takes layer(s), Pre-composes them and sets the in/out point of the layer in the original comp, but does not trim the content of the resulting comp to the in/out points of the layer(s). Instead it retains the full length of the parent comp unlike when you Ctrl/cmd+Shift+C, selecting to move all attributes and adjust the composition to the time span of the selected layers.
What would be the best way to go into the resulting pre-comp, and making the work area (trimmed) to the in and out points of the layers so it behaves more like the manual process?
New to extendscript so please forgive me if I’m overlooking the obvious.
BC Canada