Forum Replies Created

Page 21 of 24
  • “\”” + text.sourceText + “\” – ” + thisComp.layer(“Author”).text.sourceText

    Put this expression into your source text.

  • If someone can come up with a way to do it based on position that would be a better way to go, but off the top of my head with rotation.

    I’ve not worked with sprites before, but if it’s just a .png sequence. Separate them into there own comps Up, Down, Left, Right. Then precomp them altogether.

    Then apply something like this to the opacity

    for Up
    I = thisComp.layer(“Rotation”).transform.rotation;
    if (I == 0) 100 else 0;

    for Left
    I = thisComp.layer(“Rotation”).transform.rotation;
    if (I == 90) 100 else 0;

    for Down
    I = thisComp.layer(“Rotation”).transform.rotation;
    if (I == 180) 100 else 0;

    for Right
    I = thisComp.layer(“Rotation”).transform.rotation;
    if (I == 270) 100 else 0;

    Adding this to your rotation
    transform.rotation % 360
    So that it ignores 1x before it, otherwise it won’t work.

    But there is probably a better way to expression the position to do this, but with my skill set, the above would be how I would do it currently.

  • Woah, you just broke my mind.

    I didnt’ t know you could launch a script via command. I’m looking forward to trying that out.

    In that case how would you suggest this then.

    because the script doesn’t want to be updated manually for the filepath e.g John Smith – 1.png to Aaron Taylor – 1.png or 1 – John Smith.png to 1 – Aaron Taylor.png

    What would I be best off using. I’m so used to using different methods indexOf or Substr to get this, my brain is struggling to compute that this would even work.

    I can’t think of a good way to work this.

    /Users/username/Desktop/1 – ” “.png
    or
    /Users/username/Desktop/” ” – 1.png

    Because there will be only the one picture in the folder. I guess indexOf and just look for 1.png.

  • It’s not the way I like to do things, but…

    By replacing the image with another image of the same name, that replaces the image no problem. Then my text layer references a .txt document using $.eval that you type the name into.

    It’s not great, but everyday an image has to be selected, so as much as I would like them to just rename the file by using something like 1 – John Smith to grab a reference. Opening a text document and Inputing a name. Then it replaces the name, at least that works.

    So it’s not great and I read that you yourself didn’t like this method, but I can’t have them opening the .aep file. This is to sit on a machine, in a corner collecting dust whilst CMD prompt launches AE and exports my project with the new inputed data from a .txt file created from an API developer.

    The only time it needs to be touched, if something goes wrong, which my demo version is working smoothly. So I’m feeling very positive.

    Who says you can’t create your own weather generator from 0p hahaha

  • I thought as much.

    Thank you

  • Scott Mcgee

    June 28, 2017 at 3:27 pm in reply to: && is referencing only part 2

    Not the way I wanted to write it, but this works

    input = text.sourceText;
    result = text.sourceText;
    for (var i = 1; i <= 24; i++){
    if (input.indexOf(“Weekdays “+i+”.30pm &”) > -1){
    result = input.substr(0,8) +”\r”+ input.substr(9,25);
    break;
    }
    else if (input.indexOf(“Weeknights “+i+”.30pm &”) > -1){
    result = input.substr(0,10) +”\r”+ input.substr(11,25);
    break;
    }
    }
    result

  • Scott Mcgee

    June 28, 2017 at 2:43 pm in reply to: && is referencing only part 2

    Nope I was too quick to respond

    a = text.sourceText;
    if (a.indexOf ((“Weekdays”) && (“.30pm &”)) != -1){
    “Weekdays” +”\r”+ a.substr(9,25)
    }
    else if (a.indexOf ((“Weeknights”) && (“.30pm &”)) != -1){
    “Weeknights” +”\r”+ a.substr(12,25)
    }
    else
    a;

    if I type “Weeknights 7.30pm & 8.30pm”, the result ends up

    Weekdays
    s 7.30pm & 8.30pm

  • Scott Mcgee

    June 28, 2017 at 2:35 pm in reply to: && is referencing only part 2

    I’m an idiot once again.

    For anyone having issue to find multiple words using indexOf

    a = text.sourceText;
    if (a.indexOf ((“Weekdays”) && (“.30pm &”)) != -1){
    “Weekdays” +”\r”+ a.substr(9,25)
    }
    else if (a.indexOf ((“Weeknights”) && (“.30pm &”)) != -1){
    “Weeknights” +”\r”+ a.substr(12,25)
    }
    else
    a;

  • Was just about to say…solved it with a try catch, but yours worked as well after quickly trying it…I’m an idiot for not spotting and trying yours first.

    mySplit = thisComp.layer(“Programme Title”).text.sourceText.split(“\r”)
    try {mySplit[1]
    }catch(err){
    “”};

  • There’s probably an easier way to do this but if you know when you want it to move and for how long this is a messy way to do it

    valuea = [200, 500];
    valueb = [200,600];
    valuec = [200,790];
    valued = [500,790];

    inPointa = 0;
    outPointa = 2;
    inPointb = 4;
    outPointb = 6;
    inPointc = 8;
    outPointc = 10;

    if (time < outPointa){
    ease(time,inPointa,outPointa, valuea, valueb)
    } else if (time < outPointb){
    ease(time,inPointb,outPointb, valueb, valuec)
    } else if (time < outPointc){
    ease(time,inPointc,outPointc, valuec, valued)}

    If the transistion is always going to be the same you could probably reduce it to this


    valuea = [200, 500];
    valueb = [200,600];
    valuec = [200,900];
    valued = [500,900];

    inPointa = 0;
    inPointb = 4;
    inPointc = 8;

    if (time < inPointa + 2){
    ease(time,inPointa,inPointa +2, valuea, valueb)
    } else if (time < inPointb + 2){
    ease(time,inPointb,inPointb +2, valueb, valuec)
    } else if (time < inPointc +2){
    ease(time,inPointc,inPointc + 2, valuec, valued)}

    But there’s still probably a way to reduce it further or to write it in general, but I’m not that good.

Page 21 of 24

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