Forum Replies Created

Page 55 of 1081
  • What are you trying to accomplish with the expression?

  • Dan Ebberts

    February 16, 2023 at 8:23 pm in reply to: Сount the number of words in a text

    How about this:

    txt=text.sourceText.value;
    valAry = txt.replace(/\s+$/g,"").split(" ");
    valAry.length
  • Dan Ebberts

    February 16, 2023 at 4:18 pm in reply to: createPath in 3D space.

    The 5th line should be:

    a.push(fromComp(L.toComp(L.anchorPoint)));
  • Dan Ebberts

    February 16, 2023 at 2:05 pm in reply to: createPath in 3D space.

    I haven’t had a chance to test this, so there may be typos, but something like this I think:

    a = [];
    for ( i = 1; i <= thisComp.numLayers; i++){
    L = thisComp.layer(i);
    if (L.name.substr(0,4) == "smet"){
    a.push(fromComp(L.toComp(L.anchorPoint)));
    }
    }
    createPath(a,[],[],false)
  • Dan Ebberts

    February 15, 2023 at 10:41 pm in reply to: Pseudo Effects cross-compatibility

    Not if you use the “Pseudo/” prefix in your matchname.

  • There’s always Animation > Keyframe Assistant > Convert Expression to Keyframes (after selecting the property with the expression).

  • Do your markers have comments? It won’t generate a key for a marker without a comment. Also, you’re using layer markers, not comp markers, correct?

  • Something like this, probably:

    function markersToKeyframes(){
    var myComp = app.project.activeItem;
    if (myComp == null || ! (myComp instanceof CompItem)){
    alert ("No comp active.");
    return;
    }
    if (myComp.selectedLayers.length == 0){
    alert ("No layer selected.");
    return;
    }
    var myLayer = myComp.selectedLayers[0];
    if ( ! (myLayer instanceof TextLayer)){
    alert ("Selected layer is not a text layer.");
    return;
    }
    var mySourceText = myLayer.property("ADBE Text Properties").property("ADBE Text Document");
    var myTextDoc = mySourceText.value;
    var myMarker = myLayer.property("Marker");
    var myMarkerVal = new MarkerValue("");
    var myMarkerTime;
    for (var i = 1; i <= myMarker.numKeys; i ++){
    myMarkerVal = myMarker.keyValue(i);
    myMarkerTime = myMarker.keyTime(i);
    myTextDoc.text = myMarkerVal.comment;
    if (myTextDoc.text == "") continue;
    mySourceText.setValueAtTime(myMarkerTime,myTextDoc)
    }
    }
    markersToKeyframes();
  • Dan Ebberts

    February 14, 2023 at 1:57 pm in reply to: Increment value
  • Dan Ebberts

    February 14, 2023 at 7:02 am in reply to: Consecutive Interpolation expressions

    I haven’t figured out exactly what it’s doing, but it seems that you would want to replace this:

    if (valueAtTime(time)!=clickBase) {

    with this:

    if (time < clickPoint) {
Page 55 of 1081

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