Skip to main content
Inspiring
June 22, 2015
Question

Is Property.valueAtTime(time,false) broken in CC2015?

  • June 22, 2015
  • 1 reply
  • 622 views

It seems Property.valueAtTime(time,false) in CC2015 does not always evaluate expressions...

Has anyone else noticed that, is it a known bug, and is there a workaround?

This topic has been closed for replies.

1 reply

nicoDudufAuthor
Inspiring
June 22, 2015

Here's my current workaround:

comp.time = time; //force AE to eval the expression

$.sleep(1000); //Let AE have enough time to compute..... You'll have to know how long the evaluation takes to sleep long enough

Property.valueAtTime(time,false); //now it works

That's the best way I found......

Dan Ebberts
Community Expert
Community Expert
June 22, 2015

What's the specific expression? I'd like to try it here.

Dan

nicoDudufAuthor
Inspiring
June 22, 2015

It is an expression used in a color control, used to detect the animation exposure of the footage. Once the expression has been added, the script checks each frame (using valueAtTime) to see if the value of the property has changed and thus detects the exposure.

var numSamplesX = 10;

var numSamplesY = 10;

var precision = 0.5;

var result = [0,0,0,0];

for ( i = 1 ; i <= numSamplesX ; i++)

for (j = 1 ; j <= numSamplesY ; j++)

result = result + sampleImage([i*(width/numSamplesX)-(width/numSamplesX/2),j*(height/numSamplesY)-(height/numSamplesY/2)],[width/2/numSamplesX*precision,height/2/numSamplesY*precision]);

result = result/(numSamplesX+numSamplesY);

result;

It works well with CC2014 and CS6, but CC2015 does not evaluate the expression if the frame has not been rendered yet.

I noticed the same issue with other expressions...