Still working on some updates for a md3 exporter. I have an issue with the objects rotation being backwards. It is fixed simply by multiplying the vector co by matrix_world.inverted except, the problem now is that the scale is exported inverted.

I’ve made a variable my_matrix and have tried many different ways to just invert the rotation or scale with no luck. I think it should be very simple but I’ve overcomplicated it for myself and am drawing a blank. Any help would be greatly appreciated.

To clarify my question:

How can I invert *either* scale *or* rotation in object.matrix_world?

ADDED:

I’ve got the scale back to before inverting the matrix like this:

```
mat = obj.matrix_world
my_matrix = obj.matrix_world.inverted()
my_matrix[0][0] = mat [0][0]
my_matrix[1][1] = mat [1][1]
my_matrix[2][2] = mat [2][2]
```

Unfortunately, I was wrong assuming the inverted matrix would be correct once the scale switched back. I guess I need to invert the objects rotation before I call for the world matrix. Is there an easy way to invert rotation? Or do I have to suck it up and do the math?