Forum Replies Created

Page 25 of 32
  • Xavier Gomez

    July 30, 2013 at 8:48 pm in reply to: Time remap trigger opacity

    for Color1 opacity:

    trigProp = thisComp.layer(“Trigger Color”).timeRemap;
    if (trigProp.numKeys<1) value
    else (trigProp.value == trigProp.key(1).value) ? 100 : 0;

    for Color2 opacity:
    trigProp = thisComp.layer(“Trigger Color”).timeRemap;
    if (trigProp.numKeys<2) value
    else (trigProp.value == trigProp.key(2).value) ? 100 : 0;

    Xavier

  • temp = (your expression);
    amplification = 1;
    100 + amplification * temp;

    Xavier

  • Xavier Gomez

    July 28, 2013 at 11:46 pm in reply to: Naming new comps with higher value every time

    var foldernr = cutCompFolder.numItems;
    foldernr = (foldernr<10) ? “0”+foldernr.toString() : foldernr.toString();

  • Xavier Gomez

    July 27, 2013 at 8:46 am in reply to: Save script settings/changes

    See app.settings in the After Effects scripting guide.

    The commands are:
    app.settings.haveSetting(sectionName, keyName) // returns a boolean
    app.settings.getSetting(sectionName, keyName) // returns a string
    app.settings.setSetting(sectionName, keyName, value) // writes a string (value) in the prefs file and returns nothing.

    Care, value must be a string and app.settings.getSettings always returns a string.

    Xavier

  • Xavier Gomez

    July 26, 2013 at 5:17 pm in reply to: Hide or show GUI parts

    Hello,
    you can play with the maximumSize.height of your panel (optsRow) as is explained in this thread: https://forums.adobe.com/message/3708111#3708111.

    Something like this:
    my_palette.grp.cmds.vCheck1.onClick = function ()
    {
    if (my_palette.grp.cmds.vCheck1.value) my_palette.grp.optsRow.maximumSize.height = 50;
    else my_palette.grp.optsRow.maximumSize.height = 0;
    my_palette.layout.layout(true);
    }

    Xavier

  • I dont see how you can get 1% opacity since your expression can only return 0 or 100.
    Two things that might happen:
    – the alpha at your beam endpoint is never exactly 1, hence your expression always returns 0;
    – you are sampling the wrong point (this could come from the point control attached to the null).

    I tried this expression on a fake project and it did what it is supposed to do:

    target = thisComp.layer(“beam”);
    P = thisComp.layer(“beam”).effect(“Beam”)(“Ending Point”);
    target.sampleImage(P,[.5,.5],true)[3] * 100;

    If it works for you too then you can replace the last line with:
    alpha = target.sampleImage(P,[.5,.5],true)[3];
    (alpha==1) ? 100 : 0;

    Xavier

  • Hello, i haven’t read the full thread but i noticed you mispelled your condition: if (alpha=1) should be if (alpha==1). It might fix it.

    By the way the whole last statement can be shortened to:

    (alpha==1) ? 100 : 0;

    Xavier.

  • Xavier Gomez

    July 21, 2013 at 3:34 pm in reply to: removing decimals doesn’t work

    toFixed() returns a string, not a number, this is why you get the strange message ‘112 is not a number’.
    You can either do parseInt(mainWtheP.toFixed(0)), or more directly Math.round(mainWtheP).

    Xavier

  • Xavier Gomez

    July 11, 2013 at 4:21 pm in reply to: Remove all keyframes by script

    Hello again, i’m facing another problem.
    Just found out that 21 is a dangerous command (!) and better be sure to have focus on the right thing before using it. For instance, running app.executeCommand(21) while the focus is on the project panel will delete all currently selected project items, which is obviously not what was intended.

    Is there a way to know that the right composition is opened in the Timeline Panel, and not just selected in the project one ? This to make sure that it’s content will be targetted by delete, not the comp itself.

    I’ve read this thread https://forums.creativecow.net/thread/227/23479#24437 which deals with this problem but i don’t fully understand it, and I would like to avoid CS6 only abilities such as setActive(). Unlike in the cited thread i know exactly which comp to focus on but i really can’t find what string to use for app.findMenuCommand(…).

    Thank you for advice.

    Xavier.

  • Xavier Gomez

    July 11, 2013 at 10:05 am in reply to: Saving expressions as presets

    Hello,
    i don’t think there is anything designed for this within AE but there are some scripts that allow to save and sort expressions. I won’t give you a name because i think there are several (not sure) and i don’t know all of them. Have a look at aescripts.com., category After Effects / Expressions.

    Xavier

Page 25 of 32

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