Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Modify Script

  • Modify Script

    Posted by Allen Joaquin on June 5, 2012 at 12:08 pm

    Hi, i’ve recently downloaded the videocopilot script to Precompose which is really usefull but i would like to modify it so that it dosen’t actually create a folder and inside the folder the precomposition.

    Is that possible? here’s the Script: https://www.mediafire.com/?c7axcug9ueea5t5

    I took at look at it and i don’t actually know how to modify it : (

    Here’s the script’s code

    {
    function precompTrim()
    {
    var curComp = app.project.activeItem;
    if (!(curComp instanceof CompItem))
    {
    alert("Please select a composition.");
    return;
    }

    var layers = curComp.selectedLayers;
    if (layers.length == 0)
    {
    alert("Please select one or more layers.");
    return;
    }

    app.beginUndoGroup("Precomp and Trim Layers");

    var compFolder = prompt("Comp Folder Name", "Trimmed Comps");

    var projItems = app.project.items;
    for (var i=1; i<=projItems.length; i++)
    if (projItems[i].typeName == "Folder" && projItems[i].name == compFolder)
    {
    compFolder = projItems[i];
    break;
    }

    compFolder = app.project.items.addFolder(compFolder);

    var offset = parseInt(prompt("Add Handles (frames)", "0"));
    offset = offset * curComp.frameDuration;

    for (var i=0; i

    [B]Sorry i figured it Out!!![/B]

    I'll leave what i did here just in case someone is looking for the same i did u just need to delete this lines

    app.beginUndoGroup("Precomp and Trim Layers");

    var compFolder = prompt("Comp Folder Name", "Trimmed Comps");

    var projItems = app.project.items;
    for (var i=1; i<=projItems.length; i++)
    if (projItems[i].typeName == "Folder" && projItems[i].name == compFolder)
    {
    compFolder = projItems[i];
    break;
    }

    compFolder = app.project.items.addFolder(compFolder);

    var compFolder = prompt("Comp Folder Name", "Trimmed Comps");

    var projItems = app.project.items;
    for (var i=1; i<=projItems.length; i++)
    if (projItems[i].typeName == "Folder" && projItems[i].name == compFolder)
    {
    compFolder = projItems[i];
    break;
    }

    compFolder = app.project.items.addFolder(compFolder);

    var offset = parseInt(prompt("Add Handles (frames)", "0"));
    offset = offset * curComp.frameDuration;

    preCompItem.parentFolder = compFolder;

    Allen Joaquin replied 13 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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