Hey guys,
For my addon, I’m trying to make an object rotate on in his local axis.
The thing is that the object is not selected.
The object who is rotated serve as reference object and I rotate it in a modal.
To be precise, I work on a circular array.
I create an empty and use it in the array
I launch the modal and I rotate the empty when I change the count.
If I use Z axis, it’s ok, but I need it to work on every situation, so also when the object is turned on any direction.
And for that, I need to turn my empty in his local axis.
How could I do that in python?
Right now, my code is as simple as that.
empty = modifier[MPM.array_name].offset_object
empty.rotation_euler[2] = radians(float(360 / modifier[MPM.array_name].count))
Thx for your help