Forum Replies Created

Page 1055 of 1081
  • Dan Ebberts

    September 27, 2005 at 9:57 pm in reply to: Scripting Loops

    >on the call to the seedRandom what exactly are index and true flagging?

    “index” is the actual seed, “true” says to make it timeless (i.e. random values will persist from frame to frame)

    >can I change the 2 and 3 in 2*Math.sin(time*freq*Math.PI*2 + phase) + 3 to variables?

    Sure.

    >And do you not need a semicolon after each expression?

    It’s optional on the last line. It’s really optional on most lines – it’s just safer (and good practice) to put it in.

    Dan

  • Dan Ebberts

    September 27, 2005 at 9:51 pm in reply to: layer visibility expression

    You’d have to do it with a script. Expressions don’t have write access to the “eyeball”.

    Dan

  • Dan Ebberts

    September 27, 2005 at 9:51 pm in reply to: layer visibility expression

    You’d have to do it with a script. Expressions don’t have write access to the “eyeball”.

    Dan

  • Dan Ebberts

    September 27, 2005 at 9:34 pm in reply to: layer visibility expression

    Assumint the null is in another comp (Comp 1), the opacity expression for a layer in Comp 2 would look like this:

    if(comp(“Comp 1”).layer(“Null 1”).effect(“Checkbox Control”)(“Checkbox”) == 1) 100 else 0

    Dan

  • Dan Ebberts

    September 27, 2005 at 9:34 pm in reply to: layer visibility expression

    Assumint the null is in another comp (Comp 1), the opacity expression for a layer in Comp 2 would look like this:

    if(comp(“Comp 1”).layer(“Null 1”).effect(“Checkbox Control”)(“Checkbox”) == 1) 100 else 0

    Dan

  • Dan Ebberts

    September 27, 2005 at 9:27 pm in reply to: Scripting Loops

    Well, you could probably set up an expression for a slider that other layers could use to control their cycling, but I think it would be easier to apply an expression like this to the blur of each layer:

    seedRandom(index,true)
    phase = random(Math.PI*2);
    freq = 1.0;
    2*Math.sin(time*freq*Math.PI*2 + phase) + 3

    Especially if you can just duplicate the first layer to get the effect you want (each copy will pulse at a different time).

    Dan

  • Dan Ebberts

    September 27, 2005 at 9:27 pm in reply to: Scripting Loops

    Well, you could probably set up an expression for a slider that other layers could use to control their cycling, but I think it would be easier to apply an expression like this to the blur of each layer:

    seedRandom(index,true)
    phase = random(Math.PI*2);
    freq = 1.0;
    2*Math.sin(time*freq*Math.PI*2 + phase) + 3

    Especially if you can just duplicate the first layer to get the effect you want (each copy will pulse at a different time).

    Dan

  • Dan Ebberts

    September 27, 2005 at 4:07 pm in reply to: Looping time Remap with Expressions

    I think we need more info. Is your pre-comp the same length as the comp it’s nested in? If so, you have to set some keyframes around the area you want to loop and delete the last one that AE added when you turned on time remapping.

    If your pre-comp is shorter than your main comp and you want to loop the entire pre-comp, after you enable time remapping you have to extend the duration of the pre-comp with the little slider gizmo, set a keyframe at one frame before the last keyframe that AE added and change the value of the last keyframe to zero to get a perfect loop. I’m assuming you’re using the “cycle” flavor of loopOut().

    Dan

  • Dan Ebberts

    September 27, 2005 at 4:07 pm in reply to: Looping time Remap with Expressions

    I think we need more info. Is your pre-comp the same length as the comp it’s nested in? If so, you have to set some keyframes around the area you want to loop and delete the last one that AE added when you turned on time remapping.

    If your pre-comp is shorter than your main comp and you want to loop the entire pre-comp, after you enable time remapping you have to extend the duration of the pre-comp with the little slider gizmo, set a keyframe at one frame before the last keyframe that AE added and change the value of the last keyframe to zero to get a perfect loop. I’m assuming you’re using the “cycle” flavor of loopOut().

    Dan

  • Dan Ebberts

    September 27, 2005 at 12:46 am in reply to: A Script to access Sourcetext

    I haven’t tested this stuff, so there may be errors, but basically it’s like this. Finding a specific comp in the project window is kind of clunky, but you can do it like this:

    var compName = “xxxx”; //comp name goes here
    var myProject = app.project;
    var n = myProject.numItems;
    var foundIt = false;
    var i;
    for (i=1; i<=n; i++){ if (myProject.item(i).name == compName){ var myComp = myProject.item(i); break; } } Finding a layer in a comp is pretty much the way you do it in expressions: var layerName = "yyyy"; //layer name goes here var myLayer = myComp.layer(layerName); Getting the length of a layer's source text would look like this: var mySourceText = myLayer.text.sourceText; var mySourceTextLen = mySourceText.len; Hope that's helpful. Dan

Page 1055 of 1081

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