[Bf-blender-cvs] [35dcc3d4f49] blender2.8: Transform: hide the Dial3d drawing if the operator has not been called by a Gizmo.
mano-wii
noreply at git.blender.org
Fri Oct 5 16:56:22 CEST 2018
Commit: 35dcc3d4f499f012c4cb6635abaacda558db4ff3
Author: mano-wii
Date: Fri Oct 5 10:42:15 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB35dcc3d4f499f012c4cb6635abaacda558db4ff3
Transform: hide the Dial3d drawing if the operator has not been called by a Gizmo.
===================================================================
M source/blender/editors/transform/transform_gizmo_3d.c
===================================================================
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index a3f620fb3fe..14a0b519183 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -67,6 +67,7 @@
#include "WM_types.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
+#include "wm.h"
#include "ED_armature.h"
#include "ED_curve.h"
@@ -1243,6 +1244,12 @@ 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);
+ if (gz == NULL) {
+ /* We only draw Dial3d if the operator has been called by a gizmo. */
+ return;
+ }
+
float mat_basis[4][4];
float mat_final[4][4];
float color[4];
More information about the Bf-blender-cvs
mailing list