Array of Matrix input

76 views
Skip to first unread message

Dilen Shah

unread,
Jan 13, 2014, 4:05:16 AM1/13/14
to python_in...@googlegroups.com
Hey guys,

How would I create a matrix attribute which can hold input matrices?

Thank you.

Dilen.

Marcus Ottosson

unread,
Jan 13, 2014, 5:51:21 AM1/13/14
to python_in...@googlegroups.com
cmds.addAttr( longName='myMatrixAttr', attributeType='matrix' )
http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/addAttr.html

You might be able to add it to a compound too.


--
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/0ba6e4ff-cc5c-4230-8746-159de2294283%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Marcus Ottosson
konstr...@gmail.com

Dilen Shah

unread,
Jan 13, 2014, 7:54:39 AM1/13/14
to python_in...@googlegroups.com
Sorry I forgot to mention, I wanted it in maya API.
I am trying this :
tAttr.create("parentMatrix", "parentMatrix", OpenMaya.MFnData.kMatrix)

but this is not working


On Monday, January 13, 2014 11:51:21 AM UTC+1, Marcus Ottosson wrote:
cmds.addAttr( longName='myMatrixAttr', attributeType='matrix' )
http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/addAttr.html

You might be able to add it to a compound too.
On 13 January 2014 09:05, Dilen Shah <dilen...@gmail.com> wrote:
Hey guys,

How would I create a matrix attribute which can hold input matrices?

Thank you.

Dilen.

--
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+unsub...@googlegroups.com.



--
Marcus Ottosson
konstr...@gmail.com

Dilen Shah

unread,
Jan 13, 2014, 9:41:08 AM1/13/14
to python_in...@googlegroups.com
Found the answer.

It goes like this:

mAttr = OpenMaya.MFnTypedAttribute()
mAttr.create("matrixArray", "mtx", OpenMaya.MFnData.kMatrix)

Thanks anyways.

D.
Reply all
Reply to author
Forward
0 new messages