Page 1 of 1

Typo in JSON import script reconstructing POST/PRE loops

Posted: 05 Dec 2023, 22:37
by maara_p
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:

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 )
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.

Re: Typo in JSON import script reconstructing POST/PRE loops

Posted: 06 Dec 2023, 09:12
by Matthieu
Hello,

Thank you for reporting this! This declaration is incorrect, indeed. We will update the current script and bundle it with the installer.

Re: Typo in JSON import script reconstructing POST/PRE loops

Posted: 06 Dec 2023, 17:48
by maara_p
Matthieu wrote: 06 Dec 2023, 09:12 We will update the current script and bundle it with the installer.
Great! Is there a place on TVP website/forum that I can follow to learn that a new update is out?

Re: Typo in JSON import script reconstructing POST/PRE loops

Posted: 06 Dec 2023, 22:59
by D.T. Nethery
maara_p wrote: 06 Dec 2023, 17:48
Matthieu wrote: 06 Dec 2023, 09:12 We will update the current script and bundle it with the installer.
Great! Is there a place on TVP website/forum that I can follow to learn that a new update is out?
Under the HELP menu you can Check For Updates.
Screen Shot 2023-12-06 at 5.57.46 PM.png
Screen Shot 2023-12-06 at 5.57.46 PM.png (91.05 KiB) Viewed 4285 times

And one of the features that should be working again now in 11.7.2 is that the software will give you a pop-up alert when an update is available.
Screen Shot 2023-12-06 at 5.59.12 PM.png
Screen Shot 2023-12-06 at 5.59.12 PM.png (39.02 KiB) Viewed 4285 times

Re: Typo in JSON import script reconstructing POST/PRE loops

Posted: 07 Dec 2023, 09:11
by Dean
maara_p wrote: 06 Dec 2023, 17:48
Matthieu wrote: 06 Dec 2023, 09:12 We will update the current script and bundle it with the installer.
Great! Is there a place on TVP website/forum that I can follow to learn that a new update is out?
New updates releases are also posted on our social media :)

Re: Typo in JSON import script reconstructing POST/PRE loops

Posted: 07 Dec 2023, 10:19
by maara_p
Ok I should have thought about that :) thanks