Forum Replies Created

Page 2 of 10
  • Bryan Woods

    January 12, 2017 at 12:31 am in reply to: If else loop not working in Text Source

    Interesting. So that does work, but I want to know why. Is it an order of operations thing between if/else and try{catch}, where try is processed before a typical if/else loop would?

    Thanks for the help Dan. Glad to see a familiar face still here.

  • Bryan Woods

    August 12, 2016 at 5:42 pm in reply to: Random position from index AND looping wiggle

    Ok, actually, I need a little more help. I need to be able to apply this expression to each layer thats already in a good position. The wiggle just needs to pick up from where the layer is, and I’m not getting that to work. I think this comes down to how I’m adding everything up on the last line.

    Essentially, I like the value generated from position.value+random(a,b). Now I want to initiate the wiggle from that value.

  • Bryan Woods

    August 12, 2016 at 5:20 pm in reply to: Random position from index AND looping wiggle

    Oh, wait! I think I got it. Re-reading Dan’s write-up on looping wiggle expressions, looks like I was forgetting the default values for the third and fourth spots in the wiggle() expression (1, 0.5). Adding these in make my code work! I’ve included the code below for anyone else who may want to use a randomly positioning layer in 3D space with random looping wiggle position

    seedRandom(index,true);
    s = thisComp.layer("Seed").effect("Seed")("Slider");

    xMod = thisComp.layer("Seed").effect("X_Mod")("Slider");
    yMod = thisComp.layer("Seed").effect("Y_Mod")("Slider");
    zMod = thisComp.layer("Seed").effect("Z_Mod")("Slider");

    a = [-s*xMod, -s*yMod, -s*zMod];
    b = [s, s, s];

    wigFreq = thisComp.layer("Seed").effect("WigFreq")("Slider");
    wigAmp = thisComp.layer("Seed").effect("WigAmp")("Slider");
    loopTime = 2;
    t = time % loopTime;

    wiggleX1 = wiggle(wigFreq, wigAmp, 1, 0.5, t);
    wiggleX2 = wiggle(wigFreq, wigAmp, 1, 0.5, t - loopTime);
    wiggleY1 = wiggle(wigFreq, wigAmp, 1, 0.5, t);
    wiggleY2 = wiggle(wigFreq, wigAmp, 1, 0.5, t - loopTime);
    wiggleZ1 = wiggle(wigFreq, wigAmp, 1, 0.5, t);
    wiggleZ2 = wiggle(wigFreq, wigAmp, 1, 0.5, t - loopTime);
    X=linear(t, 0, loopTime, wiggleX1, wiggleX2)[0];
    Y=linear(t, 0, loopTime, wiggleY1, wiggleY2)[1];
    Z=linear(t, 0, loopTime, wiggleZ1, wiggleZ2)[2];

    position.value + random(a,b)+[X,Y,Z];

  • Bryan Woods

    March 9, 2016 at 10:33 pm in reply to: Scale selected comps, overwrite selected comps

    Ah, super helpful. Thanks Dan.

    For anyone interested, here is my script. It will take all selected comps, and scale them by the factor you set, and re-center the layers in them. Simple, but strangely I couldn’t find anyone else who made something like this that worked for more than one selected comp.

    Copy and paste the below into a new text document, with a .jsx extension and throw into your AE scripts folder:

    //prompt percentage and set selections
    var percent = prompt("Resize factor (percentage):","200");
    var mySelection = app.project.selection;
    app.beginUndoGroup("scaleSelectedComps.jsx");

    //for every comp selected, set resolution based on percent value from user
    for (var i = 0; i < mySelection.length; i++){
    if (mySelection[i] instanceof CompItem){
    mySelection[i].width = Math.round(mySelection[i].width * percent/100);
    mySelection[i].height = Math.round(mySelection[i].height* percent/100);
    curComp = mySelection[i];

    //for each layer within each selected comp, scale and re-center based on percent value from user
    for (var b = 1; b <= curComp.numLayers; b++){
    var curLayer = curComp.layer(b);
    curLayer.scale.setValue([percent,percent]);
    curLayer.position.setValue([curComp.width/2,curComp.height/2]);
    }
    }
    }
    app.endUndoGroup();
    //done! :)

  • Bryan Woods

    March 8, 2016 at 12:34 am in reply to: Scale selected comps, overwrite selected comps

    Ok, I’ve gone in and rewritten it a little bit, but I’m getting an error at line 12: “Undefined is not an object”. Not sure if I’m missing the correct syntax for scaling or what.

    var percent = prompt("Resize factor (percentage):","50");
    var mySelection = app.project.selection;
    app.beginUndoGroup("scaleSelectedComps.jsx");
    for (var i = 0; i < mySelection.length; i++){
    if (mySelection[i] instanceof CompItem){

    mySelection[i].width = Math.round(mySelection[i].width * percent/100);
    mySelection[i].height = Math.round(mySelection[i].height* percent/100);
    curComp = mySelection[i];
    for (var b = 0; b <= curComp.numLayers; b++){
    var curLayer = curComp.layer[b];
    curLayer.scale.setValue([percent,percent]); //this is where the error is
    }
    }
    }
    app.endUndoGroup();

  • Bryan Woods

    March 7, 2016 at 10:19 pm in reply to: Scale selected comps, overwrite selected comps

    Ah, you’re right. I didn’t take a very close look at it from the AEenhancer’s forum.

  • Bryan Woods

    March 3, 2016 at 12:35 am in reply to: Scale layer based on another object’s position

    Ah, I should have been more specific then. Rectangle is a shape layer with its anchor positioned to middle left. The object is also another shape layer.

  • Bryan Woods

    March 2, 2016 at 10:39 pm in reply to: Scale layer based on another object’s position

    Hmm, not quite. As I pull object out, rectangle scales, but at a slower rate than object. Ideally the scale of rectangle should be that the edge of rectangle looks like its attached to object as its pulled out.

  • Bryan Woods

    October 4, 2015 at 9:24 pm in reply to: Render rectilinear from AE 3D camera

    Hi Fabio. I’ve scrapped my project unfortunately. However, the good news is someone has made a plugin for working with 360 video in AE! Check it out here:
    https://forums.creativecow.net/thread/2/1064966

  • Bryan Woods

    October 4, 2015 at 3:26 pm in reply to: Javascript: path.join variable strings?

    I guess I’m just not following what you mean by the URI. If I used this code:

    var textFolder = Folder.selectDialog();
    var textName = "filename.txt";
    var textFilePath = textFolder.path + "/" + textFolder.name + "/" + escape(textName);

    You mean to tell me that those “/” that you have in there manually will be put in correctly based on the OS? So if I’m on a PC and run this script, i’d get “\” instead?

Page 2 of 10

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