Skip to main content
Participating Frequently
January 9, 2022
Question

Error when using valueAtTime on a trim path end

  • January 9, 2022
  • 2 replies
  • 360 views

Hi,

 

I have about 100 shape layers that I want a trim path on, and for them to be offset by x amount over time so the first starts, then the next follows and so on. Whilst I could keyframe this and then sequence the layers, it becomes a big faff if I want to change the delay amount. I'm using:

Adobe After Effects 8.0 Keyframe Data
 
var tP = thisComp.layer(index-1).content("Trim Paths 1").end;      //a 'leader' shape layer above
var d = thisComp.layer("Controller").effect("Time displacement")("Slider");    //a slider on a null
 
tP.valueAtTime(time-d);
 
I'm getting 'add() needs 2 arguments on the first line. and AE seems ok with it someimtes, and not at others. I can sometimes scrub through and see the value change as expected, but not the image, sometimes it just gives up.  What is happening?  Any input greatly appreciated, thanks!

 

    This topic has been closed for replies.

    2 replies

    Mylenium
    Legend
    January 9, 2022

    Drill into the layer and shape grouzps. quite likely you are simply seeing a repeat on the automatic numbering somewhere when it goes past 99.

     

    Mylenium

    Participating Frequently
    January 9, 2022

    perhaps I should add im using AE 2021

    Participating Frequently
    January 9, 2022

    And an update to the mystery.... The expression works fine if a manually copy/paste in to each shape individually, until i get to the last 3 layers - shapes 1,2,3, or layer 103-105. And the 'leader' is layer 2, the first layer is layer 3. or "shape 103",. coincedence, or some sort of circular number game happening in AE?