Forum Replies Created

Page 40 of 65
  • Andrei Popa

    January 15, 2020 at 2:21 pm in reply to: long expression for if/then/else

    I think this should work.

    if (comp("countries").layer("color scheme").effect("activate")("Checkbox") == 0){
    try{
    NUME = thisLayer.name.split(" ")[0];
    x = Math.floor(comp("countries").layer(NUME).effect("color scheme")("Slider"));
    comp("countries").layer("color scheme").effect("land " + x)("Color");
    } catch(err) {
    x = [1,1,1,1]
    }
    }else{
    comp("countries").layer(thisLayer.name).effect("country colour")("Color")
    }

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 14, 2020 at 1:29 pm in reply to: Copy Text Using Expressions

    I don’t know of a better way than this. First is columns and second is rows

    (repeat(4)+"\n").repeat(3)

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 14, 2020 at 7:14 am in reply to: After effects : the blinking cursor

    This is how you make it disappear in the end

    L = text.sourceText.length;
    It = time -thisLayer.inPoint;

    T = It *effect("Speed")("Slider") - effect ("Start After")("Slider")*effect ("Speed")("Slider");
    F = Math.round (It % 1);
    if (F == 1 | (T==0) ) {Fl= "|";}else {Fl="";}
    if (T>L) Fl = "";
    substr (0,T)+ Fl

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 12, 2020 at 5:30 pm in reply to: How to set range

    You need to put the expression in opacity and link it to the slider. Something like this, although you should pickwhip the slider into the expression

    var mySlider = thisComp.layer("Control Layer").effect("Y Rot")("Slider");//here you should pickwhip your slider

    (mySlider>=1 && mySlider <=10) ? 100 : 0;

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 12, 2020 at 2:28 pm in reply to: ExtendedScript – Update Layer Marker

    var bodyComp = app.project.items[13]; //MyComposition on the project which relates to item 13
    var test= bodyComp.layers[8]; // my layer (audio in my case)

    bodyComp.openInViewer();
    test.selected = true; //select the audio layer
    app.executeCommand(2539); // execute the 'Update Marker from Source' from the menu

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 9, 2020 at 8:04 am in reply to: Value increase with active layer.

    This starts at the value that you initially set for the property. Then increases with valuePerLayer each time an active layer is found.


    valuePerLayer = 100;
    val = value;
    C = comp("Clips");
    for (i = 1; i <= C.numLayers; i++){
    if (C.layer(i).active){
    val += valuePerLayer;
    }
    }
    val

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 7, 2020 at 3:14 pm in reply to: Updating Audio Markers

    With scripting:
    First, you select the layer.
    Then, you run this

    app.executeCommand(app.findMenuCommandId(“Update Marker From Source”));

    Andrei
    My Envato portfolio.

  • I am just trying to understand your project now. So you have 2 layers. The face layer and the back layer(face of cards and back of cards).
    You have a wiggle on one of them.

    1.Which one has the wiggle?
    2.Is your wiggle applied only to y position?
    3.How does the second layer relate to this wiggle? Are they parented? Or is it just through my expression?

    The way I think this should work is you take the main layer initial position. You calculate the difference created by the wiggle expression and then you add or subtract that difference, depending if you want it to move the same direction or contrary.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 6, 2020 at 11:24 pm in reply to: Time remap based on velocity/direction?

    Order of poses inside the comp : neutral, up, down, left, right.
    Each holds one frame only.
    Precomp framerate must equal active composition framerate.


    neutralSpeed = 50; //pixels pe second, you can modify this
    vel = position.velocityAtTime(time);

    if (Math.abs(vel[0]) < neutralSpeed && Math.abs(vel[1])< neutralSpeed){
    pose = 0;
    }else if (Math.abs(vel[0])>Math.abs(vel[1])){
    pose = (vel[0]>0) ? 4 : 3;
    }else{
    pose = (vel[1]>0) ? 2 : 1;
    }

    framesToTime(pose)

    Andrei
    My Envato portfolio.

  • Andrei Popa

    January 6, 2020 at 11:05 pm in reply to: Changing JSON Data Over Time

    eval(“var sales=”+footage(“csvjson01.json”).sourceText);

    dur = 1; //Duration, in seconds, of each value
    idx = Math.floor(time/dur);
    (idx < sales.length) ? sales[idx].Sandwiches : sales[sales.length-1].Sandwiches;

    Andrei
    My Envato portfolio.

Page 40 of 65

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