I need to calculate the normal orientation matrix for the tool. There is a way to get a custom orientation matrix


Is there a similar method for getting any orientation matrix ? (GLOBAL, LOCAL, NORMAL, GIMBAL, VIEW, CURSOR)

I will say in advance that I am not satisfied with creating a custom orientation, since I need to get a realtime matrix

  • $\begingroup$ What exactly do you mean by "real time" in this context? $\endgroup$ – Robert Gützkow Feb 21 at 19:04
  • $\begingroup$ @RobertGützkow I need a matrix for gizmo, so I can't execute statements from the draw_prepare function in gizmogroup. $\endgroup$ – Max Derksen Feb 21 at 19:10
  • $\begingroup$ @RobertGützkow For example, I know how to get a normal matrix by executing a regular operator, using: bpy.context.window.scene.transform_orientation_slots[0].type = 'NORMAL' bpy.ops.transform.create_orientation(name=name, use=True, overwrite=True) user_matrix=bpy.context.scene.transform_orientation_slots[0].custom_orientation.matrix.to_4x4() But this is not suitable for gizmo $\endgroup$ – Max Derksen Feb 21 at 19:12

Your Answer

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

Browse other questions tagged or ask your own question.