Discussion:
[Maya-Python] Maya command and complex argument
Rémi Deletrain
2018-10-15 10:23:11 UTC
Permalink
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.
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ee918036-e4ec-4787-90e5-456ecdf96710%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Boon
2018-10-16 05:04:03 UTC
Permalink
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.
Post by Rémi Deletrain
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.
--
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_maya+***@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.
Marcus Ottosson
2018-10-16 06:20:59 UTC
Permalink
Now I also don't understand.

I thought he was referring to the Maya command *plug-in*, MPxCommand
<http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__py_ref_class_open_maya_1_1_m_px_command_html>,
and the argument it can get, MArgList
<http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__py_ref_class_open_maya_1_1_m_arg_list_html>
which
I think is limited to simple types like strings and floats.
Post by Michael Boon
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.
Post by Rémi Deletrain
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.
--
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
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/9828b72f-f4d3-4aca-a74e-12104e31609b%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/9828b72f-f4d3-4aca-a74e-12104e31609b%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAczf%3DCPF0w%2B6yF%2BvOqge3C65f_sn2rO5R1yY8d%3DKLcag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Rémi Deletrain
2018-10-16 12:54:09 UTC
Permalink
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.
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/cca4d8d3-4499-406b-86ca-ed74efc7b31e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Michael Boon
2018-10-17 00:22:47 UTC
Permalink
Now it makes sense to me :)
Sorry I don't have any answers though.
Post by Rémi Deletrain
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.
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/3c07d2ec-80f2-485f-82ef-c9dce73ba8bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rémi Deletrain
2018-10-17 09:31:42 UTC
Permalink
Too bad I'll do otherwise then. :)
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/f0531c49-d4b3-4fa2-850b-3797fb1e8397%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...