Forum Replies Created

Page 4 of 11
  • That was awesome!
    Thanks Dan!

  • Hi, this is an adapted function of one of my projects to add ítems to render queue:

    function addCompToQueue (comp, renderSettingsName, outputModuleName, filePath) {
    var newFile = new File(filePath);
    var item = app.project.renderQueue.items.add(sequence);
    var output = item.outputModule(1);

    item.applyTemplate(renderSettingsName);
    output.applyTemplate(renderSettingsName);
    output.file = newFile;
    return item
    }

    For send the item to AME I don’t know how to do that. Hope it helps.

  • Miguel De mendoza

    August 2, 2016 at 10:43 am in reply to: Get the color of a specific point/position

    You can use sampleImage():

    point = [0,0];
    radius = [1, 1];
    color = thisComp.layer(1).sampleImage(point, radius);

  • After two days tweaking all the properties of the list, trying all type of coding crazy things without any result, I decided to check the hardware.I saw that my gpu was at 86ºC, so I decided to remove it, open it and replace the termal paste of the chip. After rebooting the computer, !vualá! all works fine. Lesson learned.

  • This is some testing code in other file, for helping propouses ;):

    function buildUI(thisObj) {
    var createPresets = function() {
    var presets = [];
    for(var i = 0; i < 10; i++) {
    presets.push("Preset_" + i);
    }
    return presets;
    }

    var win= (thisObj instanceof Panel)? thisObj: new Window('palette', 'Dropdownlist testing', undefined);
    var presets_grp = win.add("group{alignment:'right', orientation:'row'}");
    var presets_title = presets_grp.add("statictext{text: 'Presets'}");
    var presets_list = presets_grp.add("dropdownlist", undefined, createPresets());

    return win;
    }

    var myWin = buildUI(this);
    myWin.center();
    myWin.show();

    Same result in SSTK:

    And in AE:

  • Miguel De mendoza

    July 12, 2016 at 1:01 am in reply to: app.scheduleTask()

    I’ve tryed yor code. The toolkit has created a new source file and opened it with this content:
    theFile.remove();
    theFolder.remove();

    So, it throws an error, because in the new file theFile is not defined. What you can do is add an include statment, referencing your script, but you must call app.scheduleTask from other file, because if you call it in the same script, the function will run and run until you close after effects. Other problem is that your variables are inside of a function so they are not accesible from outside. You can solve it by some ways, this is my aproach:

    //Script 1:
    {
    var TempFile = new Object();
    TempFile.folderPath = "~/Desktop/tempFldr2";
    TempFile.theFolder = new Folder (TempFile.folderPath.toString());
    TempFile.scriptPath = (new File($.fileName)).toString();
    TempFile.str = "TempFile.theFolder.remove();"
    TempFile.theFolder.create()
    }

    //Script 2:
    {
    #include "Script1.jsx"
    app.scheduleTask(TempFile.str,1000, false);
    }

  • Thanks Dan, I forgot to write the equals sign on the snipped.
    Well, it looks that I only can see 20 items in the data browser, but the array is filled by all elements. I was working on a bigger script and th problema was on other loop.

  • You can use #include statment at the top of the script:

    #include Other_Script_Name.jsx

    Make sure that the script is in the same folder, or in a subforlder:

    #include Subfolder/Other_Script_Name.jsx

  • Use wiggle expression on position and rotation:

    s = 1; //speed
    amp = 100; //amplitude
    wiggle(s, amp)

  • Miguel De mendoza

    May 23, 2016 at 9:14 pm in reply to: Random composition from project

    You can use Math.random() to get random float between 0 and 1. So, to make a random selection inside a folder you can write this function:

    function getRandom(min, max) {
    return Math.random() * (max - min) + min;
    }

    and then feed it with 1 and folder items lenght-1 and then round it with Math.round().

Page 4 of 11

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