Forum Replies Created

Page 10 of 11
  • Miguel De mendoza

    October 28, 2015 at 9:47 am in reply to: Reeplace content of a layer

    You can’t access to comp by name directly, you must do it by index or by writing a findComp function like this:

    function findComp(compName){
    var proj = app.project;

    for(var i = 1; i <= proj.numItems; i++){
    var comp = proj.item(i);
    if(!(comp instanceof CompItem) || comp.name != compName){
    continue;
    }
    else {
    return comp;
    }
    }
    }

    Other problem is that you only have one layer on your comp, so you can`t acces layer[2]. In layers case, you can acces layer by name. You can write this bellow findComp function:

    var myComp = findComp("Text 01");
    myComp.layer("Layer 1").text.sourceText.setValue( "Your value");

  • Miguel De mendoza

    October 21, 2015 at 10:19 pm in reply to: Control Layer Length With Null or Slider

    If what you want is to change the layer duration or shy option, you can’t do it by expressions, because that properties are some kind of “static” properties. Some aproach to achieve that by expressions, may be pulling opacity down, at the master layer duration time.
    If you want to control shy or duration attributes directly, you must make it by script.

  • Miguel De mendoza

    September 11, 2015 at 11:37 am in reply to: Get position on timeline from other comp

    Yes, but no complex math here, just add startTime value to the times you want to control.

  • Miguel De mendoza

    September 11, 2015 at 10:52 am in reply to: Get position on timeline from other comp

    You must route a concrete instance of the animation comp:
    comp("Main Timeline").layer("AnimationComp").startTime

  • Miguel De mendoza

    September 11, 2015 at 10:36 am in reply to: Move nearby objects when an object expands

    Try this:

    leadPos = thisComp.layer("leadObj").transform.position[1];
    leadSize = thisComp.layer("leadObj").height * (thisComp.layer("leadObj").transform.scale[1]/100);
    selfSize = height *(scale[1]/100);
    offset = 100;
    if(index &lt; thisComp.layer("leadObj").index){
    y = leadPos - leadSize/ 2 - selfSize/2 - offset;
    }
    else{
    y = leadPos + leadSize/ 2+ selfSize/2 + offset;
    }
    [value[0], y];

  • Assuming that you cant’t stack the diferent track tasks in a for loop, maybe, you can check if numKeys attribute from one of the keyed properties, of the Motion Traker property, is equal to the clip number of frames. If it’s equal, do the next track.

    Edit: I missread you’re using 3d Camera tracker. If you acces “ADBE 3D Tracker-0011″(by index: 2) property on the camera tracker, the name will be updating while analizing: “2%(frame x of n”). It seems that the info behind the name is hidden, so maybe using a timer to start checking the name of this property until its an empty string or the % is 100 can work.

  • Miguel De mendoza

    September 8, 2015 at 12:35 pm in reply to: Opacity relative to Proximity

    Try this expression on the opacity:

    pivot1 = thisComp.layer("Null 1").transform.position;
    pivot2 = thisComp.layer("Null 2").transform.position;
    vector = pivot2 - pivot1;
    vLength = Math.sqrt(vector[0]*vector[0] + vector[1]*vector[1] )
    limit = 500;

    if(vLength > limit) {
    v = 100;
    } else {

    v = vLength /( limit/100)
    }

    value - v;

  • Miguel De mendoza

    September 7, 2015 at 4:29 pm in reply to: Scripted animation triggered by the comp marker

    Start here: https://motionscript.com/design-guide/marker-sync.html. If you want to use interpolation functions many times, check this: https://forums.creativecow.net/thread/227/30494.
    If you only want to make one linear on one property controlled by markers you can write this:

    t1 = marker.key(1).time; // If the marker is on other layer : comp("xxx").layer("xxx").marker....
    t2 = marker.key(2).time;
    startPoint = [x, y];
    endPoint = [x1, y1];
    linear(time, t1, t2, startPoint, endPoint );

  • Miguel De mendoza

    September 7, 2015 at 4:14 pm in reply to: Distort Offset isssues

    This happens beacuse the Offset space is diferent than the layer space. Check “Layer Space Transforms methods” section from there :https://helpx.adobe.com/after-effects/using/expression-language-reference.html, “toWorld()” function.
    Anyway, you dont need to use an Offset before the CC Sphere to offset the map, use CC Sphere and then, change the rotation of the sphere.

  • Wow! That’s awesome! I looks pretty good. I have an overflowed week so I will paly arround with it this weekend. Thanks for help Xavier!

Page 10 of 11

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