Forum Replies Created

Page 10 of 32
  • Xavier Gomez

    May 13, 2016 at 8:09 pm in reply to: dropdown interaction issue…

    To set a dropdown selection without triggering its onChange event, you can temporarily either delete the onChange handler (javascript delete), or assign to it the undefined value, or assign to it a dummy onChange that does nothing.
    For instance, this would work i think (set dummy onChange):

    var dds = [ddA, ddB, ddC, ddD];
    for (var i=0; i<4; i++) dds[i].onChange = onDDchange;

    function noop(){};
    function onDDChange(){
    for (var i=0; i<4; i++){
    if (dds[i] == this){
    // stuff to do for the dropdown which is been changed
    /*your stuff*/
    }
    else if (dds[i].selection !== null){
    // stuff to do for other dds : reset selection to null
    dds[i].onChange = noop;
    dds[i].selection = null;
    dds[i].onChange = onDDChange;
    };
    };
    };

    Replacing the line dds[i].onChange = noop; by
    dds[i].onChange = void 0;
    or by:
    delete dds[i].onChange;
    would work too.

    However i dont know a direct way to set a dd’s selection without triggering.

    Xavier

  • Xavier Gomez

    May 12, 2016 at 5:39 pm in reply to: Flickering Opacity Increment

    You can try this (it is built upon Dan’s code, with a 2 sec fadeIn):

    fadeInDur = 2;
    segMin = 1.0; //minimum segment duration
    segMax = 1.5; //maximum segment duration
    flickerDurMin = 0.5;
    flickerDurMax = 1.0;

    t = time-inPoint;
    if (t>=fadeInDur){100}else{
    end = inPoint;
    j = 0;
    while (time >= end){
    j += 1;
    seedRandom(j,true);
    start = end;
    end += random(segMin,segMax);
    };
    flickerDur = random(flickerDurMin,flickerDurMax);
    if (time > end - flickerDur){
    seedRandom(1,false);
    x = random();
    }
    else{
    x = 1;
    };
    linear(t, 0, fadeInDur, 0, 100) * x;
    };

    Xavier

  • Xavier Gomez

    May 12, 2016 at 4:35 pm in reply to: Questions about the wiggle expression

    It is around the current trajectory (keyframes).
    If you don’t animate, it stays around the same point.

    If any trajectory suits you, you can try something like this:

    wiggle(0.2, 300) + wiggle(10, 10) – value;

    (the first wiggle is to give a random trajectory, still around a point though, and the second to wiggle around it).

    Xavier

  • Xavier Gomez

    May 11, 2016 at 12:16 pm in reply to: Changing oreder of effects

    To move slider2 to first position in the effects stack:

    slider2.moveTo(1);

    Xavier

  • Yes agreed, but for this type of animation you only need to stack up sub-animations durations to find the correct time interval in which the current time lies, then calculate the interpolation only for that time interval. You dont need all these definitions, nor instantiate a new Creator for every time interval, even less calculate d[i].timeEvent() for every single instance, given that AE is only interested in what happens at current time.

    Something simple like this:

    //============== user data ================

    database = [{}, {}, …]; // some data

    //============== solve side ================
    1- find the index of database entry containing the current time (sum up durations until hit)
    2- for that time interval, interpolate using the specified interpolation

  • I haven’t tried your expression, but i wouldnt be surprised you quickly run into performance issues. Given that image processing can already be a heavy task, expressions should be as simple as possible imo, and go straight to the result whenever possible.

    I think you could achieve the same thing in a much simpler and efficient fashion.

    Xavier

  • Groups inside shape layers are like shape “sublayers” and as such they also have a “content” property. It has been hidden probably to lighten the ui (less things to expand).

    Now why only hide it instead of get completely rid of it ?
    Apparently it is so for consistency reasons. The properties inside a layer can be of two types: those that can be added/duplicated/renamed/moved/removed, etc, by the user, and those that cannot. The thing is that After Effects does not mix different kinds of properties inside a given property group. This means that there are also two types of groups:

    • groups than cannot accept new properties (the children inside those groups all have a fixed name and cannot be added/removed). Example: “Transform”, “Material Options”, “Layer Styles”,….
    • groups that can accept new properties (the children inside those groups can all be added/removed, etc). Example: “Masks”, “Effects”…

    Again, no mixing. Therefore everytime you see in the GUI a renamable property at the same level as a non renamable property, you can guess somehow that something has been hidden (the parent group of the renamable property).

    In the case of a “Group” inside a shape layer: it has a property called “Transform” (its transform group) that is not renamable, and, at the same level in the gui, all the addable stuff (fill/stroke/etc), but the actual internal stucture is <“Group”> : <“Content”, “Transform”> and the addable stuff is actually children of “Content”.

    Note that in the expression, “content” is not a command, it is actually the group called “content”.
    If in the text layer you put this expression:

    thisComp.layer(“Shape Layer 1”).content(“Ellipse 1”).content.name;

    …you’ll get its name (“Contents”).

    Finally, there is the same situation for animators and selectors in text layers.

    Hopefully, it’s clear (not quite sure). If you are interested, you can find more info on this in the scripting guide (at PropertyBase > propertyType).

    Xavier.

  • Xavier Gomez

    March 14, 2016 at 10:32 am in reply to: Add a Color Picker using a resource string

    Not possible. You would have to create your own (substantial work).

    Xavier.

  • Language problems may occur every time the pickwhip uses the form: (“Property Name”)

    For properties that can be renamed by the user, the fact that After Effects use this notation is normal.
    You should give renamable properties unique names so that conflicts cannot occur.

    For properties that cannot be renamed, the pickwhip uses :

    (1) the compact english notation for properties inside the built-in groups (such as Transform, Mask, Tracker, etc) and i think, can’t garanty 100%, that you can leave it that way, it is “universal”.

    (2) the (“Property Name”) notation for properties inside “Effects” (where 3rd party can interact).
    A simple way to “universalize” is to replace the property name by its propertyIndex.

    In some situation, get the propertyIndex of a property can be tricky.
    You can get it either by a script, or an expression in a temporary text layer (pickwhip the property and add .propertyIndex)

    Again, dont use propertyIndex for renamable properties (===>source of bugs),
    and likewise for buit-in properties like transform.position (===>useless)

    Hope that helps.

    Xavier

  • Xavier Gomez

    February 25, 2016 at 5:57 pm in reply to: Derive hidden corner pin point from other three

    If things are simple enough (that is: if the screen rectangle still appears as a parallelogram), you can use this for the Lower Right corner:

    A = effect("Corner Pin")("Upper Left");
    B = effect("Corner Pin")("Upper Right");
    C = effect("Corner Pin")("Lower Left");
    B+C-A;

    (Similar expressions for other cases, eg Upper Left msssing, etc : permute names).

    Xavier

Page 10 of 32

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