Forum Replies Created

Page 971 of 1081
  • Dan Ebberts

    June 21, 2007 at 12:53 am in reply to: since i dont think we can script the swap…

    In CS3 .replaceSource() provides the Opt/Alt drag functionality.

    For previous versions, assuming your comp is active, the new footage is selected in the project window, and there is already a layer in your comp named “parent”, this should work:

    var myProject = app.project;
    var myComp = myProject.activeItem;
    var myNewLayer = myComp.layers.add(myProject.selection[0]);
    myNewLayer.threeDLayer = true;
    myNewLayer.parent = myComp.layer(“parent”);

    Dan

  • Dan Ebberts

    June 20, 2007 at 2:01 am in reply to: How many letters in a word?

    Is this what you mean?

    thisComp.layer(“test text”).text.sourceText.length

    Dan

  • Dan Ebberts

    June 19, 2007 at 9:43 pm in reply to: Problem using toComp() with Point of Interest

    There’s probably a simpler way to do it, but this seems to work:

    L = thisComp.layer(“Spot”);
    fromComp(L.toComp(L.fromWorld(L.pointOfInterest)))

    Dan

  • I think you have to add 90 degrees to get it to work right with the directional blur filter:

    P1 = [0,0];
    P2 = [10,10];

    delta = P2 – P1;
    90 + radiansToDegrees(Math.atan2(delta[1],delta[0]));

    Dan

  • Yup. Try this:

    P1 = [0,0];
    P2 = [10,10];

    delta = P2 – P1;
    radiansToDegrees(Math.atan2(delta[1],delta[0]));

    Dan

  • I don’t think you’ve provided nearly enough information. You can’t just convert pixels to degrees without a point of reference. Is the reference point the camera? So you have a point that is moving in 3D space from one frame to the next and you want to caluclate how much you have to rotate the camera to track it, is that correct? If so, why not just attach the camera’s POI to the point? What are you trying to do, exactly? 🙂

    Dan

  • Dan Ebberts

    June 16, 2007 at 6:21 am in reply to: random on off, flicker too fast

    This seems to work:

    minOnTime = .5;
    maxOnTime = 2.0;
    minOffTime = .5;
    maxOffTime = 1.5;

    i = 0;
    tEnd = 0;
    seedRandom(index,true);

    preRun = random(maxOnTime);
    while (time + preRun >= tEnd){
    i++;
    if(i%2){
    tEnd += random(minOnTime,maxOnTime);
    result = 100;
    }else{
    tEnd += random(minOffTime,maxOffTime);
    result = 0;
    }
    }
    result

    Dan

  • Dan Ebberts

    June 15, 2007 at 12:59 am in reply to: working metrenome for preview/renders?

    Enable time remapping on your click layer and try this expression:

    freq = 120; // beats per minute

    t = 60/freq;
    time%t

    Your click needs to occur at the start of the layer. Sounds pretty funky if you use something other than a simple click.

    Dan

  • Dan Ebberts

    June 10, 2007 at 12:37 am in reply to: inverse kinematics update

    Thanks Mike. It’s always a good idea to keep Bigfoot happy.

    Dan

  • Dan Ebberts

    June 9, 2007 at 1:05 pm in reply to: Odd/Even Markers

    The next-to-last line basically says if there are any markers AND the previous marker index is an even number, flip the sign of variable a.

    The test for odd/even is made by using the JavaScript modulus operator “%”. This operator gives you the remainder of a division operation. So, use you can use %2 to find out if an integer is odd or even.

    0%2 = 0
    1%2 = 1
    2%2 = 0
    3%2 = 1
    4%2 = 0

    etc.

    Dan

Page 971 of 1081

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