Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Mel command failing in Maya 2024

Mel command failing in Maya 2024

davedub
Participant Participant
1,307 Views
6 Replies
Message 1 of 7

Mel command failing in Maya 2024

davedub
Participant
Participant

I've been using a python script in Maya 2023 for a year with no issues. I've updated Maya to 2024. Initially, my script ran, but now it seems to be having trouble with mel commands:

 

mel.eval('FBXImportShapes -v true;')

 

gives

 

Error occurred during execution of MEL script
line 1: line 1: Cannot find procedure "FBXImportShapes".

 

So I tried the mel command in a mel tab:

 

FBXImportShapes -v true;

 

which gave

 

FBXImportShapes -v false;
// Error: line 1: Cannot find procedure "FBXImportShapes"

 

For reference, this is what I get if I run the exact same command in Maya 2023:

 

FBXImportShapes -v false;
// Result: Success

 

Simple mel commands (e.g. polySphere) work fine. Perhaps there is a section of the mel library that deals with fbx files that has not been loaded properly?

 

Just as background, I have installed PyMel in Maya 2024 and had to do some strange copying and renaming trick to get it to work (see https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/6gfZgdPquwZ2qCVxfAkb1n.html)

 

As I say, Maya 2024 worked initially, running my script with no issues. At one point, I had one instance of Maya 2024 running my script with no problems and another refusing to run the exact same script!

 

I'm very much hoping this can be fixed, as the users of my script are asking for Maya 2024 support...

 

 

0 Likes
Accepted solutions (1)
1,308 Views
6 Replies
Replies (6)
Message 2 of 7

absoluteKelvin
Collaborator
Collaborator

could be a he fbx plugin not loaded?

https://www.artstation.com/kelvintam
0 Likes
Message 3 of 7

davedub
Participant
Participant

I contacted support and after a couple of tests they advised that I deleted my prefs folder. This fixed the issue. It was a brand new install of Maya 2024, so I have no idea how the prefs got corrupted.

0 Likes
Message 4 of 7

brentmc
Autodesk
Autodesk

Actual preference corruption is extremely rare.

Rather Maya persists almost all tool and command settings in the preferences so when you fire up a fresh instance of Maya it has the same state as the last time. So, in most situations it is easier to reset all the preferences than trying to figure out which setting is to blame.

Note: In recent versions of Maya the userPrefs.mel file is organized by catefory and only saves out non-default values which does make it much easier to go in and fix individual settings or see what has been changed.

Brent McPherson
Principle Engineer
Message 5 of 7

davedub
Participant
Participant

@brentmc wrote:

Actual preference corruption is extremely rare.

Rather Maya persists almost all tool and command settings in the preferences so when you fire up a fresh instance of Maya it has the same state as the last time. So, in most situations it is easier to reset all the preferences than trying to figure out which setting is to blame.

Note: In recent versions of Maya the userPrefs.mel file is organized by catefory and only saves out non-default values which does make it much easier to go in and fix individual settings or see what has been changed.



Given that Maya persists tool and command settings in the preferences, I'm still unclear as to what inside the folder could have caused Maya to stop recognising certain mel commands. But hey, it's all working now!

0 Likes
Message 6 of 7

brentmc
Autodesk
Autodesk
Accepted solution

Like the other commenter previously said, I think the fbxmaya plugin became unloaded and Maya persisted that state.

I don't think it was anything specifically you did but it can occaisionally happen and the easiest fix (assuming this is the problem) is to go into Windows > Settings/Preferences > Plug-in Manager and re-enable the plugin.

 

screenshot_000205.png

Brent McPherson
Principle Engineer
0 Likes
Message 7 of 7

davedub
Participant
Participant

Ok, yes, that does make sense. If it happens again I'll check the enabled plugins.

 

Thank you for taking the time to answer.

0 Likes