hey thanks for your reply:

i cant use mAttr.setDefault as the matrix will be changing after every
frame.

what i have so far is something along the lines of:

Mat=[rotation[0], rotation[1], rotation[2], 0.0,
rotation[3],rotation[4],rotation[5],0.0, rotation[6],
rotation[7],rotation[8], 0.0, x, y,z,1.0]

newMatrix=block.outputValue(WorldNode.newMatrix).asMatrix()
newM=om.MTransformationMatrix(newMatrix)

i need to make  newM=Mat

sorry im kinda new at this, so could you please give me a short example.
thanks for your help


On Fri, Apr 23, 2010 at 4:21 PM, Chad Vernon <[email protected]> wrote:

> To set a matrix plug in the API you use MFnMatrixData.  If you want to set
> the default value, you use mAttr.setDefault when you create the attribute.
>
>
> On Fri, Apr 23, 2010 at 4:39 AM, matthew evans <
> [email protected]> wrote:
>
>> if i was to create an output matrix variable for example:
>>
>> mAttr=om.MFnMatrixAttribute()
>>
>> WorldNode.newMatrix=mAttr.create("OutnewMatrix","newMatrix",om.MFnMatrixAttribute.kFloat)
>>
>> how would i make worldNode.newMatrix equal a predefined matrix? such
>> as:
>> matrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
>>
>> WorldNode.newMatrix=matrix
>>
>> so that i can plug the newMatrix into a decompose matrix node?
>>
>> --
>> http://groups.google.com/group/python_inside_maya
>
>
> --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to