Typo in JSON import script reconstructing POST/PRE loops
Posted: 05 Dec 2023, 22:37
Hello!
I was just JSON-importing animation with some loops set via POST behaviour into After Effects and got error message:
"Error: property or method named 'tend' in Class 'global' is missing or does not exist. (...)"
The whole expression was:
So from context I think the tend there should be replaced with tend_post.
At least for me that worked.
The line in question in the script version 6.0.0 with this bug is 1431.
// Otherwise I really appreciate this updated script with the progress-bar and status of importing layers, it's a big help! Thanks.
I was just JSON-importing animation with some loops set via POST behaviour into After Effects and got error message:
"Error: property or method named 'tend' in Class 'global' is missing or does not exist. (...)"
The whole expression was:
Code: Select all
lastkeyduration = 2;
epsilon = 0.001;
tval = time;
tstart = key(1).time;
tend_pre = key(numKeys).time + lastkeyduration * thisComp.frameDuration + epsilon;
tend_post = key(numKeys).time + lastkeyduration * thisComp.frameDuration - epsilon;
if (tval < tstart )
{
tspan = tend_pre - tstart;
while( tval < tstart )
tval += tspan;
}
else if( tval > tend_post )
{
tspan = tend_post - tstart
while( tval > tend )
tval -= tspan;
}
valueAtTime( tval )
At least for me that worked.
The line in question in the script version 6.0.0 with this bug is 1431.
// Otherwise I really appreciate this updated script with the progress-bar and status of importing layers, it's a big help! Thanks.