Forum Replies Created

Page 1 of 2
  • Quest Rogers

    May 25, 2023 at 9:33 pm in reply to: Adding a clamp to sourceRectAtTime?

    Thanks Dan! I’ll give this a try.

  • Like this. You need to separate what you want excluded with |\ and then the character.

    thisComp.layer("Title").text.sourceText.value.replace(/,|\(|\)|\J|\_/g,"")

  • Quest Rogers

    May 2, 2018 at 2:39 pm in reply to: wiggle effect on only one axis of movement…

    Yes. That’s correct.

  • Quest Rogers

    April 30, 2018 at 3:56 pm in reply to: “Glue” a layer to the end of another layer

    One more thing. Make sure your text is left aligned in the character panel too. Then make sure it’s anchor point is aligned on the bottom left of the text layer bounding box.

  • Kalleheikki,

    Thanks for the reply! Yeah I discovered the kerning for “1” is what’s causing the issue too. Your expression works great. Thanks for helping me figure this one out. Much appreciated!

  • Quest Rogers

    April 30, 2018 at 2:57 pm in reply to: “Glue” a layer to the end of another layer

    No problem. I’m glad it’s helping. I think your anchor point might be misaligned because I don’t have that issue. Make sure your anchor point on the “exclamation point” is aligned on the bottom left of it’s bounding box. I’d also set the anchor point of your text layer on the bottom left as well. Once you do this add the expression not before. Sorry I forgot to mention this before. This should fix the spacing issue. But let me know if it doesn’t.

    I like to use RepositionAnchorPoint for accurately changing it.
    https://aescripts.com/repositionanchorpoint/

  • Quest Rogers

    April 26, 2018 at 8:09 pm in reply to: “Glue” a layer to the end of another layer

    Is your exclamation point a shape layer?

    You should be able to do this with sourceRectAtTime. If you put the expression below on the Position node on the shape layer’s path in the Shape’s Contents. Not the position node on the layer itself. The (-your number) at the end should be the pixel measurement of your text layer’s width. If you right click on scale of any layer, select “Edit Value” then change the measurement to pixels you can find out how wide you layer is in pixels.

    You can also put this in the position node of your layer then change the x and y values to what you need. For both cases the sourceRectAtTime will automatically move your exclamation point as the text layer changes length.

    Hope this helps.

    //Put this one on the shape layer's Position node under that shapes Contents.
    x=thisComp.layer("text layer").sourceRectAtTime(time,false).width-your number;
    y= your number;
    [x,y]

    //Put this one on the layer's position node and change the x and y as needed.

    x=thisComp.layer("text").sourceRectAtTime(time,false).width+135;
    y= 310;
    [x,y]

  • Oh ok.

    I tried the alternative method you mentioned that seems to work well for me.

    thisComp.layer("Title").text.sourceText.value.replace(/,/g,"")
    This was applied to the source text of the duplicate text layer.

    h = thisComp.layer("Title Copy").sourceRectAtTime(time,false).height+13;
    w = thisComp.layer("Title").sourceRectAtTime(time,false).width+17;
    [w,h]

    This was applied to the Size of the Rectangle Path Shape layer.

    x=content("Rectangle 1").content("Rectangle Path 1").size[0];
    y=content("Rectangle 1").content("Rectangle Path 1").size[1];
    [x/2,y/2]

    And this was applied to the Position of the Rectangle Path Shape layer.

    Many thanks for your help with this Dan! Much appreciated.

  • Hi Dan!

    This is helpful. I’ll try this out in the next couple of days.

    The only issue is that I don’t want the commas removed. My job has decided to use commas for certain punctuation in lower thirds. I’m trying to see if there’s a way for the expression on the shape to parse the source text for commas and ignore them. This would keep the text layer looking centered in the shape instead of the shape getting larger at the bottom to accommodate the comma descending below everything. What do you think? Is this possible?

  • Sadly, no. I knew it was a bit of a long shot and that no one would likely reply. I searched pretty vigorously for an automated solution to this and just couldn’t find one.

Page 1 of 2

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