Error: "Invalid Menu Operation" when scripting

Community Beginner ,
Feb 02, 2020 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.

TOPICS
Crash, Error or problem, Scripting

Views

19.0K

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
community guidelines

correct answers 1 Correct answer

Community Beginner , Feb 03, 2020 Feb 03, 2020
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) edi...

Likes

Translate

Translate
Adobe Community Professional ,
Feb 02, 2020 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
community guidelines
Advocate ,
Feb 02, 2020 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
community guidelines
Community Beginner ,
Feb 03, 2020 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
community guidelines
Community Beginner ,
Feb 03, 2020 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
community guidelines
New Here ,
Oct 28, 2020 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
community guidelines
New Here ,
Nov 01, 2020 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
community guidelines
Explorer ,
Nov 03, 2020 Nov 03, 2020

Copy link to clipboard

Copied

Impressive that you can even work with so many layers!! 😄

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
community guidelines
Community Beginner ,
Nov 10, 2020 Nov 10, 2020

Copy link to clipboard

Copied

I too am suddenly getting an 'invalid menu operation' in After Effects 17.5.  It happens without even opening a file.  Navigating to any menu prior to even opening a file results in the error.  I've tried removing prefs, uninstalling, re-installing removing all plugins...with no luck.  I am signed into a corporate account of Creative Cloud.  I uninstalled 17.5 and tried installing the previous version 17.4, and the problem seems to have gone away.  Something tells me this is likely to happen again though.

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
community guidelines
New Here ,
Nov 10, 2020 Nov 10, 2020

Copy link to clipboard

Copied

I am getting this issue as well, but it is as soon as I open AE, I have about one second to click on something, menu items etc, before this error pops up and prevents me doing anything. I can't click on anything.

 

I have the latest update.

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
community guidelines
New Here ,
Nov 12, 2020 Nov 12, 2020

Copy link to clipboard

Copied

Have the same error. But I have only 1-2-3 layers, or no layers at all.

Win10, Core i7, 16 GB, RTX2060 Super, latest updates.

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
community guidelines
Community Beginner ,
Nov 24, 2020 Nov 24, 2020

Copy link to clipboard

Copied

Solving the problem:

1 - Open your Creative Clound Desktop
2 - Search for After Effects
3 - Holding ALT + CTRL + SHIFT (win) or OPTION + SHIFT + CMND (mac), click "open"
4 - A message "Are you sure you want to delete your preferences file?" Will open. Click "OK".

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
community guidelines
New Here ,
Dec 02, 2020 Dec 02, 2020

Copy link to clipboard

Copied

Still goes back after a few keyboard commands.

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
community guidelines
Community Beginner ,
Dec 02, 2020 Dec 02, 2020

Copy link to clipboard

Copied

This happened to me too, but every time it happened I would repeat the process until the problem stopped. It worked for me, I hope it works for you. Good luck!

 

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
community guidelines
New Here ,
Dec 02, 2020 Dec 02, 2020

Copy link to clipboard

Copied

He intentado todas las soluciones que se dieron en las respuestas, pero el problema aún persiste y no puedo trabajar sobre la composición.

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
community guidelines
New Here ,
Dec 03, 2020 Dec 03, 2020

Copy link to clipboard

Copied

LATEST

Tengo el mismo problema y nada funciona para que desaparezca ese mensaje de adobe after effects

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
community guidelines