2

I have the following two lines of code:

obj.matrix_world @= translation_matrix @ rotation_mat @ scale_matrix

and

obj.data.transform(translation_matrix @ rotation_mat @ scale_matrix)

They both work, and both appear to do exactly the same thing. Can somebody explain what the difference(s) between the two are?

juggler
  • 147
  • 6
  • so far, this answer has been illuminating: https://blender.stackexchange.com/questions/44760/rotate-objects-around-their-origin-along-a-global-axis-scripted-without-bpy-op – juggler Jul 09 '20 at 20:53
  • 1
    One modifies the object transform (first) other modifies the mesh coordinates (second) akin to object mode rotation vs edit mode rotation Result will most likely differ if the starting point of object isn't Identity matrix (ie when global coords == local coords) – batFINGER Jul 10 '20 at 07:21

0 Answers0