Copy link to clipboard
Copied
Hi,
Is there an AEGP call to move a layer from a composition to another ? or to create a precomp from a layer ? I tried using an ExecuteScript() but it crashes AE when it is executed during a PF_Cmd_USER_CHANGED_PARAM call. thx.
you can trigger the command for "precompose" just like any other AE
command. as for the crash, i think it happens because when precomposing
from USER_CHANGE_PARAM you're invalidating the effect from which you're
currently operating from.
you'll need to call that command from some AEGP idle hook.
On Fri, Aug 2, 2019 at 2:07 AM Karen Gauthier <forums_noreply@adobe.com>
Copy link to clipboard
Copied
you can trigger the command for "precompose" just like any other AE
command. as for the crash, i think it happens because when precomposing
from USER_CHANGE_PARAM you're invalidating the effect from which you're
currently operating from.
you'll need to call that command from some AEGP idle hook.
On Fri, Aug 2, 2019 at 2:07 AM Karen Gauthier <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Thank you ! I will try that.
Copy link to clipboard
Copied
One question though, if I were to issue a Do_Command for the precompose, can I :
1/ Set the options for precompose (name, moving options...)?
2/Easily retrieve a handle on the new precompose (without going through aegp stuff)?
thx again.
Copy link to clipboard
Copied
honestly, i don't know. never did it myself.
however, if you do it via javascript during idle hook, then surely you get
to call the shots:
app.project.item(index).layers.precompose(layerIndicies, name,
moveAllAttributes) ;
On Fri, Aug 2, 2019 at 3:23 PM Karen Gauthier <forums_noreply@adobe.com>
Copy link to clipboard
Copied
that's what I had in mind 🙂 thank you !
Copy link to clipboard
Copied
A really last one 🙂 .... if the script returns a comp object, can I get that handle from the ExecuteScript() result ? ( via a cast of course).
Copy link to clipboard
Copied
no... but the itemID on javascript and AEGP are the same, so you can pass
that back and search for it in the project.
(but you already knew that to look for you comp on the javascript side...)
On Fri, Aug 2, 2019 at 4:39 PM Karen Gauthier <forums_noreply@adobe.com>
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more