Blender V5.3
WM_gizmo_types.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2016 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
13
14#pragma once
15
16#include "BLI_enum_flags.hh"
17#include "BLI_vector.hh"
18
19#include "DNA_listBase.h"
20
21#include "RNA_types.hh"
22
23namespace blender {
24
25struct IDProperty;
26struct wmGizmo;
27struct wmGizmoType;
28struct wmGizmoGroup;
29struct wmGizmoGroupType;
30struct wmGizmoMap;
31struct wmGizmoMapType;
32struct wmGizmoProperty;
34struct wmKeyConfig;
35struct wmOperatorType;
36
37/* -------------------------------------------------------------------- */
38/* Enum Typedef's. */
39
51
52
103
170
172
182
183
199
200/* -------------------------------------------------------------------- */
201/* #wmGizmo. */
202
203
215
216} // namespace blender
217
218#include "wm_gizmo_fn.hh"
219
220namespace blender {
221
229
230 bool is_redo = false;
231};
232
234struct wmGizmo {
236
239
245
248
251
253
256
261
267
273
279
280 /* Transformation of the gizmo in 2d or 3d space.
281 * - Matrix axis are expected to be unit length (scale is applied after).
282 * - Behavior when axis aren't orthogonal depends on each gizmo.
283 * - Typically the +Z is the primary axis for gizmos to use.
284 * - 'matrix[3]' must be used for location,
285 * besides this it's up to the gizmos internal code how the
286 * rotation components are used for drawing and interaction. */
287
289 float matrix_space[4][4];
291 float matrix_basis[4][4];
293 float matrix_offset[4][4];
301 float color[4], color_hi[4];
302
305
311
313
314 /* TODO: Once wmGizmo itself gets an actual constructor, this can most likely become a
315 * `Array`, since length is defined by the gizmo type. */
317
320
322 union {
323 float f;
325};
326
329 const wmGizmoPropertyType *type = nullptr;
330
332 PropertyRNA *prop = nullptr;
333 int index = -1;
334
335 /* Optional functions for converting to/from RNA. */
344};
345
358
365
367 short spaceid;
368 short regionid;
369};
370
442
443/* -------------------------------------------------------------------- */
444/* #wmGizmoGroup. */
445
451
514
517
519 ListBaseT<wmGizmo> gizmos;
520
522
525
527 union {
529 struct {
531 };
532
533 uint any;
535
537
540 void (*customdata_free)(void *);
542};
543
544/* -------------------------------------------------------------------- */
545/* #wmGizmoMap. */
546
556#define WM_GIZMOMAP_DRAWSTEP_MAX 2
557
558} // namespace blender
#define ENUM_OPERATORS(_enum_type)
These structs are the foundation for all linked lists in the library system.
ENUM_OPERATORS(Layer::Flags)
BMesh Iterators.
void(*)(wmGizmo *) wmGizmoFnFree
void(*)(const wmGizmo *, wmGizmoProperty *, void *range) wmGizmoPropertyFnRangeGet
void(*)(const bContext *, wmGizmoGroup *, wmMsgBus *) wmGizmoGroupFnMsgBusSubscribe
unsigned int uint
Definition BKE_text.h:55
void(*)(const wmGizmo *, wmGizmoProperty *, void *value) wmGizmoPropertyFnGet
void(*)(const bContext *, wmGizmo *, int) wmGizmoFnDrawSelect
int(*)(wmGizmo *) wmGizmoFnCursorGet
void(*)(wmGizmo *) wmGizmoFnSetup
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
@ WM_GIZMO_TWEAK_PRECISE
void(*)(const wmGizmo *, wmGizmoProperty *, const void *value) wmGizmoPropertyFnSet
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnRefresh
bool(*)(const bContext *, wmGizmoGroupType *) wmGizmoGroupFnPoll
void(*)(const bContext *, wmGizmo *) wmGizmoFnDraw
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnInit
void(*)(const bContext *, wmGizmoGroup *, wmGizmo *, const wmEvent *) wmGizmoGroupFnInvokePrepare
eWM_GizmoFlagMapTypeUpdateFlag
@ WM_GIZMOMAPTYPE_KEYMAP_INIT
@ WM_GIZMOMAPTYPE_UPDATE_INIT
@ WM_GIZMOMAPTYPE_UPDATE_REMOVE
@ WM_GIZMOGROUP_INIT_REFRESH
@ WM_GIZMOGROUP_INIT_SETUP
@ WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL
@ WM_GIZMOGROUPTYPE_VR_REDRAWS
@ WM_GIZMOGROUPTYPE_DEPTH_3D
@ WM_GIZMOGROUPTYPE_PERSISTENT
@ WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
@ WM_GIZMOGROUPTYPE_TOOL_INIT
@ WM_GIZMOGROUPTYPE_SCALE
@ WM_GIZMOGROUPTYPE_SELECT
@ WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE
@ WM_GIZMO_DRAW_NO_SCALE
@ WM_GIZMO_DRAW_HOVER
@ WM_GIZMO_OPERATOR_TOOL_INIT
@ WM_GIZMO_NO_TOOLTIP
@ WM_GIZMO_MOVE_CURSOR
@ WM_GIZMO_DRAW_OFFSET_SCALE
@ WM_GIZMO_DRAW_VALUE
@ WM_GIZMO_EVENT_HANDLE_ALL
@ WM_GIZMO_HIDDEN_KEYMAP
@ WM_GIZMO_NEEDS_UNDO
@ WM_GIZMO_DRAW_MODAL
@ WM_GIZMO_SELECT_BACKGROUND
@ WM_GIZMO_HIDDEN_SELECT
int(*)(bContext *, wmGizmo *, const int mval[2]) wmGizmoFnTestSelect
void(*)(const wmGizmo *, wmGizmoProperty *) wmGizmoPropertyFnFree
@ WM_GIZMO_STATE_MODAL
@ WM_GIZMO_STATE_SELECT
@ WM_GIZMO_STATE_HIGHLIGHT
wmOperatorStatus(*)(bContext *, wmGizmo *, const wmEvent *) wmGizmoFnInvoke
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnDrawPrepare
void(*)(wmGizmo *, wmGizmoProperty *) wmGizmoFnPropertyUpdate
void(*)(bContext *, wmGizmo *, const bool) wmGizmoFnExit
bool(*)(const bContext *, wmGizmo *, rcti *r_bounding_box) wmGizmoFnScreenBoundsGet
void(*)(const wmGizmo *, float[4][4]) wmGizmoFnMatrixBasisGet
void(*)(wmGizmoProperty *, const FunctionRef< void(PointerRNA &ptr, PropertyRNA *prop, int index)> callback) wmGizmoPropertyFnForeachRNAProp
wmOperatorStatus(*)(bContext *, wmGizmo *, const wmEvent *, eWM_GizmoFlagTweak) wmGizmoFnModal
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnDrawBackground
@ WM_GIZMOMAP_DRAWSTEP_3D
@ WM_GIZMOMAP_DRAWSTEP_2D
void(*)(wmGizmo *) wmGizmoFnSelectRefresh
wmKeyMap *(*)(const wmGizmoGroupType *, wmKeyConfig *) wmGizmoGroupFnSetupKeymap
wmGizmoGroupTypeRef * prev
wmGizmoGroupTypeRef * next
wmGizmoGroupFnMsgBusSubscribe message_subscribe
wmGizmoGroupFnRefresh refresh
eWM_GizmoFlagMapTypeUpdateFlag type_update_flag
wmGizmoGroupFnDrawBackground draw_background
wmGizmoGroupFnInvokePrepare invoke_prepare
wmGizmoGroupFnSetupKeymap setup_keymap
wmGizmoMapType_Params gzmap_params
wmGizmoGroupFnDrawPrepare draw_prepare
eWM_GizmoFlagGroupTypeFlag flag
eWM_GizmoFlagGroupInitFlag init_flag
wmGizmoGroupType * type
ListBaseT< wmGizmo > gizmos
void(*) customdata_free(void *)
wmGizmoPropertyType * next
wmGizmoPropertyType * prev
wmGizmoPropertyFnForeachRNAProp foreach_rna_prop_fn
const wmGizmoPropertyType * type
struct blender::wmGizmoProperty::@216011055122204070127377170176223170047224321165 custom_func
ListBaseT< wmGizmoPropertyType > target_property_defs
wmGizmoFnInvoke invoke
wmGizmoFnDrawSelect draw_select
wmGizmoFnCursorGet cursor_get
wmGizmoFnScreenBoundsGet screen_bounds_get
wmGizmoFnMatrixBasisGet matrix_basis_get
wmGizmoFnSelectRefresh select_refresh
wmGizmoFnPropertyUpdate property_update
wmGizmoFnTestSelect test_select
float matrix_basis[4][4]
float matrix_space[4][4]
IDProperty * properties
float matrix_offset[4][4]
const wmGizmoType * type
wmGizmoGroup * parent_gzgroup
Vector< wmGizmoProperty, 0 > target_properties
eWM_GizmoFlag flag
wmGizmoFnModal custom_modal
eWM_GizmoFlagState state
union blender::wmGizmo::@207216221077365030243271316333035277144006330157 temp
Vector< wmGizmoOpElem, 4 > op_data