Hi community,
I intend to make an addon to easily manipulate origins of selected objects (either move or rotate just the origin) as this is something I always wanted, and I need some tips and suggestions. I’m not asking for a complete code for this, as that’s what I want to do, just the things, or functions, or even topics that would help me to get it right. I am a C# developer, and I have a very little experience on python, so this will involve a lot of research for me. If someone experienced with scripting in Blender can give me some advice I would be very gratefull.
My expectation is to make a button, where when clicked it activates it, and it appears a manipulator on the location of the origin of the selected object, and with the orientation of that object, so as is moved, the origin of that object follows the position of that manipulator, and the same happens when rotated. It could be even better if I can make it work also with more than one object selected (all at the same time). When that button is clicked again, it should return to the “normal” mode (manipulator of origin no longer exists). I think it could be possible to do this, but difficult.
I’m thinking on creating an empty object when that button is activated, so this is the actual object that is manipulated, and the origin of the selected object should always follow it. When the button is disabled, that object should be removed. I don´t know if there is a better way than creating that object (I assume it could have some problems if for example turning that button off is forgotten). Also, I don’t know if in python there is something like events, so when the manipulator is changed, it executes an event that immediately updates the origin.
So what do you think I could better tackle this?
Thanks in advance!