Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Move Layer From Composition or Precompose.

New Here ,
Aug 01, 2019 Aug 01, 2019

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.

TOPICS
SDK
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 01, 2019 Aug 01, 2019

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>

Translate
Community Expert ,
Aug 01, 2019 Aug 01, 2019

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2019 Aug 02, 2019

Thank you ! I will try that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2019 Aug 02, 2019

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2019 Aug 02, 2019

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2019 Aug 02, 2019

that's what I had in mind 🙂 thank you !

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2019 Aug 02, 2019

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).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2019 Aug 02, 2019
LATEST

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines