Highlighted

Error: "Invalid Menu Operation" when scripting

Community Beginner ,
Feb 02, 2020

Copy link to clipboard

Copied

So. I know this is not a new error after searching on google. But there has to be a way to either avoid or work-around it, right?

So my problem is: when i want to either copy any layer that contains effects (best-case) or add effects to an existing layer by scripting i get this message: "Invalid Menu Operation" and either the timeline doesn't show anything or the software downright crashes.

I have a composition with an adjustment layer containing color correction. I want to add it to my composition..

ccLayer.copyToComp(composition);

I have tested with console logs and i'm sure that both the layer and the composition objects are right. When there's no effect on the layer i'm copying i still get an "undefined" script execution result at the end but i can still see the composition without any errors and all the layers get copied in there. But as i said having effects on the layer leads to the problems. I tested it both with 3rd party plug-in effects and internal standardized ones. Nothing works..

But as i said. That's just the best case. If you hook me up with a method to add a new layer with effects and select a preset from mb looks i'm happy too but that gave me the same error as i said.

Oh and i also tried deleting my .prefs files as suggested in another topic. That didn't work either.

Correct answer by farlumSarel | Community Beginner

Sorry, i don't want to spam. But important new development: i noticed the problem is probably not me trying to add the effects to the layer in general. the problem is that my comp has around 2.000 layers (in the span of <5 minutes) and effects on adjustment layers don't seem to work with that as well in general.. After getting the same error trying to do it manually i pre-composed it and then it worked. so i might be able to just pre-compose it alltogether and then add my adjustment layer(s)

 

edit: that fixed it. sorry for being a dork and not considering that so many layers could be problematic. Solved.

TOPICS
Crash, Error or problem, Scripting

Views

3.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Error: "Invalid Menu Operation" when scripting

Community Beginner ,
Feb 02, 2020

Copy link to clipboard

Copied

So. I know this is not a new error after searching on google. But there has to be a way to either avoid or work-around it, right?

So my problem is: when i want to either copy any layer that contains effects (best-case) or add effects to an existing layer by scripting i get this message: "Invalid Menu Operation" and either the timeline doesn't show anything or the software downright crashes.

I have a composition with an adjustment layer containing color correction. I want to add it to my composition..

ccLayer.copyToComp(composition);

I have tested with console logs and i'm sure that both the layer and the composition objects are right. When there's no effect on the layer i'm copying i still get an "undefined" script execution result at the end but i can still see the composition without any errors and all the layers get copied in there. But as i said having effects on the layer leads to the problems. I tested it both with 3rd party plug-in effects and internal standardized ones. Nothing works..

But as i said. That's just the best case. If you hook me up with a method to add a new layer with effects and select a preset from mb looks i'm happy too but that gave me the same error as i said.

Oh and i also tried deleting my .prefs files as suggested in another topic. That didn't work either.

Correct answer by farlumSarel | Community Beginner

Sorry, i don't want to spam. But important new development: i noticed the problem is probably not me trying to add the effects to the layer in general. the problem is that my comp has around 2.000 layers (in the span of <5 minutes) and effects on adjustment layers don't seem to work with that as well in general.. After getting the same error trying to do it manually i pre-composed it and then it worked. so i might be able to just pre-compose it alltogether and then add my adjustment layer(s)

 

edit: that fixed it. sorry for being a dork and not considering that so many layers could be problematic. Solved.

TOPICS
Crash, Error or problem, Scripting

Views

3.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 02, 2020 0
Most Valuable Participant ,
Feb 02, 2020

Copy link to clipboard

Copied

There appear to be some clipboard issues in CC 2020. That aside it's never a good idea to use reserved keywords/ UI strings like "composition" for your own variables. This will inevitably cause issues.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 02, 2020 0
Adobe Community Professional ,
Feb 02, 2020

Copy link to clipboard

Copied

Some funky thing happens with copyToComp. Have you read the docs?

http://docs.aenhancers.com/layers/layer/#layer-copytocomp

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 02, 2020 0
Community Beginner ,
Feb 03, 2020

Copy link to clipboard

Copied

Thanks for the fast replies.
First of all, yes: i read the docs. But that didn't really help me. Also thanks for the reminder about the naming, i changed that.
So essentially there is nothing else i can do about this? How about adding magic bullet looks with a programatically selected preset to my current AVLayer? Would that work?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 03, 2020 0
Community Beginner ,
Feb 03, 2020

Copy link to clipboard

Copied

Sorry, i don't want to spam. But important new development: i noticed the problem is probably not me trying to add the effects to the layer in general. the problem is that my comp has around 2.000 layers (in the span of <5 minutes) and effects on adjustment layers don't seem to work with that as well in general.. After getting the same error trying to do it manually i pre-composed it and then it worked. so i might be able to just pre-compose it alltogether and then add my adjustment layer(s)

 

edit: that fixed it. sorry for being a dork and not considering that so many layers could be problematic. Solved.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 03, 2020 0
New Here ,
Oct 28, 2020

Copy link to clipboard

Copied

I am also getting the same error.. but without opening any file

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 28, 2020 1
New Here ,
Nov 01, 2020

Copy link to clipboard

Copied

I kept getting the invalid menu operation on an empty project and it made it so I couldn't do anything.  I tried deleting cache, preferences, reinstalling.  Nothing worked.  I ended up clicking my profile picture right when I open and found out I wasn't logged in.  Once I logged in the problem went away.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 01, 2020 0