Forum Replies Created

  • Peter Stone

    May 11, 2015 at 10:25 pm in reply to: Overwrite Named View

    Found an odd but usable workaround, If you add new layers and want them to remain off in previously named views, first save a new view with all of the new layers turned off. Then, make any new views with the new layers. If you save a view with a new layer on, that new layer is automatically turned on in all previously saved views.

    Is there a way to use saved views in scripting? Id like to be able to export each named view as a PNG, so how could I edit something like the exporting script linked below to use named views instead of artboards?

    https://www.ericson.net/content/2011/06/export-illustrator-layers-andor-artboards-as-pngs-and-pdfs/comment-page-4/#comment-1502871

  • Peter Stone

    May 7, 2015 at 8:25 pm in reply to: Embed Number (or text) in a stroke

    You should be able to do this with a pattern brush, but you will have to expand the text first so that it is a vector shape, not adjustable text. Select text, Object>Expand, then make brush.

  • Peter Stone

    July 30, 2014 at 5:27 pm in reply to: Reference this comp name in expression

    Perfect, Thanks

  • Peter Stone

    July 30, 2014 at 2:40 am in reply to: Transform Shape Layers and Offset Paths

    Its still the same issue if I try the layer order with the transform below offset and round corner. AE renders shapes from the bottom up right, so shouldnt this apply the transform to my path, then offset it and then round it? What is going on?

  • Peter Stone

    July 28, 2014 at 6:10 am in reply to: Randomize Layer Order

    I am not sure how to actually implement this. Here is what I am looking for: I have an shape layer from a “create shapes from vector layer,” This leaves me with 1 shape layer with a few hundred groups in contents each with a path and a fill. I want each fill/path to appear in a random order- Either a by a trim paths animator set to individual, or better yet by with an opacity slider where each fill/path group fades in in sequence. I think I am stuck with a trim paths animator as long as all the paths stay in a single shape layer.

    My first work around was to use the explode shape layer script here- https://aescripts.com/explode-shape-layer/, then precomp all the resultant shape layers, and use your code (below) to randomize layer order in the precomp, and then randomize the layer InPoints (I hadnt worked that one out yet). However, the randomize layer order runs out of memory on my computer for very large numbers of shape layers, and its a messy method because I have deal with anchor point transformations from the explode-shape-layer script.

    I think it would be much cleaner if I can randomize the order of groups within the shape layer without exploding it, then use trim paths. A bonus would be to instead put a 0 to 100 opacity keyframe on each group at random time within my comp length- obviously the 0 opacity keyframe would have to always come first, and I could adjust the total completion time by adjusting the length of the comp.

    Much appreciation for any help

    {
    var myComp = app.project.activeItem;
    var n = myComp.numLayers;
    var myLayers = [];
    var myIdx = [];
    for (var i = 1; i<= n; i++){
    myIdx[i-1] = i;
    myLayers[i-1] = myComp.layer(i);
    }

    var idx;
    var temp;
    for (var i = 0; i < myIdx.length; i++){
    idx = i + Math.floor(Math.random()*(myIdx.length - i));
    temp = myIdx[i];
    myIdx[i] = myIdx[idx];
    myIdx[idx] = temp;
    }
    for (var i = 0; i < myIdx.length; i++){
    myLayers[myIdx[i]-1].moveToBeginning();
    }
    }

  • Peter Stone

    July 25, 2014 at 9:03 am in reply to: Pickwhip a Rate of Change/position Derivative

    Should have guessed, that makes sense. Thanks!

  • Peter Stone

    July 25, 2014 at 8:59 am in reply to: Randomize Layer Order

    How would I use this to randomize the order of groups within the contents of a shape layer instead of layers within a comp? Seems like it should be the same principle but I am new to scripting.

    Thanks,
    Peter

    {
    var myComp = app.project.activeItem;
    var n = myComp.numLayers;
    var myLayers = [];
    var myIdx = [];
    for (var i = 1; i<= n; i++){
    myIdx[i-1] = i;
    myLayers[i-1] = myComp.layer(i);
    }

    var idx;
    var temp;
    for (var i = 0; i < myIdx.length; i++){
    idx = i + Math.floor(Math.random()*(myIdx.length – i));
    temp = myIdx[i];
    myIdx[i] = myIdx[idx];
    myIdx[idx] = temp;
    }
    for (var i = 0; i < myIdx.length; i++){
    myLayers[myIdx[i]-1].moveToBeginning();
    }
    }

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