Blender V5.3
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
20namespace blender {
21
22/* -------------------------------------------------------------------- */
25
29
31{
32 const wmGizmoType *gzt_presel = WM_gizmotype_find("GIZMO_GT_mesh_preselect_elem_3d", true);
34 gzgroup->customdata = ggd;
35
36 wmGizmo *gz = ggd->gizmo = WM_gizmo_new_ptr(gzt_presel, gzgroup, nullptr);
39}
40
42{
43 gzgt->name = "Mesh Preselect Element";
44 gzgt->idname = "VIEW3D_GGT_mesh_preselect_elem";
45
47
50
53}
54
56
57/* -------------------------------------------------------------------- */
60
64
66 wmGizmoGroup *gzgroup)
67{
68 const wmGizmoType *gzt_presel = WM_gizmotype_find("GIZMO_GT_mesh_preselect_edgering_3d", true);
70 gzgroup->customdata = ggd;
71
72 wmGizmo *gz = ggd->gizmo = WM_gizmo_new_ptr(gzt_presel, gzgroup, nullptr);
75}
76
78{
79 gzgt->name = "Mesh Preselect Edge Ring";
80 gzgt->idname = "VIEW3D_GGT_mesh_preselect_edgering";
81
83
86
89}
90
92
93} // namespace blender
Read Blender memory allocation and freeing.
void get_color_3fv(int colorid, float col[3])
BMesh Iterators.
static void WIDGETGROUP_mesh_preselect_edgering_setup(const bContext *, wmGizmoGroup *gzgroup)
const wmGizmoType * WM_gizmotype_find(const StringRef idname, bool quiet)
void VIEW3D_GGT_mesh_preselect_edgering(wmGizmoGroupType *gzgt)
static void WIDGETGROUP_mesh_preselect_elem_setup(const bContext *, wmGizmoGroup *gzgroup)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void VIEW3D_GGT_mesh_preselect_elem(wmGizmoGroupType *gzgt)
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
wmGizmo * WM_gizmo_new_ptr(const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
Definition wm_gizmo.cc:84
wmGizmoMapType_Params gzmap_params
eWM_GizmoFlagGroupTypeFlag flag