Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Can I extract Adobe Photoshops Layer Text and Change in After Effect Script

  • Can I extract Adobe Photoshops Layer Text and Change in After Effect Script

    Posted by Ahsan Amin on October 16, 2020 at 3:34 pm

    Background: So I have an After Effect File which has some TextLayer directly in After Effect and there some AVLayers which are imported from a Photoshop File as Composition. Now I can see the texts as AVLayer I made in my Photoshop File.

    Requirement: I want to write a script that can change all the Texts which are shown in After Effects including the Text of Photoshop Layers.

    What I’ve done so Far:
    I wrote a .jsx script that can change the value of After Effect texts via ‘Source Text’ property but I can’t find a way to change the texts of Photoshop Layers. Is it actually possible?

    Out of the Box attempt which is also kind of failed but overall works if layer Names of photoshop are Unique:
    Meanwhile, I adopted another solution so I made a separate .jsx script for photoshop and can see and change the text values directly via Photoshop but there is no way I can relate which Layer of After Effect is attached with which layer of Photoshop. At Max, I could see the photoshop file path in AfterEffect Script via layer.source.file.fsName and layer.source.name Which gives me the name of Photoshop’s Layer Label but there can be multiple layers with the same name in Photoshop. Is there a way to relate the ID of the After Effect Layer with the ID of the Photoshop Layer?

    I’ve wasted much time looking into it so later I thought it to put it over here and get some help. (Thanks a Lot in advance)

    Ahsan Amin replied 5 years, 4 months ago 2 Members · 5 Replies
  • 5 Replies
  • Filip Vandueren

    October 18, 2020 at 10:10 pm

    app.findMenuCommandId(“Convert to Editable Text”); // should return 3799

    so:

    app.executeCommand(3799);

    this should convert the currently selected layer(s) from Photoshop text-layers to after effects textlayers.

  • Ahsan Amin

    October 22, 2020 at 11:24 am

    Hi Filip,

    Thanks for your response and it is also very helpful and gives me another direction.

    However, looks like while running the script from aerender directly doesn’t actually convert it, Probably I need to use AppleScript to launch the AE and later convert all Photoshop layers to “Editable Texts”, kind of an extra step for me but would be worth it in the longer run.

    Note that I am running my .jsx script in headless mode with the help of aerender, not with After Effect Script Menu. so I did currLayer.selected = true and then app.executeCommand(app.findMenuCommandId(“Convert to Editable Text”))and later app.project.save() but no errors and no effect if I do it via aerender. (Does work though if I run from file->script manually from After Effect Menu.

    In my earlier implementation method: one thing I am still wondering how actually After Effect maintains the references of Photoshop Layers especially if the multiple layers have the same name, There should be some ID which is supposed to be the same in After Effect and Photoshop to relate between a Layer of Photoshop and a Layer of After Effect! But found none :(.. this could save me lots of trouble actually!

  • Filip Vandueren

    October 27, 2020 at 10:07 am

    I had no idea it was even possible to run scripts and manipulate projects via aerender.
    I tought it only looked at the render cue and initiated a render.

  • Filip Vandueren

    October 27, 2020 at 10:12 am

    Maybe the unique ID you’re looking for could be the property .dynamicLinkGUID

    http://docs.aenhancers.com/items/item/#item-dynamiclinkguid

  • Ahsan Amin

    January 5, 2021 at 8:02 am

    This (<i style=”font-family: inherit; font-size: inherit;”>dynamicLinkGUID) didn’t work either actually, I had tried it before, the reason is I can’t find this value inside Photoshop script, anyways, I think your base idea of using “Convert to Editable Text” is more useful for this path as eventually all the translations and sizing are applied later in After Effect, Photoshop is just for kind of effects or in base case if nobody change sizes in AE, which is kind of 50/50 chance!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy