get matrix value from breve.matrix

In python I do
block_rotation = self.block.getRotation()

then block_rotation looks like this?
breve.matrix( 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.0000
00, 0.000000, 1.000000 )

How do I get the value at 0,2?

then if I do
print block_rotation[0][2]

then I get
print block_rotation[0][2]
TypeError: unsubscriptable object

if I do
print block_rotation.getValue(0,2)

then I get
AttributeError: 'matrix' object has no attribute 'getValue'

I have been working in Steve for a while and am moving over to Python, I seem to be having a lot of trouble figuring out how to do these little things, is there any additional documentation anywhere? I try to find examples in the demos but in this case I couldn't.

Thanks,
Jonathan

matrix inherits from list

I apologize that some of the details of the Python frontend are not currently well-documented.

The matrix class inherits from list, so you can just do: matrix[ 2 ] to get the element you want (with valid indices being 0-8).

- jon

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.