Forum Replies Created

Page 50 of 277
  • something like this:

    lines = thisComp.layer("txt").text.sourceText.split("\r");
    firstline = lines[0];
    lastline = lines[lines.length-1];
    booleanResult = /Ä|Ö|Ü/.test(lastline);
  • For most values of the rose curve you would need infinite amount of points before the curve lines up again. Do you want to limit it to a maximum number of rotations ?

    like here: https://www.youtube.com/watch?v=PDrfcPgnhSA

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

  • Hi Detlef, here’s a method using regular expressions.

    I suppose that with the first Row, you mean the first line that is explicitly ended by a line-break, not a line that is automatically wrapped by a textbox ?

    firstline = thisComp.layer("txt").text.sourceText.split("\r")[0];
    booleanResult = /Ä|Ö|Ü/.test(firstline);
  • I was about to comment that I once found a solution for that, but it is in the thread you link to.

    The built-in smooth method just takes the mean value of a load of samples, and when they are hovering around 0° in an 0-360 range, you get that 180° flip problem.

    In essence: instead of using the built-in smooth() method, we rolled our own, that takes into account that the average of 1° and 359° should be 0° and not 180°.

    Kalleheiki wrote one that shifts the problem 180°, and I offered a solution that should work for all angles.

    But again: it’s a totally separate expression, not using smooth() at all but getting the exact same result.

  • Filip Vandueren

    September 8, 2021 at 9:55 am in reply to: Link Camera with different comp resolutions
    • Select the camera in your smaller comp
    • edit > copy with property Links
    • paste the linked camera in your larger comp.

    Add “*(10240/1920);” to the expressions of these properties:

      • Point of Interest
      • Position
      • Zoom
      • Focus Distance
      • Aperture

      So for example, they will become something like

      comp("Comp 1").layer("Camera 1").transform.pointOfInterest*(10240/1920);

      I think that’s all you need.

      If the camera is parented to things, it becomes a bit more difficult though.

    • Filip Vandueren

      September 6, 2021 at 1:25 pm in reply to: Parsing JSON Files – Fastest possible way?

      You can add an external file as a source in the project, when you explicitly import it as a javascript file, the import is instantaneous, but when you for example import a giant .csv file as a txt-file, After effects can take a while parsing it on import, even before you do anything.

      Anyway, you can should be able to simply use eval(footage(“myText.txt”).sourceText); once it’s in your project

    • There should be javascript engines that can do this (I think maybe typr.js, opentype.js, or foliojs/fontkit could be used?) , but I don’t think it’s possible to embed those within an expression or extendscript.

      For something this granular, checking all glyps in a string against probably mulitple fallback fonts, I think your best bet would be to write something that can run as a pre-processing script in Google Sheets, using Google Scripts, and then create a column with the desired font for each value.

      Getting text-value + font from a .csv is perfectly do-able with expressions.

    • It’s possible to change the font of the entire text-layer, but not of individual characters.

      for example:

      if (value.indexOf("é")>0) {
      style.setFont("Roboto-Thin");
      } else {
      style;
      }
    • Filip Vandueren

      August 19, 2021 at 7:42 am in reply to: Expression controls final keyframe value

      Keyframe the animation like you would want it for a y-value of 100,

      then use this:

      x=100;
      y=(thisComp.layer("GRAPH CONTROLLER").effect("Graph")("Column 1")) * value[1]/100;
      [x,y];
    • Filip Vandueren

      August 18, 2021 at 12:41 pm in reply to: Self-typing keyboard

      Here’s my take on it:

      https://we.tl/t-sPECeVhHzn

    Page 50 of 277

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