This is part of the tasks in T56571.
I'm still not satisfied with the increase in code complexity (difficulting maintenance and slightly reducing efficiency).
But at least it can be useful as a reference.
Differential D3742
Rotate Gizmo: Add visual tick marks while holding Ctrl. Authored by Germano Cavalcante (mano-wii) on Sep 27 2018, 10:16 PM.
Details This is part of the tasks in T56571. I'm still not satisfied with the increase in code complexity (difficulting maintenance and slightly reducing efficiency).
Diff Detail
Event TimelineComment Actions Hey, this seems great! However, I get an error when compiling: fatal error: '..\windowmanager\gizmo\wm_gizmo_wmapi.h' file not found Did you remember to include all the files in your commit? Comment Actions This should be done in a way that doesn't require the gizmo user to do much (possibly besides asking the dial to show these marks, although it could be enabled by default when snapping). Could this patch be made to work for the spin tool since this is typical use of the dial3d gizmo. Transform code is doing some bad hacks which makes it not a good example to test new gizmo features. Comment Actions Hi, I just tested this, and it seems to work perfectly. Nicely done. There's a slight quirk though: When using Spin tool, If you keep holding down Ctrl even after finishing your spin, the tick marks stay visible. Comment Actions
Comment Actions Hm, well that's a shame - it seemed to work well for the rotate gizmo too. But if you can implement that a different way, then that's great too.
Comment Actions
Comment Actions
Comment Actions This is already working really well. The only thing is, the pie section doesn't start from where you drag. Instead, the pie section starts from a seemingly arbitrary direction, as you can see here: It'd be nice if the pie section could start from where you drag. Does that make sense? Comment Actions Nicely done. The only last thing, is that now this pie display also appears when just pressing R without using the gizmo. I think that's probably too disturbing. On top of that, the display of them is glitchy in that context. I think the best solution would be to just not show this when not using the gizmo to rotate. Comment Actions It's odd to me how drawDial3d() works. It doesn't really belong into transform_gizmo_3d.c, because it is not a gizmo. It just uses a gizmo draw-util and reuses the logic to get the gizmo color. I can live with that but it's still weird design. What does drawDial3d() belong to now? Gizmo or transform code? There's stuff like applying DPI and setting GPU state in it, which in case of gizmos, is and should be handled by the gizmo backend. Anyway, what worries me more is that this depends on wm.h being included in transform/, which is a bad-level include. (I think it happened to be included but unused before this commit.) Comment Actions If I remember correctly, the initial idea was to keep the gizmo visible and only update its properties during the modal.
To avoid this multiple dependence on drawing functions, perhaps a redesign would be needed in which operators would have a default gizmo_group assigned and should avoid draw_callbacks. | |||||||||||||||||||||||||