Forum Replies Created

Page 19 of 24
  • Scott Mcgee

    August 9, 2017 at 8:40 am in reply to: Date given + 7 or something else

    I jazzed it up a little to compensate for single and double numbers in Days and Months.

    var D = new Date(“31 September 2017”);
    var ms = D.getTime() + 7*24*3600*1000;
    var D2 = new Date(ms);
    mo = “” + (D2.getMonth()+1)
    dy = “” + D2.getDate();
    yr = D2.getFullYear();

    if (dy.length < 2) dy = “0” + dy;
    if (mo.length < 2) mo = “0” + mo
    yr + mo + dy

    But that worked a treat. Cheers for that Dan.

  • Scott Mcgee

    August 8, 2017 at 10:12 pm in reply to: Date given + 7 or something else

    At the risk of sounding stupid

    Is the date object when you write it

    new Date(Aug 08 2017)?

    I never written an expression like that before, but if that’s what you mean.

    If so… I’m stupid for not thinking that simply and secondly Could you write that using yyyymmdd, otherwise I’ll need to get the pho document changed.

    And thanks for the suggestion. I’ve spent ages searching for datestring, convert number to date etc. I did not think Date object haha

  • Scott Mcgee

    August 4, 2017 at 11:29 pm in reply to: Shape Layer Anchor Point & Scaling

    Hey Eli,

    In you image. 4 items up it says position. It’s that position you need to add the third expression.

    The position you’ve added it to disrupts the way the other two expressions cheat the anchor point to be in the top left and right corner.

  • Scott Mcgee

    August 4, 2017 at 9:02 pm in reply to: Shape Layer Anchor Point & Scaling

    Alternatively, if anyone is using cs5.5 or lower like I do at home.

    I got your method of doing it to work Eli

    If you put this expression into the shape position.

    content(“Rectangle 1”).content(“Rectangle Path 1”).size/2;

    and this, into the Transform:Rectangle AnchorPoint (not to be mistaken for the normal anchor point in transform) (I accidentally did the expression to work based on the right…Just swap it round if you want left)

    if (effect(“AnchorRight”)(“Checkbox”) == 1)
    [content(“Rectangle 1”).content(“Rectangle Path 1”).size[0],0]
    else
    [0,0]

    Then in the Transform Position add this.

    if (effect(“AnchorRight”)(“Checkbox”) == 1)
    transform.anchorPoint
    else
    [transform.anchorPoint[0]+content(“Rectangle 1”).content(“Rectangle Path 1”).size[0],transform.anchorPoint[1]]

    Essentially the top two bits are determining are cheating to find the left and right top corners, but it’s moving the shape. So the third expression is just counteracting the top to so it remains in the same spot.

  • Scott Mcgee

    August 4, 2017 at 6:11 pm in reply to: Shape Layer Anchor Point & Scaling

    Just to double check, as I’ve noticed you are using an expression in yours for how you used to cheat the anchorpoint on a shape layer pre cs6 before sourceRectAtTime was introduced.

    Do you have cs6 or above. As my expression won’t work?

    If you do…

    number 2 are you putting the position expression in the transform Position or rectangle position.

    My expression needs to go into transform, not as you have it in your example you gave.

    See if that works aswell.

  • Scott Mcgee

    August 4, 2017 at 5:52 pm in reply to: Shape Layer Anchor Point & Scaling

    I accidentally left that in from my expression I use, that might have been the reason why it wasn’t working, if it was flagging it as an error it might not work.

    So try using this again, with that line you messaged removed.


    Anchor Point:

    R = thisLayer.sourceRectAtTime(time);
    T = R.top;
    L = R.left;
    W = R.width;
    H = R.height;

    if (effect(“AnchorLeft”)(“Checkbox”)==1) [L,T] else [W/2,T]

    position:

    if (effect(“AnchorLeft”)(“Checkbox”)==1)
    [transform.position[0] – content(“Rectangle 1”).content(“Rectangle Path 1”).size[0],transform.position[1]]
    else
    [transform.position[0],transform.position[1]];

  • Scott Mcgee

    August 4, 2017 at 8:44 am in reply to: Shape Layer Anchor Point & Scaling

    I do something similar but using a sourceText rather than a checkbox, so I’m hoping the bits I’ve changed in the below expression works.

    I use the size of the shape, so if I change the size (Not scale, but I’ve not tried it with scale) and position, it should work everytime.

    anchor point:

    R = thisLayer.sourceRectAtTime(time);
    I = thisComp.layer(“[Anchor]”).text.sourceText.toLowerCase();
    T = R.top;
    L = R.left;
    W = R.width;
    H = R.height;

    if (effect(“AnchorLeft”)(“Checkbox”)==1) [L,T] else [W/2,T]

    position:

    if (effect(“AnchorLeft”)(“Checkbox”)==1)
    [transform.position[0] – content(“Rectangle 1”).content(“Rectangle Path 1”).size[0],transform.position[1]]
    else
    [transform.position[0],transform.position[1]];

  • Scott Mcgee

    July 31, 2017 at 4:45 pm in reply to: Question about dynamic comp

    You can duplicate that comp in the project window and change the duplicate that way, but you can’t duplicate within a comp and use an expression to alter it unless you use something like my method.

    I guess what you would need is something like true comp duplicator, or write your own script that will do this for you then.

  • Scott Mcgee

    July 31, 2017 at 2:21 pm in reply to: Question about dynamic comp

    Is there any reason why you can’t just use text layers (unprecomped) and duplicate the Master comp rather than precomping the text?

    Like Flash, and using Dynamic text you can do this in After Effects, if for example you are using Dynamic link or Essential Graphics when you bring it into Premiere, you can also use HTML and get it to dynamically change.

    But if you mean something in After effects that will change a text layer in a precomp that is attached to other comps. I can’t think of a method that would work like that.

    Alternatively you can time remap portions. So curvechart 1 is 15 seconds. Use an expression that references just that portion. or if you have the text set as a frame, just set it to a frame. This way you just use a slider control, I tend to add a sourcetext expression when using something like this to quick select the number. This then changes it.

    But I can’t think of anything that will change text in one comp that would be seen in another otherwise.

  • The Expressions seem fine.

    I assume you aren’t getting any errors coming back.

    Try manually moving the position of the boxes to where you want them. If you’ve added them after doing 1-3, I think that might be your issue. Parenting won’t automatically put them in the correct place. You’ll have to manually move them into the right location. All the null is doing it taking the height value to move all upwards.

    Apologies if I’ve not understood your issue if I am completely wrong…But this is what I think might be your problem. I make this mistake alot when connecting properties to a null and forgetting that the null is going to move or is still moving and wondering why my properties don’t match up.

Page 19 of 24

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