Forum Replies Created

Page 3 of 5
  • Avinash Ramanath

    September 21, 2018 at 4:38 pm in reply to: After Effects Script – loop through selected items

    is it like this?

    for (var i = 1; i <= app.project.numItems; i++){
    if (app.project.item(i).selected)
    mySelectedItems[mySelectedItems.length] = app.project.item(i);
    }
    for (var i = 0; i < mySelectedItems.length; i++){
    var mySelection = mySelectedItems[i].isStill = "true";
    var myComp = app.project.items.addComp(mySelection.name, 1920, 1080, 1, mySelection.duration, 24);
    var myLayer = myComp.layers.add(mySelection);
    }

  • Avinash Ramanath

    September 21, 2018 at 4:13 pm in reply to: After Effects Script – loop through selected items

    Hi Dan.

    In the below code that you have shared. Can you modify it to do the following:
    If image set comp duration as 4 seconds
    If video set comp duration = mySelection.duration

    Thanks

    var mySelectedItems = [];
    for (var i = 1; i <= app.project.numItems; i++){
    if (app.project.item(i).selected)
    mySelectedItems[mySelectedItems.length] = app.project.item(i);
    }
    for (var i = 0; i < mySelectedItems.length; i++){
    var mySelection = mySelectedItems[i];
    var myComp = app.project.items.addComp(mySelection.name, 1920, 1080, 1, mySelection.duration, 24);
    var myLayer = myComp.layers.add(mySelection);
    var myTransform = myLayer.Effects.addProperty("Transform");
    myTransform.property(4).setValue(150);
    }

  • Avinash Ramanath

    September 21, 2018 at 3:55 pm in reply to: Identifying a Video or image ExtendScript

    Could you please tell me why the below code is omitting files with odd number names. Am very new to scripting and figuring out a lot of things

    {
    var targetFolder = File("/Users/avinashramanath/Desktop/Video");

    if (targetFolder) {

    var files = targetFolder.getFiles();

    for (var i = 0; i < files.length; i++)

    {

    try {

    var importOptions = new ImportOptions (files[i]);

    app.project.importFile (importOptions);

    } catch (error) { /*alert(error.toString());*/}

    }

    }
    }

    {
    var compFolder = app.project.items.addFolder("Assets");

    for(var i = 1; i <= app.project.numItems; i++)
    {

    if(app.project.item(i) instanceof FootageItem)

    app.project.item(i).parentFolder = compFolder;

    }
    }

  • Avinash Ramanath

    September 21, 2018 at 2:43 pm in reply to: Identifying a Video or image ExtendScript

    Yes thanks James. That worked. But I’m still wondering how to identify a video file or an image file via scripting.
    For example a comp can be identified by instanceof CompItem.

  • Yes, Dan, this works perfectly. Many thanks.

  • Avinash Ramanath

    August 21, 2018 at 6:03 am in reply to: Motion Tile and ‘time’ on one axis

    Would you be able to help with an expression that loops on y-axis every 10 seconds?

  • Avinash Ramanath

    July 3, 2018 at 8:06 am in reply to: Selecting all paths in a shape layer

    Hello Walter,
    Need your help in modifying the script. I duplicate the shape layer and change the path very frequently.
    Could you help

    Select the path instead of the keyframable path property, so that I can change the shape instead of twirling down to revel
    Can the script have a select button so that it is dockable?

    Many thanks

  • Go to your Edit menu> Purge Image cache Memory
    This worked for me.

  • It’s working now. Many thanks for the effort Steve.

  • Getting an error this time

Page 3 of 5

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