blob: 68c1237114922d9f4bbe29852ca8689cfe9bcaeb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2014 Blender Foundation. All rights reserved. */
/** \file
* \ingroup edgizmolib
*
* \name Blank Gizmo
*
* \brief Gizmo to use as a fallback (catch events).
*/
#include "BKE_context.h"
#include "ED_gizmo_library.h"
#include "WM_api.h"
#include "WM_types.h"
/* own includes */
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);
}
/** \} */
|