How can I rotate an object with non uniform scale on the local axis. When the object has a random scale(5,23,12), the rotation is either way off or it slightly jitters.
When it has a uniform scale(1,1,1), I can just do:
import bpy
from math import floor,ceil,sqrt,log10,radians,degrees,cos,sin,pi
from mathutils import Vector, Matrix, Euler
object_x = bpy.context.active_object
rot_matrix = Euler((radians(25),0,0)).to_matrix().to_4x4()
object_x.matrix_local = object_x.matrix_local * rot_matrix
# Trigger UI Update
bpy.context.scene.update()
object_x.location = object_x.location