Page 1 of 1

Scripting error message "Grouping level problem" .

Posted: May 21st, 2005, 2:11 am
by davestewart
I've just moved a whole load of functions to run from a scripted UI, and I'm getting this error when running them:

After Effects warning: grouping level problem. Will attempt to rectify...

Does anyone know what this is all about? I'll hack away until I get somewhere, but if you know, please chip in...

Thanks,
Dave

Posted: May 21st, 2005, 3:28 am
by davestewart
Ok - I think I've found out what it is:

If a function is called from a UI item (in this case a button), and there is a bug in the said function, it throws that error.

I have no idea why it doesn't speciy the error explicitly, or bring it up in the debugger - I can only assume AE is trying to be kind to both the end user, and the script writer's reputation, by not showing the innards of the script and compaining more loudly!

In the meantime, I shall be bullet-proofing my scripts OUTSIDE of a scripted UI.

But does anyone else have any more info??

Thanks,
Dave

Posted: May 21st, 2005, 9:52 pm
by redefinery
davestewart wrote:Ok - I think I've found out what it is:

If a function is called from a UI item (in this case a button), and there is a bug in the said function, it throws that error.
I don't know if it's solely because a callback function has a problem. I've had numerous bugs in those types of functions and didn't get this error. :-)

However, if I remember correctly, I have seen this error before when I was trying to work with layer properties incorrectly. Is your script doing something special with layer properties or traversing the property hierarchy? Maybe "grouping level" is referencing a problem accessin an indexed or named property group?

Jeff

Posted: May 22nd, 2005, 6:05 am
by davestewart
Yup.. I was iterating thorugh all comps, layers, and effects!

Hmmm.... the problem seems to have gone away now, and everything is worked as planned. I guess it's one of those temperamental things.

A bit annoying! I don't like it when I don't know why something isn't working!

Thanks for your input,
Cheers,
Dave

Posted: May 23rd, 2005, 3:44 am
by Paul Tuersley
This may not be the only reason, but the error can be caused by having a beginUndoGroup without a corresponding endUndoGroup.

Paul T

Posted: May 23rd, 2005, 8:25 am
by davestewart
Thank Paul, i'll look into it...

Re: Grouping Level problem

Posted: May 23rd, 2005, 6:28 pm
by zold
Paul Tuersley wrote:This may not be the only reason, but the error can be caused by having a beginUndoGroup without a corresponding endUndoGroup.

Paul T
... or if you run a script that errors within an 'undo block', then you might get an error for that, or the next time you run a script (because, perhaps, AE is in a way still 'holding on to' that undo group).

-cg

Posted: August 30th, 2005, 4:17 pm
by ckelley
I'm beginning to think this is the new "After Effects has encountered an error" from 6.0 reincarnated in script form. I have seen it for 2 or 3 other reasons from the ones listed above, including one that is completely unrelated to scripting - if you copy/paste child layers into a new comp without the parent I get this error sometimes. It's friggin' annoying and unclear... boo.