Blender V5.0
view3d_gizmo_preselect.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "MEM_guardedalloc.h"
10
11#include "ED_gizmo_utils.hh"
12#include "ED_screen.hh"
13
14#include "UI_resources.hh"
15
16#include "WM_types.hh"
17
18#include "view3d_intern.hh" /* own include */
19
20/* -------------------------------------------------------------------- */
23
27
29{
30 const wmGizmoType *gzt_presel = WM_gizmotype_find("GIZMO_GT_mesh_preselect_elem_3d", true);
32 gzgroup->customdata = ggd;
33
34 wmGizmo *gz = ggd->gizmo = WM_gizmo_new_ptr(gzt_presel, gzgroup, nullptr);
37}
38
40{
41 gzgt->name = "Mesh Preselect Element";
42 gzgt->idname = "VIEW3D_GGT_mesh_preselect_elem";
43
45
48
51}
52
54
55/* -------------------------------------------------------------------- */
58
62
64 wmGizmoGroup *gzgroup)
65{
66 const wmGizmoType *gzt_presel = WM_gizmotype_find("GIZMO_GT_mesh_preselect_edgering_3d", true);
68 gzgroup->customdata = ggd;
69
70 wmGizmo *gz = ggd->gizmo = WM_gizmo_new_ptr(gzt_presel, gzgroup, nullptr);
73}
74
76{
77 gzgt->name = "Mesh Preselect Edge Ring";
78 gzgt->idname = "VIEW3D_GGT_mesh_preselect_edgering";
79
81
84
87}
88
@ RGN_TYPE_WINDOW
@ SPACE_VIEW3D
bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
Read Guarded memory(de)allocation.
void UI_GetThemeColor3fv(int colorid, float col[3])
@ TH_GIZMO_HI
@ TH_GIZMO_PRIMARY
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
@ WM_GIZMOGROUPTYPE_3D
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
wmGizmoGroupFnInit setup
const char * idname
wmGizmoMapType_Params gzmap_params
eWM_GizmoFlagGroupTypeFlag flag
wmGizmoGroupFnPoll poll
float color_hi[4]
float color[4]
void VIEW3D_GGT_mesh_preselect_edgering(wmGizmoGroupType *gzgt)
void VIEW3D_GGT_mesh_preselect_elem(wmGizmoGroupType *gzgt)
static void WIDGETGROUP_mesh_preselect_elem_setup(const bContext *, wmGizmoGroup *gzgroup)
static void WIDGETGROUP_mesh_preselect_edgering_setup(const bContext *, wmGizmoGroup *gzgroup)
wmGizmo * WM_gizmo_new_ptr(const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
Definition wm_gizmo.cc:85
const wmGizmoType * WM_gizmotype_find(const StringRef idname, bool quiet)