0
$\begingroup$

enter image description here

Notice how the object local transform axes are left handed after the mirror. Is this a problem? It's a little odd for me from a python scripting, I often transform objects with python matrices. Is it just that the word matrix represents a left handed set of axes?

So to test, I use the world matrix on each of these objects to inspect what Blender thinks is the positive local x axis. Strangely, I get 2 different answers depending on how I ask what the local x axis is!

import bpy
from mathutils import Vector

X = Vector((1,0,0))
for ob in bpy.data.objects:
    mx = ob.matrix_world
    mxrot = mx.to_3x3()
    quat = mx.to_quaternion()

    print(mxrot*X)
    print(quat*X)

result: Vector (1.0000, 0.0000, 0.0000)

Vector (1.0000, 0.0000, 0.0000)

Vector (-1.0000, 0.0000, 0.0000)

Vector (1.0000, 0.0000, 0.0000)

$\endgroup$
  • $\begingroup$ Would you like to accept your own answer. (Maybe extend it slightly, with what you expected instead of the -1 scale). $\endgroup$ – Leander Jul 8 '18 at 15:09
1
$\begingroup$

Turns out the "problem" is that the scale was -1 after the mirror operator. After applying scale, the coordinate system was right handed again.

-P

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.