Getting Layer Duration in Photoshop Timeline

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

blastframe
Posts: 3
Joined: Wed Feb 20, 2019 12:50 am

Getting Layer Duration in Photoshop Timeline

Post by blastframe »

Hello,

I'm trying to write a script that changes the duration of a layer in the Photoshop timeline.

I haven't been able to find ANY information about the Timeline in the API:
  • I have looked for scripting information about the Timeline in Photoshop Scripting Basics and Adobe Photoshop CC JavaScript Reference but found nothing.
  • I have also looked for Timeline objects in the Extendscript Toolkit Data Browser but found nothing.
  • I've looked at the ScriptingListenerJS.log and found an executeAction call for changing the Out Time, but nothing about the layer's duration:

    Code: Select all

    // =======================================================
    var idmoveOutTime = stringIDToTypeID( "moveOutTime" );
        var desc206 = new ActionDescriptor();
        var idtimeOffset = stringIDToTypeID( "timeOffset" );
            var desc207 = new ActionDescriptor();
            var idseconds = stringIDToTypeID( "seconds" );
            desc207.putInteger( idseconds, -4 );
            var idframe = stringIDToTypeID( "frame" );
            desc207.putInteger( idframe, -23 );
            var idframeRate = stringIDToTypeID( "frameRate" );
            desc207.putDouble( idframeRate, 24.000000 );
        var idtimecode = stringIDToTypeID( "timecode" );
        desc206.putObject( idtimeOffset, idtimecode, desc207 );
    executeAction( idmoveOutTime, desc206, DialogModes.NO );​
I'd need to know a layer's duration in order to know how much to reduce the OutTime in the Timeline.

Can anyone please help me find documentation on how to script for the Photoshop Timeline?

Thank you!
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: Getting Layer Duration in Photoshop Timeline

Post by Kukurykus »