diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-01-06 14:42:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-06 15:08:27 +0300 |
commit | 98e4fbc7cc9e9bd6492e7bbb82e48dcf7b4d0bac (patch) | |
tree | f303835de167e61257725f9601242f520351b3dc /source/blender/editors/transform/transform_gizmo_2d.c | |
parent | b7acb8690a4d189868c6e0b57057b6fcd8a5a96d (diff) |
Gizmo: use compatible scale values between 2D/3D gizmos
Make the UV editor gizmos the same size as the 3D view.
Diffstat (limited to 'source/blender/editors/transform/transform_gizmo_2d.c')
-rw-r--r-- | source/blender/editors/transform/transform_gizmo_2d.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_gizmo_2d.c b/source/blender/editors/transform/transform_gizmo_2d.c index 3f0032cc7cc..43deb768f52 100644 --- a/source/blender/editors/transform/transform_gizmo_2d.c +++ b/source/blender/editors/transform/transform_gizmo_2d.c @@ -208,7 +208,6 @@ void ED_widgetgroup_gizmo2d_xform_setup(const bContext *UNUSED(C), wmGizmoGroup /* custom handler! */ WM_gizmo_set_fn_custom_modal(gz, gizmo2d_modal); - WM_gizmo_set_scale(gz, U.gizmo_size); if (i < 2) { float color[4], color_hi[4]; @@ -221,6 +220,8 @@ void ED_widgetgroup_gizmo2d_xform_setup(const bContext *UNUSED(C), wmGizmoGroup WM_gizmo_set_line_width(gz, GIZMO_AXIS_LINE_WIDTH); WM_gizmo_set_color(gz, color); WM_gizmo_set_color_highlight(gz, color_hi); + + WM_gizmo_set_scale(gz, 1.0f); } else { PropertyRNA *prop = RNA_struct_find_property(gz->ptr, "icon"); @@ -230,6 +231,8 @@ void ED_widgetgroup_gizmo2d_xform_setup(const bContext *UNUSED(C), wmGizmoGroup /* Make the center low alpha. */ WM_gizmo_set_line_width(gz, 2.0f); RNA_float_set(gz->ptr, "backdrop_fill_alpha", 0.0); + + WM_gizmo_set_scale(gz, 1.2f); } /* Assign operator. */ @@ -511,7 +514,6 @@ void ED_widgetgroup_gizmo2d_resize_setup(const bContext *UNUSED(C), wmGizmoGroup /* custom handler! */ WM_gizmo_set_fn_custom_modal(gz, gizmo2d_modal); - WM_gizmo_set_scale(gz, U.gizmo_size); if (i < 2) { const float offset[3] = {0.0f, 0.2f}; @@ -527,6 +529,8 @@ void ED_widgetgroup_gizmo2d_resize_setup(const bContext *UNUSED(C), wmGizmoGroup WM_gizmo_set_line_width(gz, GIZMO_AXIS_LINE_WIDTH); WM_gizmo_set_color(gz, color); WM_gizmo_set_color_highlight(gz, color_hi); + + WM_gizmo_set_scale(gz, 1.0f); } else { PropertyRNA *prop = RNA_struct_find_property(gz->ptr, "icon"); @@ -536,6 +540,8 @@ void ED_widgetgroup_gizmo2d_resize_setup(const bContext *UNUSED(C), wmGizmoGroup /* Make the center low alpha. */ WM_gizmo_set_line_width(gz, 2.0f); RNA_float_set(gz->ptr, "backdrop_fill_alpha", 0.0); + + WM_gizmo_set_scale(gz, 1.2f); } /* Assign operator. */ @@ -629,7 +635,7 @@ void ED_widgetgroup_gizmo2d_rotate_setup(const bContext *UNUSED(C), wmGizmoGroup /* custom handler! */ WM_gizmo_set_fn_custom_modal(gz, gizmo2d_modal); - WM_gizmo_set_scale(gz, U.gizmo_size); + WM_gizmo_set_scale(gz, 1.0f); { PropertyRNA *prop = RNA_struct_find_property(gz->ptr, "icon"); |