Forum Replies Created

  • Gary Frewin

    January 7, 2019 at 2:51 pm in reply to: Create Line Break After X Number of Characters

    Thanks Kalleheikki! That worked perfectly (also kicking myself for not spotting it).

    ☺
    Gary

  • Gary Frewin

    January 7, 2019 at 1:00 pm in reply to: CSV with linebreaks for source text

    Hi Bouke,

    It seems to work fine, I just tried a cell made up entirely of commas… all displayed fine. ☺

    Thanks,
    Gary

  • Gary Frewin

    January 7, 2019 at 12:35 pm in reply to: Create Line Break After X Number of Characters

    Thanks for this! I am having one issues though.

    I am using a reference to text from a CSV file, the comp.name chooses the row from the CSV. It works perfectly on everything, except when the char_count is less than the char_per_line i.e when there should only be a single line of text.

    When this is the case, the expression returns an error saying ‘property of methods named ‘i’ in class ‘global’ is missing or does not exist’.

    Had a fiddle, but can’t seem to figure this out.

    var compIndex = thisComp.name.split(" - ")[0];
    txt = footage("TOVDataTest.csv").dataValue([1,compIndex]);
    char_count = txt.length;
    char_per_line = Math.ceil(thisComp.layer("Controllers").effect("Characters per line")("Slider"));
    lines = Math.ceil(char_count/(char_per_line));
    done = 0;
    esc = 0;
    len =0;
    row = char_per_line;
    while (done == 0){
    esc ++;
    len+=row;
    if (txt.length >= len+1){
    for (i = len; i > len-row; i--) if (txt[i] == " ") break;
    if (i > len-row){
    txt=txt.substr(0,i) + "\r" + txt.substr(i+1,9999);
    }
    }
    len = i;
    if (esc>100){done=1}
    }
    txt

  • Gary Frewin

    January 7, 2019 at 8:58 am in reply to: CSV with linebreaks for source text

    Hi Bouke,

    Thanks for this, it helped me to solve it. Fortunately it required no extra coding or characters that would confuse the end-user. While searching for escape characters I stumbled on a stack overflow article that talked about UTF formatting on a csv.

    All I had to do was go into excel and change the ‘save as’ file format from normal csv, to csv utf-8

    Works perfectly now!
    Thanks!

  • Gary Frewin

    January 5, 2019 at 12:25 pm in reply to: CSV with linebreaks for source text

    A further development.

    In trying to import the text from the CSV, I’ve noticed some strange behaviour. Any help resolving them would be much appreciated.

    If the user has included an apostrophe when creating the CSV (for example in It’s) no characters following the apostrophe are displayed in the textboxes when the CSV is first imported to the AFX project… however, if the user deletes the apostrophe, saves the cs, and let’s AFX refresh, then reinserts the apostrophe, when afx refreshes again the error goes away and the full sentence is displayed.

    If the user tries to add an ellipsis in the csv (…) it doesn’t display at all, no matter what they do.

    thoughts/solutions/workarounds?

    Thanks
    Gary

  • Gary Frewin

    January 2, 2019 at 3:31 pm in reply to: CSV with linebreaks for source text

    Ok, I have solved this it seems (by some miracle as I’m a pretty bad coder!). There are likely more elegant solutions, but here’s what I did:


    var compIndex = thisComp.name.split(" - ")[0];
    var textField = footage("TOVDataTest.csv").dataValue([1,compIndex]);
    var thisText = ""
    for (i = 0; i < textField.split("@@").length; i++){
    thisText += textField.split("@@")[i] + "\n";
    }

    The solution was to forget about line breaks in the csv and use the split method array and a for loop with \n to create the lines.

    Now the users simply duplicates the master template, names them all numerically, and the data is pulled in from the CSV.

  • Gary Frewin

    September 18, 2011 at 9:50 am in reply to: Cropping without centering

    Hi, thanks for the reply. It helped me realize my mistake. I’ll note it here for anyone looking in future. 🙂

    I am using CS4, and simply importing the psd file to the project as ‘composition – croppedlayers’.

    My problem was that rather than opening the composition I imported, I was copying all the layers from the Project Panel into a new composition (this resulted in all the layers becoming centered).

    What I needed to do was open the composition that was created by AE when I imported the PSD. In that composition, all the layers were aligned properly.

    Many thanks

  • Gary Frewin

    July 18, 2011 at 7:13 pm in reply to: Particle World Issue – Atoms

    Many thanks for your answer, I had forgot about the opacity map in the options menu. 🙂

    Still, this has created a further issue. Objects in the background are now appearing in front of foreground objects whenever the camera is far away from that specific foreground object.

    If I line up my camera and start moving toward a foreground particle that is being obsured by what should be a background particle, eventually the background one flips to being obscured by the foreground object, but only as the camera gets quite close. At all other times the background objects are in front of the foreground objects… lol, I’ve really lost it now.

    ….
    🙂

  • Gary Frewin

    July 18, 2010 at 8:37 am in reply to: Features used in this style

    Muchos thanks for your response. I think I’ll be able to get stuck in now that I know I’m not missing some simple fix. I’ll just take it one elements at a time and see where I get!

    🙂

    Tah!
    Gary

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