Commit: 444a0202d40705b6a6f21e59e883518be577cf4e Author: Campbell Barton Date: Sun Aug 12 13:17:10 2018 +1000 Branches: blender2.8 https://developer.blender.org/rB444a0202d40705b6a6f21e59e883518be577cf4e
Gizmo: add blank gizmo definition Missed from 98c304e865f by accident. =================================================================== M source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c =================================================================== diff --git a/source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c index 4dcdb7b7b3f..0c67e8c606d 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/blank3d_gizmo.c @@ -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); } + +/** \} */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs