Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Batch mode command error?
  RSS 2.0 ATOM  

Batch mode command error?
Rate this thread
 
53673
 
Permlink of this thread  
avatar
  • FredrikS
  • Posted: 25 March 2011 07:55 AM
  • Total Posts: 5
  • Joined: 08 February 2011 04:32 AM

Hi there,

I am trying to make maya generate a fluid cache in command line batch mode.
But I can’t seem to be able to pass the mel command.

I have a test mel script:

global proc apan(string $what)

 
print ("Apan says: " $what "!\n");
}

And then try to do:

maya -batch -file maya_scene_file-v002.ma -command "apan hohoho";

But this errors and says:

Error: Number of arguments on call to apan does not match number of parameters in procedure definition.

When I change the ‘apan’ melscript to not take any arguments, it works.

Why won’t it accept any arguments?
Any ideas anyone?

cheers
fred



Replies: 1
/img/forum/dark/default_avatar.png

working rarely with cmdline maya but i would try this:

maya -batch -file maya_scene_file-v002.ma -command “apan(\"hohoho\");"

not sure how maya interprets commandline parameters, but if that does not work try similar things like:

maya -batch -file maya_scene_file-v002.ma -command apan("hohoho");

or

maya -batch -file maya_scene_file-v002.ma -command “apan("hohoho")";

Author: Offscreen

Replied: 03 April 2011 11:38 AM