Forum Replies Created

Page 42 of 65
  • Andrei Popa

    December 26, 2019 at 6:16 pm in reply to: How to move text layers based on their end of the layer?

    Try it like this.


    duration = 9.5; // Duration of animation in seconds
    posa = [value[0]-300,value[1]+300]; // Start position
    posb = [value[0],value[1]]; // End position
    linear(time,outPoint-duration,outPoint,posa,posb)

    Andrei
    My Envato portfolio.

  • I’m not sure what your level of scripting is, but you should be able to understand this and even use the function in your own cases.


    var myFile = File.openDialog("Please select a file");
    var myLayer = app.project.activeItem.selectedLayers[0];
    copyFileToLayer(myFile, myLayer);

    function copyFileToLayer(myFile, myLayer){
    if(myFile.open("r")){
    var myString = myFile.read();
    myLayer("ADBE Text Properties")("ADBE Text Document").setValue(myString);
    myFile.close();
    }else{
    alert(myFile.error);
    }
    }

    Andrei
    My Envato portfolio.

  • I don’t know how to add images using resource string but i recommend you change your way of creating dockable GUI.

    Here is a link to one of my Dropbox Paper documents.
    I haven’t got the time to post it on my website, so it lack images, but you can fully understand even without them. About 3 minutes read.

    Here is the link https://paper.dropbox.com/doc/GUI-using-website-httpsscriptui.joonas.me–ArM9dw8MNJTjuP3AFq~tnre_AQ-lZmI5FYPC2yGbYNg2OIVn

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 18, 2019 at 7:10 am in reply to: Automatically Time Stretch Layer to Comp Length?

    You must write the expression in the time remap property. Sorry for the mistake.

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 18, 2019 at 7:09 am in reply to: Automatically Time Stretch Layer to Comp Length?

    Enable time remapping for the layer.

    Go to a time that you think would be the biggest you would ever have. You can exceed the comp duration by clicking on the blue timer in the left side of the time-line and writing the time you want to go to.

    Let’s pretend 10 minutes is the max. So you type 10:00:00. Now press alt+] to set the layer outPoint to 10 mins.

    In the timeline write this expression:


    linear(time,0, thisComp.duration,0,timeRemap.key(2).time)

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 13, 2019 at 8:24 pm in reply to: Use ease() expression with for loops

    Let me see if i understand you correctly. You have a comp with a bunch of pictures(the number may differ over time) and a camera. And you want the camera to hover over all the pictures with a preset animation/focus time. If so, you can use this


    animDur = 1;
    focusDur = 0.5;
    totalCycle = animDur+focusDur;
    otherLayers = 1;
    picsNumber = thisComp.numLayers-otherLayers;
    sector = Math.floor(time/totalCycle);
    x = (time < (picsNumber - 1)*totalCycle) ? ease(time, sector*totalCycle , sector*totalCycle+animDur, thisComp.layer("Name "+ (sector+1)).transform.position[0], thisComp.layer("Name "+ (sector+2)).transform.position[0]) : value[0];
    [x,value[1]]

    animDur is the duration of the movement from one picture to another;
    focusDur is how much the camera stays on a particular picture;
    otherLayers is the number of layers inside the comp that are not pictures named “Name 1”, “Name 2” etc
    For your information, if you put the picture from layer 1 towards bottom, you can use this(i think this variant is actually faster):

    animDur = 1;
    focusDur = 0.5;
    totalCycle = animDur+focusDur;
    otherLayers = 1;
    picsNumber = thisComp.numLayers-otherLayers;
    sector = Math.floor(time/totalCycle);
    x = (time < (picsNumber - 1)*totalCycle) ? ease(time, sector*totalCycle , sector*totalCycle+animDur, thisComp.layer(sector+1).transform.position[0], thisComp.layer(sector+2).transform.position[0]) : value[0];
    [x,value[1]]

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 13, 2019 at 6:50 pm in reply to: Static random numbers

    I’m sorry. You should pass true as an argument to seedRandom. So this should work:


    seedRandom(index, true);
    x = random(0.8,1.5);
    y = random(0.5,2);
    z = random(2,5);
    posterizeTime(x);
    wiggle(y,z);

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 13, 2019 at 6:32 pm in reply to: Static random numbers

    Try this:

    seedRandom(index, false);
    x = random(0.8,1.5);
    y = random(0.5,2);
    z = random(2,5);
    posterizeTime(x);
    wiggle(y,z);

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 13, 2019 at 6:22 pm in reply to: Editing graph when an ‘ease’ expression is used

    You can’t edit the ease function. It uses the default easing graph(the 0 speed, 33% influence)

    Andrei
    My Envato portfolio.

  • Andrei Popa

    December 11, 2019 at 5:11 pm in reply to: Autoscale Text Box with fixed height ?

    If it’s only the horizontal size that you want modified, you can use this expression for size and set the vertical size to one that fits your text manually.


    //SIZE
    s=thisComp.layer("1 - Name LastName");
    w=s.sourceRectAtTime().width;
    [w,value[1]]

    Andrei
    My Envato portfolio.

Page 42 of 65

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