Forum Replies Created

Page 22 of 1081
  • I believe all the style stuff requires the JavaScript engine. I don’t know of a good work around (other than scaling).

  • Dan Ebberts

    May 29, 2024 at 2:44 am in reply to: Natural Type-On Expression

    Sorry, not able to see the code you’re talking about.

  • Here’s another version that puts indents for each level of nested comps:

    function test(){
    var names = [];
    function getNames(theComp, thePrefix){
    for (var i = 1; i <= theComp.numLayers; i++){
    names.push(thePrefix + theComp.layer(i).name);
    if (theComp.layer(i).source instanceof CompItem){
    getNames(theComp.layer(i).source, thePrefix+" ");
    }
    }
    }
    var comp = app.project.activeItem;
    if (! comp || ! (comp instanceof CompItem)){
    alert("No comp active.");
    return;
    }
    getNames(comp,"");
    alert(names.join("\r"));
    }
    test();
  • I’m still not clear on exactly how you want the names formatted, but this simple script will pop up an alert that lists all the layer names (and those of any sub comps) in the selected comp:

    function test(){
    var names = [];
    function getNames(theComp){
    for (var i = 1; i <= theComp.numLayers; i++){
    names.push(theComp.layer(i).name);
    if (theComp.layer(i).source instanceof CompItem){
    getNames(theComp.layer(i).source);
    }
    }
    }
    var comp = app.project.activeItem;
    if (! comp || ! (comp instanceof CompItem)){
    alert("No comp active.");
    return;
    }
    getNames(comp);
    alert(names.join("\r"));
    }
    test()
  • Certainly possible, but one question is what you want to do with the information. If you’re talking about a script, I guess it could write it to a text file. Is that what you’re picturing?

  • What do you mean by “list”? And are you talking about an expression or a script?

  • I think it would be like this for the x position:

    L1 = comp("rappeller").layer("man hand lf");
    p1 = L1.toComp(L1.anchorPoint);
    L2 = thisComp.layer("rappeller");
    p2 = L2.toComp(p1);
    p2[0]
  • Like this, probably:

    y = thisComp.layer("RED RECTANGLE").transform.position[1];
    n = linear(y,100,610,18,0);
    n.toFixed(1) + "X"
  • It’s tricky, and a little complicated, but this example might help. It assumes that 4 text layers are participating and that they are layers 1 through 4 in your layer stack. They’ll be positioned in y in the order of their layer index (layer 1 on top), with the center of the visible layers positioned and mid y point in the comp. It should adjust for any layers that have no text.

    margin = 20;
    above = 0;
    below = 0;
    r = sourceRectAtTime(time);
    myH = r.height;
    for (i = 1; i <= 4; i++){
    if (i == index) continue; // skip own layer
    h = thisComp.layer(i).sourceRectAtTime(time).height;
    if (i < index){
    if (h > 0) above += h + margin;
    }else{
    if (h > 0) below += margin + h;
    }
    }
    tot = above + myH + below;
    mid = tot/2;
    myMid = above + myH/2;
    deltaY = mid - myMid;
    currentY = value[1] + r.top +r.height/2;
    targetY = thisComp.height/2 - deltaY;
    value + [0,targetY - currentY]
  • Dan Ebberts

    May 16, 2024 at 7:38 pm in reply to: How to Transform/Skew Effect

    Have you tried adding the Transform effect, after Ripple? It has controls for Skew and Skew Axis.

Page 22 of 1081

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