Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
index 11309402220..2c886230f10 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c
@@ -177,6 +177,7 @@ static void button2d_draw_intern(const bContext *C,
GPU_matrix_push();
GPU_matrix_mul(matrix_final);
+ float screen_scale = 200.0f;
if (is_3d) {
RegionView3D *rv3d = CTX_wm_region_view3d(C);
float matrix_align[4][4];
@@ -187,8 +188,9 @@ static void button2d_draw_intern(const bContext *C,
transpose_m4(matrix_align);
GPU_matrix_mul(matrix_align);
}
-
- const float screen_scale = mat4_to_scale(matrix_final);
+ else {
+ screen_scale = mat4_to_scale(matrix_final);
+ }
if (select) {
BLI_assert(is_3d);