Scene view rotation

Hello everyone!

I am pretty confused how the rotation in the scene view works.
I have a model and i guess it has the pivot point at bad place. But i have a lot of them so i cant really change them.

So if i rotate the models in the scene view it correctly rotates it because it changes the position as well. And if i rotate them through a script modifying the eulerangles or using Transform.Rotate i get bad result because it is visually changes the position even if the transform values are the same.

I would need to rotate them as in the scene view. How can i achieve that kind of functionality through scripting?

Thanks forward everyone who helps with anything!

Wow I have the exact same question nearly three years later! Anyone got an update on this?