Gizmo: add blank gizmo definition

Missed from 98c304e865 by accident.
This commit is contained in:
Campbell Barton
2018-08-12 13:17:10 +10:00
parent b4b8d3ab0e
commit 444a0202d4

View File

@@ -23,6 +23,14 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blank3d_gizmo.c
* \ingroup wm
*
* \name Blank Gizmo
*
* \brief Gizmo to use as a fallback (catch events).
*/
#include "BLI_math.h"
#include "BKE_context.h"
@@ -37,6 +45,45 @@
#include "../gizmo_geometry.h"
#include "../gizmo_library_intern.h"
static void gizmo_blank_draw(const bContext *UNUSED(C), wmGizmo *UNUSED(gz))
{
/* pass */
}
static int gizmo_blank_invoke(
bContext *UNUSED(C), wmGizmo *UNUSED(gz), const wmEvent *UNUSED(event))
{
return OPERATOR_RUNNING_MODAL;
}
static int gizmo_blank_test_select(
bContext *UNUSED(C), wmGizmo *UNUSED(gz), const int UNUSED(mval[2]))
{
return 0;
}
/* -------------------------------------------------------------------- */
/** \name Blank Gizmo API
*
* \{ */
static void GIZMO_GT_blank_3d(wmGizmoType *gzt)
{
/* identifiers */
gzt->idname = "GIZMO_GT_blank_3d";
/* api callbacks */
gzt->draw = gizmo_blank_draw;
gzt->invoke = gizmo_blank_invoke;
gzt->test_select = gizmo_blank_test_select;
gzt->struct_size = sizeof(wmGizmo);
}
void ED_gizmotypes_blank_3d(void)
{
WM_gizmotype_append(GIZMO_GT_blank_3d);
}
/** \} */