Blender V4.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
14#pragma once
15
16#include "BLI_compiler_attrs.h"
17#include "BLI_utildefines.h"
18#include "BLI_vector.hh"
19
20#include "DNA_listBase.h"
21
22struct wmGizmo;
23struct wmGizmoType;
24struct wmGizmoGroup;
25struct wmGizmoGroupType;
26struct wmGizmoMap;
27struct wmGizmoMapType;
28struct wmGizmoProperty;
30struct wmKeyConfig;
31struct wmOperatorType;
32
33/* -------------------------------------------------------------------- */
34/* Enum Typedef's. */
35
47
48
92
156
158
168
169
183
184/* -------------------------------------------------------------------- */
185/* #wmGizmo. */
186
187
199
200#include "wm_gizmo_fn.hh"
201
203 wmOperatorType *type = nullptr;
207
208 bool is_redo = false;
209};
210
212struct wmGizmo {
214
217
221
224
227
229
232
237
241
247
251
252 /* Transformation of the gizmo in 2d or 3d space.
253 * - Matrix axis are expected to be unit length (scale is applied after).
254 * - Behavior when axis aren't orthogonal depends on each gizmo.
255 * - Typically the +Z is the primary axis for gizmos to use.
256 * - 'matrix[3]' must be used for location,
257 * besides this it's up to the gizmos internal code how the
258 * rotation components are used for drawing and interaction. */
259
261 float matrix_space[4][4];
263 float matrix_basis[4][4];
265 float matrix_offset[4][4];
273 float color[4], color_hi[4];
274
277
281
283
286
288 union {
289 float f;
291
292 /* Over alloc target_properties after #wmGizmoType::struct_size. */
293};
294
312
325
332
334 short spaceid;
335 short regionid;
336};
337
405
406/* -------------------------------------------------------------------- */
407/* #wmGizmoGroup. */
408
414
471
500
501/* -------------------------------------------------------------------- */
502/* #wmGizmoMap. */
503
513#define WM_GIZMOMAP_DRAWSTEP_MAX 2
unsigned int uint
#define ENUM_OPERATORS(_type, _max)
These structs are the foundation for all linked lists in the library system.
eWM_GizmoFlagMapDrawStep
@ WM_GIZMOMAP_DRAWSTEP_3D
@ WM_GIZMOMAP_DRAWSTEP_2D
eWM_GizmoFlagTweak
Gizmo tweak flag. Bit-flag passed to gizmo while tweaking.
@ WM_GIZMO_TWEAK_PRECISE
@ WM_GIZMO_TWEAK_SNAP
eWM_GizmoFlagMapTypeUpdateFlag
@ WM_GIZMOMAPTYPE_UPDATE_REMOVE
@ WM_GIZMOMAPTYPE_KEYMAP_INIT
@ WM_GIZMOMAPTYPE_UPDATE_INIT
eWM_GizmoFlagGroupInitFlag
@ WM_GIZMOGROUP_INIT_REFRESH
@ WM_GIZMOGROUP_INIT_SETUP
eWM_GizmoFlag
@ WM_GIZMO_DRAW_NO_SCALE
@ WM_GIZMO_HIDDEN
@ WM_GIZMO_HIDDEN_KEYMAP
@ WM_GIZMO_EVENT_HANDLE_ALL
@ WM_GIZMO_OPERATOR_TOOL_INIT
@ WM_GIZMO_DRAW_VALUE
@ WM_GIZMO_MOVE_CURSOR
@ WM_GIZMO_DRAW_MODAL
@ WM_GIZMO_NEEDS_UNDO
@ WM_GIZMO_DRAW_HOVER
@ WM_GIZMO_DRAW_OFFSET_SCALE
@ WM_GIZMO_SELECT_BACKGROUND
@ WM_GIZMO_HIDDEN_SELECT
@ WM_GIZMO_NO_TOOLTIP
eWM_GizmoFlagGroupTypeFlag
@ WM_GIZMOGROUPTYPE_VR_REDRAWS
@ WM_GIZMOGROUPTYPE_DRAW_MODAL_EXCLUDE
@ WM_GIZMOGROUPTYPE_SCALE
@ WM_GIZMOGROUPTYPE_TOOL_INIT
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
@ WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK
@ WM_GIZMOGROUPTYPE_DEPTH_3D
@ WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL
@ WM_GIZMOGROUPTYPE_3D
@ WM_GIZMOGROUPTYPE_PERSISTENT
@ WM_GIZMOGROUPTYPE_SELECT
eWM_GizmoFlagState
@ WM_GIZMO_STATE_HIGHLIGHT
@ WM_GIZMO_STATE_MODAL
@ WM_GIZMO_STATE_SELECT
wmGizmoGroupTypeRef * next
wmGizmoGroupType * type
wmGizmoGroupTypeRef * prev
wmKeyConfig * keyconf
wmGizmoGroupFnSetupKeymap setup_keymap
wmGizmoGroupFnMsgBusSubscribe message_subscribe
wmGizmoGroupFnRefresh refresh
wmGizmoGroupFnInit setup
const char * idname
wmGizmoGroupFnInvokePrepare invoke_prepare
wmGizmoMapType_Params gzmap_params
eWM_GizmoFlagGroupTypeFlag flag
eWM_GizmoFlagMapTypeUpdateFlag type_update_flag
ExtensionRNA rna_ext
wmGizmoGroupFnPoll poll
wmGizmoGroupFnDrawPrepare draw_prepare
wmGizmoGroup * prev
union wmGizmoGroup::@1374 hide
eWM_GizmoFlagGroupInitFlag init_flag
wmGizmoMap * parent_gzmap
void(* customdata_free)(void *)
wmGizmoGroupType * type
wmGizmoGroup * next
uint delay_refresh_for_tweak
wmGizmoPropertyType * prev
wmGizmoPropertyType * next
wmGizmoPropertyFnRangeGet range_get_fn
const wmGizmoPropertyType * type
PropertyRNA * prop
wmGizmoPropertyFnGet value_get_fn
struct wmGizmoProperty::@1373 custom_func
wmGizmoPropertyFnSet value_set_fn
wmGizmoPropertyFnFree free_fn
StructRNA * srna
wmGizmoFnSelectRefresh select_refresh
wmGizmoFnDraw draw
ExtensionRNA rna_ext
wmGizmoFnModal modal
wmGizmoFnScreenBoundsGet screen_bounds_get
ListBase target_property_defs
wmGizmoFnSetup setup
int target_property_defs_len
wmGizmoFnMatrixBasisGet matrix_basis_get
const char * idname
wmGizmoFnTestSelect test_select
wmGizmoFnExit exit
wmGizmoFnCursorGet cursor_get
wmGizmoFnInvoke invoke
wmGizmoFnFree free
wmGizmoFnDrawSelect draw_select
wmGizmoFnPropertyUpdate property_update
wmGizmoGroup * parent_gzgroup
const wmGizmoType * type
void * interaction_data
eWM_GizmoFlagState state
float matrix_basis[4][4]
void * py_instance
float select_bias
float matrix_offset[4][4]
blender::Vector< wmGizmoOpElem, 4 > op_data
wmGizmo * prev
float color_hi[4]
float scale_final
union wmGizmo::@1372 temp
IDProperty * properties
PointerRNA * ptr
float scale_basis
wmGizmo * next
float matrix_space[4][4]
float line_width
eWM_GizmoFlag flag
wmKeyMap * keymap
wmGizmoFnModal custom_modal
int(*)(bContext *, wmGizmo *, const int mval[2]) wmGizmoFnTestSelect
void(*)(wmGizmo *, wmGizmoProperty *) wmGizmoFnPropertyUpdate
void(*)(bContext *, wmGizmo *, const bool) wmGizmoFnExit
void(*)(const bContext *, wmGizmo *) wmGizmoFnDraw
bool(*)(const bContext *, wmGizmoGroupType *) wmGizmoGroupFnPoll
void(*)(const wmGizmo *, wmGizmoProperty *, void *value) wmGizmoPropertyFnGet
void(*)(wmGizmo *) wmGizmoFnSelectRefresh
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnRefresh
void(*)(const wmGizmo *, wmGizmoProperty *, void *range) wmGizmoPropertyFnRangeGet
void(*)(const bContext *, wmGizmoGroup *, wmMsgBus *) wmGizmoGroupFnMsgBusSubscribe
void(*)(wmGizmo *) wmGizmoFnSetup
void(*)(wmGizmo *) wmGizmoFnFree
void(*)(const wmGizmo *, float[4][4]) wmGizmoFnMatrixBasisGet
wmKeyMap *(*)(const wmGizmoGroupType *, wmKeyConfig *) wmGizmoGroupFnSetupKeymap
int(*)(wmGizmo *) wmGizmoFnCursorGet
int(*)(bContext *, wmGizmo *, const wmEvent *, eWM_GizmoFlagTweak) wmGizmoFnModal
void(*)(const wmGizmo *, wmGizmoProperty *, const void *value) wmGizmoPropertyFnSet
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnDrawPrepare
void(*)(const bContext *, wmGizmoGroup *) wmGizmoGroupFnInit
void(*)(const bContext *, wmGizmoGroup *, wmGizmo *, const wmEvent *) wmGizmoGroupFnInvokePrepare
bool(*)(bContext *, wmGizmo *, rcti *r_bounding_box) wmGizmoFnScreenBoundsGet
int(*)(bContext *, wmGizmo *, const wmEvent *) wmGizmoFnInvoke
void(*)(const bContext *, wmGizmo *, int) wmGizmoFnDrawSelect
void(*)(const wmGizmo *, wmGizmoProperty *) wmGizmoPropertyFnFree