[Bf-blender-cvs] [81c5b759d6a] master: Fix T99182: Hard code screen_scale for circle drawing in 3D

Chris Blackbourn noreply at git.blender.org
Mon Jun 27 01:00:58 CEST 2022


Commit: 81c5b759d6ad86237f4d055ff8749bc14a7d369b
Author: Chris Blackbourn
Date:   Mon Jun 27 10:55:39 2022 +1200
Branches: master
https://developer.blender.org/rB81c5b759d6ad86237f4d055ff8749bc14a7d369b

Fix T99182: Hard code screen_scale for circle drawing in 3D

===================================================================

M	source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list