Forum Replies Created

Page 62 of 65
  • Andrei Popa

    September 26, 2017 at 8:21 am in reply to: follow a null with delay for another layer

    There is always this post https://forums.creativecow.net/docs/forums/post.php?forumid=227&postid=15512&univpostid=15512&pview=t
    But if you need to apply that to your index and don’t know how, try this parent.fromWorld(toWorld(anchorPoint,time-index))
    The items will be delayed by one second each, startin at the second of the first index. If you need to adjust that, just add/subtract from the index in the expression. As for your second question, if you want to parent something to a layer but let it keep his original position, you could simply parent only the effects/dimensions you need. You do this by adding an expression to that effect/dimension and pickwhip it to the parent layer.

    Andrei

  • Andrei Popa

    September 18, 2017 at 6:26 am in reply to: Year countdown timer expression problem

    The aN is from the NaN error, which means Not a Number. That is because by the time you get to the days you already are trying to do 0%0, which does not have a result. The problem is that you use the number of years, months, etc in your % operation. This should work.totalTimeInSeconds = 31400000;
    secondsPerMinute = 60;
    secondsPerHour = 60 * 60;
    secondsPerDay = 60 * 60 * 24;
    secondsPerMonth = 60 * 60 * 24 * 30;
    secondsPerYear = 60 * 60 * 24 * 30 * 12;

    secondsRemaining = totalTimeInSeconds;

    years = Math.floor(secondsRemaining / secondsPerYear);
    secondsRemaining = secondsRemaining % secondsPerYear;

    months = Math.floor(secondsRemaining / secondsPerMonth);
    secondsRemaining = secondsRemaining % secondsPerMonth ;

    days = Math.floor(secondsRemaining / secondsPerDay);
    secondsRemaining = secondsRemaining % secondsPerDay ;

    hours = Math.floor(secondsRemaining / secondsPerHour);
    secondsRemaining = secondsRemaining % secondsPerHour;

    minutes = Math.floor(secondsRemaining / secondsPerMinute);
    secondsRemaining = secondsRemaining % secondsPerMinute ;

    seconds = secondsRemaining;

    txt = "";
    txt += yearleadingZeros(years);
    txt += leadingZeros(months);
    txt += leadingZeros(days);
    txt += leadingZeros(hours);
    txt += leadingZeros(minutes);
    txt += leadingZeros(seconds);

    txt;

    function yearleadingZeros(i){
    x = "0" + Math.floor(i);
    return x;

    }

    function leadingZeros(i){
    x = "0" + Math.floor(i);
    x = ":" + x.substr(x.length-2, 2);
    return x;

    }

    Andrei

  • Andrei Popa

    September 4, 2017 at 6:51 am in reply to: real value to change comp duration

    It seems that there is a problem with this framerate. Even if you put an integer as the duration, you get some frames.

    Andrei

  • Andrei Popa

    September 2, 2017 at 6:09 am in reply to: real value to change comp duration

    That is because you used frameDuration instead of fps. Fps is 1/frameDuration, which makes your realFrames value frames*app.project.activeItem.frameDuration. The script would be like this
    var compLength = app.project.activeItem.duration;
    var minutes =2
    var seconds = 15
    var frames = 20;

    minSec = (minutes*60)+seconds;

    realFrames = frames *app.project.activeItem.frameDuration;

    finalDuration = minSec +realFrames;

    app.project.activeItem.duration = finalDuration;

    Andrei

  • Andrei Popa

    August 31, 2017 at 6:20 pm in reply to: real value to change comp duration

    You just reverse the process. Lets say the variables for the texts of this GUI are sec,min,fps,frames.

    min*60 + sec + frames/fps

    Andrei

  • Andrei Popa

    August 31, 2017 at 8:10 am in reply to: real value to change comp duration

    var compLength = selectedComps.duration;
    var minutes = Math.floor(compLength / 60);
    var seconds = Math.floor(compLength % 60);
    var frames = Math.round((compLength - Math.floor(compLength))/selectedComps.frameDuration);
    alert (minutes +":"+ seconds +":"+ frames);

    I don’t know if it works with multiple selected comps.

    Andrei

  • Andrei Popa

    August 31, 2017 at 7:58 am in reply to: Expression when audio reaches 0db

    I think that you would need an expression that would make your project very slow, because you have to test every frame for that start of silence. Imagine after about 10 minutes. Your expression would have 18000 frames to check. For one frame. If you had separate layers for each song, it would be a lot easier.

    Andrei

  • In thisProperty.propertyGroup(2)(2)(1), the numbers are to replace the name of the properties. Things like the group name, “Transform”, “Position”. If you download the gimmePropPath script from redefinery.com/ae/rd_scripts/ and play a little bit with it, you may understand exactly how this works. The script has option for both number and name path.

    Andrei

  • Andrei Popa

    August 29, 2017 at 8:38 pm in reply to: Random Number

    The only way i can think of to make the seedRandom() parameter to go from 1 to 365(so you don’t have the same seed twice in a year) would be a not-so-elegant switch function in which we take all the moths and make the B equal to all the days before that month.
    switch(Date(0).split(" ")[1]){
    case "Jan":
    B = 0;
    break;
    case "Feb":
    B = 31;
    break;
    case "Mar":
    B = 59;
    break;
    case "Apr":
    B = 90;
    break;
    case "May":
    B = 120;
    break;
    case "Jun":
    B = 151;
    break;
    case "Jul":
    B =181 ;
    break;
    case "Aug":
    B = 212;
    break;
    case "Sep":
    B = 243;
    break;
    case "Oct":
    B = 273;
    break;
    case "Nov":
    B = 304;
    break;
    case "Dec":
    B = 334;
    break;
    }
    A = Date(0).split(" ")[2]+B;
    //then the rest of your code
    I don’t have AE installed on my laptop right now so i could not test this at at all. I hope it works.

    Andrei

  • Andrei Popa

    August 29, 2017 at 11:32 am in reply to: Random Number

    Maybe something like
    seedRandom(Date(0).split(" ")[2])
    random(1,6)

    where you use the day as the seedRandom.

    Andrei

Page 62 of 65

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