Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Returning Non Fixed Text Field Height

  • Dan Ebberts

    January 5, 2011 at 11:24 pm

    Not directly. You can use this sampleImage() hack to get it though:


    L = thisComp.layer("Your Text Layer");
    for (i = 0; i <= thisComp.height; i++){
    temp = L.sampleImage([thisComp.width/2,i],[thisComp.width/2,0.5],true,time);
    if (temp[3] > 0){
    top = i;
    break;
    }
    }
    for (i = thisComp.height; i >= 0; i--){
    temp = L.sampleImage([thisComp.width/2,i],[thisComp.width/2,0.5],true,time);
    if (temp[3] > 0){
    bottom = i;
    break;
    }
    }
    bottom - top

    Dan

  • Jonathan Reyes

    January 6, 2011 at 2:16 pm

    thanks! i’ll give it a shot

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