Fix T62007: Dial 3d being drawn out of rotating tool.
It was being drawn when any Gizmo was highlighted. There are several ways to solve this (creating a new parameter to the operator, checking the gizmos in the invoke or creating a global context). Also, for a micro-optimization, all of those conditions in the `drawDial3d` could be done once in the invoke. But since all of these changes involve changing the customdata (`TransInfo`), which is already a bit confusing with so many members, I thought it best to make minimal changes.
This commit is contained in:
parent
2b892c6c21
commit
8c4b5ac4c1
Notes:
blender-bot
2023-02-14 03:34:12 +01:00
Referenced by issue #62019, Blender crash in edit mode when "Orbit Around Selection" is enabled Referenced by issue #62007, Rotation via hotkey looks differently depends on where your mouse cursor is
|
@ -1292,7 +1292,7 @@ static void gizmo_xform_message_subscribe(
|
|||
void drawDial3d(const TransInfo *t)
|
||||
{
|
||||
if (t->mode == TFM_ROTATION && t->spacetype == SPACE_VIEW3D) {
|
||||
wmGizmo *gz = wm_gizmomap_highlight_get(t->ar->gizmo_map);
|
||||
wmGizmo *gz = wm_gizmomap_modal_get(t->ar->gizmo_map);
|
||||
if (gz == NULL) {
|
||||
/* We only draw Dial3d if the operator has been called by a gizmo. */
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue