I’m making an addon that aims basically to provide shortcuts to perform some simple actions with the transform Gizmos, ideally in any editor having transform gizmos.
So far I managed to make shortcuts to increase/decrease the gizmo size on the fly, now I’m on the next step: make translation/rotation using the keyboard arrows and page up/down keys.
And as you can see on my GitHub, I managed to do just that (well, for the transform only but the rest seems straightforward to do) using this:
But Ideally, I’d like to be able to let the user choose the kind of transform to perform and the orientation, and all this using as few shortcuts as possible.
TL;DR: I'd like to pick up the gizmo's settings instead of coding each case.
Currently I’m already using ⎇ Alt + ↑↓←→↓⇞⇟ to make local axes translations, as well as ⇞⇟ to manage the gizmo size. I could keep coding each case scenario and assign more hotkeys, but it sounds messy and too heavy on the keyboard.
I could add some UI in the sidebar to give the user some tools to set what he wants to do with the shortcuts, but that’s putting more weight on the user shoulders and there’s already something doing just that: the Gizmo!
Since the user already plays with the gizmo settings in order to set it to translate/rotate/scale and set the orientation, I hopped there could be a way to basically perform a transform based on the gizmo instead of coding each possible transform times each possible orientation.
Aka, replace the current
do a translation of 1 on the local X axis
by something like:
use the current transform gizmo and its orientation to add 1 value to the X axis
bpy.ops.transform.from_gizmo(), but the manual doesn’t say much about it and it doesn’t recognize the “value” keyword so I’m not sure I can guess how to use it.
Also, not exactly related to this issue, but it seems that the Y and Z axis are inverted when rotating bones in pose mode. Any idea how to hide that in a simple manner off the user side?
Thanks for any help!