Forum Replies Created

Page 1003 of 1081
  • Dan Ebberts

    September 25, 2006 at 8:16 pm in reply to: scripting question…

    I think you get the layer time like this:

    var myComp = app.project.activeItem;
    var myLayer = myComp.selectedLayers[0];
    var myCurrTime = myLayer.time;

    and do this to get the layer with the suffix:

    var suffix = “_active”;
    var myNewLayer = myComp.layer(myLayer.name + suffix);

    Not tested, but should be close.

    Dan

  • Dan Ebberts

    September 25, 2006 at 12:35 am in reply to: Creating and Editing Expression Controls using Scripts

    You have to build the text for the expression. Something like this:

    
    var myEffect = myLayer.Effect.addProperty("ADBE Slider Control");
    var myExpr = "amp = effect(1)("Slider");" + "\r" +
                 "freq = effect(2)("Slider");" + "\r" +
                 "x =    ... etc.           ;";
    
    myLayer.property("position").expression = myExpr;
    

    Sorry – I haven’t tested it but it should give you the idea.

    Dan

  • Dan Ebberts

    September 25, 2006 at 12:35 am in reply to: Creating and Editing Expression Controls using Scripts

    You have to build the text for the expression. Something like this:

    
    var myEffect = myLayer.Effect.addProperty("ADBE Slider Control");
    var myExpr = "amp = effect(1)("Slider");" + "\r" +
                 "freq = effect(2)("Slider");" + "\r" +
                 "x =    ... etc.           ;";
    
    myLayer.property("position").expression = myExpr;
    

    Sorry – I haven’t tested it but it should give you the idea.

    Dan

  • Dan Ebberts

    September 23, 2006 at 10:06 pm in reply to: Dan, how do I create a Camera in a script?

    Like this:

    app.project.activeItem.layers.addCamera(name, centerPoint);

    Dan

  • Dan Ebberts

    September 20, 2006 at 8:15 pm in reply to: control the velocity with expressions

    I can’t see any easy way to do it. It would be a completely different algorithm. The current algorithm is based on picking a random target position and it’s easy for the expression to make sure that it’s within the boundaries of the comp. What you’re talking about sounds like picking a random direction and since the expression doesn’t know how long it’s going to be moving in that direction, it can’t guarantee that the object stays within the comp.

    I’m sure it’s solvable, but unfortunately, I don’t have time to do it.

    Dan

  • Dan Ebberts

    September 20, 2006 at 8:15 pm in reply to: control the velocity with expressions

    I can’t see any easy way to do it. It would be a completely different algorithm. The current algorithm is based on picking a random target position and it’s easy for the expression to make sure that it’s within the boundaries of the comp. What you’re talking about sounds like picking a random direction and since the expression doesn’t know how long it’s going to be moving in that direction, it can’t guarantee that the object stays within the comp.

    I’m sure it’s solvable, but unfortunately, I don’t have time to do it.

    Dan

  • Dan Ebberts

    September 20, 2006 at 4:56 pm in reply to: why oh why the precomps?!?

    I guess it depends on your workflow. I would use it all the time. Now (with AE 7) that you can just hit the grave accent key and fill your screen(s) with the timeline, pick whipping from comp to comp, for example, would be a breeze.

    Dan

  • Dan Ebberts

    September 20, 2006 at 2:34 pm in reply to: why oh why the precomps?!?

    I think the point that the original poster is making is a valid one. There’s no question that it would be way cool if you could twirl open a nested comp and manipulate the layers inside, while still in the top-level comp. It wouldn’t change the functionality of nesting/precomping at all – just give you the ability to not have to jump from comp to comp to make adjustments.

    Dan

  • Actually, I couldn’t remember where delay came from (I thought it might be a slider on a null or something). I just knew it wasn’t included in the expression you originallly posted so I took it out assuming you would match the new piece up with whatever defined delay. Maybe I could have mentioned that.

    🙂

    Dan

  • Actually, I couldn’t remember where delay came from (I thought it might be a slider on a null or something). I just knew it wasn’t included in the expression you originallly posted so I took it out assuming you would match the new piece up with whatever defined delay. Maybe I could have mentioned that.

    🙂

    Dan

Page 1003 of 1081

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