Maya command and complex argument

77 views
Skip to first unread message

Rémi Deletrain

unread,
Oct 15, 2018, 6:23:11 AM10/15/18
to Python Programming for Autodesk Maya
Hi everybody,

Is it possible to give to Maya complex command arguments like a MMatrixArray?
I am looking to make the equivalent of a bake in maya but without having the source. I only have matrix data in a file.
I have a solution that works in python but it is slow given the number of iteration.

Michael Boon

unread,
Oct 16, 2018, 1:04:03 AM10/16/18
to Python Programming for Autodesk Maya
I don't understand. Do you mean launch Maya from the command line, with a lot of data as arguments to the call?
Command line calls are limited to 32k characters, I think, but you're still writing and reading all your matrix data as text, so I wouldn't expect it to be any faster.
Reading the data from a file using Python would be the best way to do it, I expect. If you're using the same data a lot of times you could read it once from a text file, then Pickle it into a binary file (or save it into a Maya binary), which would be a lot faster to read.

Marcus Ottosson

unread,
Oct 16, 2018, 2:21:20 AM10/16/18
to python_in...@googlegroups.com
Now I also don't understand.

I thought he was referring to the Maya command *plug-in*, MPxCommand, and the argument it can get, MArgList which I think is limited to simple types like strings and floats.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9828b72f-f4d3-4aca-a74e-12104e31609b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rémi Deletrain

unread,
Oct 16, 2018, 8:54:09 AM10/16/18
to Python Programming for Autodesk Maya
Thank you for your answers.

Yes I spoke to Maya MPxCommand.
I wanted to know if it was possible to return arguments more complex than int, bool, float and string.
Marcus a répondu à ma question.

for speed my process I must to change my workflow I think for works with MPxCommand.

Michael Boon

unread,
Oct 16, 2018, 8:22:47 PM10/16/18
to Python Programming for Autodesk Maya
Now it makes sense to me :)
Sorry I don't have any answers though.

Rémi Deletrain

unread,
Oct 17, 2018, 5:31:42 AM10/17/18
to Python Programming for Autodesk Maya
Too bad I'll do otherwise then. :)
Reply all
Reply to author
Forward
0 new messages