Home Technical Talk

[Maya] Execute mel script from Ascii scene file

greentooth
Offline / Send Message
Froyok greentooth
Hi folks !

I spent quite of time in the past (and even today) to find any informations on how to execute mel commands from an ascii scene file. Unfortunately I didn't found any clue on this "feature". By reading a Maya ascii I can see it's mostly simple commands executed like in any mel script. I was able to launch one of my custom script simply by loading a scene file, unfortunately it only works for my Maya 2011, Maya 2013 simply give me an error :

"Errors have occured while reading this scene that may result in data loss."

And the script editor only give me this :
// Error: MayaASCII file was missing a 'requires' statement, and may not have loaded as expected. // 
// Warning: line 0: Errors have occurred while reading this scene that may result in data loss.
Please check the Script Editor for details. //
From my tests I was able to see that the reading of the file is blocked my "source" command call (which is at the end of the file of course). The script file exists, I can load it manually, so I don't understand why Maya give me an error.


If anybody have an idea about this problem, I'm open to know a possible solution.
Also, if you have any recommendations about the Maya ascii files I would like to know, especially what is possible or not (is there any limitation to the script commands executed from an ascii file ?).
Sign In or Register to comment.