Replying to myself:  Turns out the problem is that v was a 3-Vector, and it 
wasn't getting "correctly" promoted to a 4-Vector.  The W component should 
be 1, but was instead 0.

Building a 4-Vector first, and multiplying that by the matrix gives the 
expected results:
v4 = dt.VectorN(v.x, v.y, v.z, 1.0)
v * m.inverse()

However, it turns out that the multiply operation is ridiculously slow.  I 
tracked it down to the operation of actually accessing the matrix 
components.  That is, just getting m.a00 etc. is slow.

Solution was to write my own transform-apply function that takes a dict 
instead of a matrix.

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to