Blender  V2.93
button2d_gizmo.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
29 #include "MEM_guardedalloc.h"
30 
31 #include "BLI_math.h"
32 
33 #include "BKE_context.h"
34 
35 #include "GPU_batch.h"
36 #include "GPU_batch_utils.h"
37 #include "GPU_immediate.h"
38 #include "GPU_immediate_util.h"
39 #include "GPU_matrix.h"
40 #include "GPU_select.h"
41 #include "GPU_state.h"
42 
43 #include "RNA_access.h"
44 #include "RNA_define.h"
45 #include "RNA_enum_types.h"
46 
47 #include "WM_api.h"
48 #include "WM_types.h"
49 
50 #include "ED_gizmo_library.h"
51 #include "ED_screen.h"
52 #include "ED_view3d.h"
53 
54 #include "UI_interface.h"
55 #include "UI_interface_icons.h"
56 #include "UI_resources.h"
57 
58 /* own includes */
59 #include "../gizmo_geometry.h"
60 #include "../gizmo_library_intern.h"
61 
62 typedef struct ButtonGizmo2D {
64  bool is_init;
65  /* Use an icon or shape */
66  int icon;
69 
70 #define CIRCLE_RESOLUTION 32
71 
72 /* -------------------------------------------------------------------- */
73 
74 static void button2d_geom_draw_backdrop(const wmGizmo *gz,
75  const float color[4],
76  const float fill_alpha,
77  const bool select)
78 {
79  float viewport[4];
80  GPU_viewport_size_get_f(viewport);
81 
84 
85  /* TODO, other draw styles */
86  if (color[3] == 1.0 && fill_alpha == 1.0 && select == false) {
88  immUniformColor4fv(color);
91 
93  immUniform2fv("viewportSize", &viewport[2]);
94  immUniform1f("lineWidth", gz->line_width * U.pixelsize);
95  immUniformColor4fv(color);
98  }
99  else {
100  /* Draw fill. */
101  if ((fill_alpha != 0.0f) || (select == true)) {
102  const float fill_color[4] = {UNPACK3(color), fill_alpha * color[3]};
104  immUniformColor4fv(fill_color);
107  }
108 
109  /* Draw outline. */
110  if ((fill_alpha != 1.0f) && (select == false)) {
112  immUniform2fv("viewportSize", &viewport[2]);
113  immUniform1f("lineWidth", gz->line_width * U.pixelsize);
114  immUniformColor4fv(color);
117  }
118  }
119 
121 }
122 
123 static void button2d_draw_intern(const bContext *C,
124  wmGizmo *gz,
125  const bool select,
126  const bool highlight)
127 {
128  ButtonGizmo2D *button = (ButtonGizmo2D *)gz;
129  float viewport[4];
130  GPU_viewport_size_get_f(viewport);
131 
132  const int draw_options = RNA_enum_get(gz->ptr, "draw_options");
133  if (button->is_init == false) {
134  button->is_init = true;
135  PropertyRNA *prop = RNA_struct_find_property(gz->ptr, "icon");
136  button->icon = -1;
137  if (RNA_property_is_set(gz->ptr, prop)) {
138  button->icon = RNA_property_enum_get(gz->ptr, prop);
139  }
140  else {
141  prop = RNA_struct_find_property(gz->ptr, "shape");
142  const uint polys_len = RNA_property_string_length(gz->ptr, prop);
143  /* We shouldn't need the +1, but a NULL char is set. */
144  char *polys = MEM_mallocN(polys_len + 1, __func__);
145  RNA_property_string_get(gz->ptr, prop, polys);
147  (uchar *)polys, polys_len, NULL);
149  (uchar *)polys, polys_len, NULL);
150  MEM_freeN(polys);
151  }
152  }
153 
154  float color[4];
155  float matrix_final[4][4];
156 
157  gizmo_color_get(gz, highlight, color);
158  WM_gizmo_calc_matrix_final(gz, matrix_final);
159 
160  bool is_3d = (gz->parent_gzgroup->type->flag & WM_GIZMOGROUPTYPE_3D) != 0;
161 
162  if ((select == false) && (draw_options & ED_GIZMO_BUTTON_SHOW_HELPLINE)) {
163  float matrix_final_no_offset[4][4];
164  WM_gizmo_calc_matrix_final_no_offset(gz, matrix_final_no_offset);
167  immUniform2fv("viewportSize", &viewport[2]);
168  immUniform1f("lineWidth", gz->line_width * U.pixelsize);
169  immUniformColor4fv(color);
171  immVertex3fv(pos, matrix_final[3]);
172  immVertex3fv(pos, matrix_final_no_offset[3]);
173  immEnd();
175  }
176 
177  bool need_to_pop = true;
178  GPU_matrix_push();
179  GPU_matrix_mul(matrix_final);
180 
181  if (is_3d) {
183  float matrix_align[4][4];
184  float matrix_final_unit[4][4];
185  normalize_m4_m4(matrix_final_unit, matrix_final);
186  mul_m4_m4m4(matrix_align, rv3d->viewmat, matrix_final_unit);
187  zero_v3(matrix_align[3]);
188  transpose_m4(matrix_align);
189  GPU_matrix_mul(matrix_align);
190  }
191 
192  if (select) {
193  BLI_assert(is_3d);
194  button2d_geom_draw_backdrop(gz, color, 1.0, select);
195  }
196  else {
197 
199 
200  if (draw_options & ED_GIZMO_BUTTON_SHOW_BACKDROP) {
201  const float fill_alpha = RNA_float_get(gz->ptr, "backdrop_fill_alpha");
202  button2d_geom_draw_backdrop(gz, color, fill_alpha, select);
203  }
204 
205  if (button->shape_batch[0] != NULL) {
206  GPU_line_smooth(true);
207  GPU_polygon_smooth(false);
208  for (uint i = 0; i < ARRAY_SIZE(button->shape_batch) && button->shape_batch[i]; i++) {
209  const bool do_wires = (i == 1);
210  if (do_wires) {
213  GPU_batch_uniform_2fv(button->shape_batch[i], "viewportSize", &viewport[2]);
214  GPU_batch_uniform_1f(button->shape_batch[i], "lineWidth", gz->line_width * U.pixelsize);
215  }
216  else {
218  }
219 
220  /* Invert line color for wire. */
221  if (draw_options & ED_GIZMO_BUTTON_SHOW_BACKDROP) {
222  /* If we have a backdrop already,
223  * draw a contrasting shape over it instead of drawing it the same color.
224  * Use a low value instead of 50% so some darker primary colors
225  * aren't considered being close to black. */
226  float color_contrast[4];
227  copy_v3_fl(color_contrast, rgb_to_grayscale(color) < 0.2f ? 1 : 0);
228  color_contrast[3] = color[3];
229  GPU_shader_uniform_4f(button->shape_batch[i]->shader, "color", UNPACK4(color_contrast));
230  }
231  else {
232  GPU_shader_uniform_4f(button->shape_batch[i]->shader, "color", UNPACK4(color));
233  }
234 
235  GPU_batch_draw(button->shape_batch[i]);
236 
237  if (draw_options & ED_GIZMO_BUTTON_SHOW_OUTLINE) {
238  color[0] = 1.0f - color[0];
239  color[1] = 1.0f - color[1];
240  color[2] = 1.0f - color[2];
241  }
242  }
243  GPU_line_smooth(false);
244  GPU_polygon_smooth(true);
245  }
246  else if (button->icon != -1) {
247  float pos[2];
248  if (is_3d) {
249  const float fac = 2.0f;
250  GPU_matrix_translate_2f(-(fac / 2), -(fac / 2));
252  fac / (ICON_DEFAULT_HEIGHT * UI_DPI_FAC));
253  pos[0] = 1.0f;
254  pos[1] = 1.0f;
255  }
256  else {
257  pos[0] = gz->matrix_basis[3][0] - (ICON_DEFAULT_WIDTH / 2.0) * UI_DPI_FAC;
258  pos[1] = gz->matrix_basis[3][1] - (ICON_DEFAULT_HEIGHT / 2.0) * UI_DPI_FAC;
259  GPU_matrix_pop();
260  need_to_pop = false;
261  }
262 
263  float alpha = (highlight) ? 1.0f : 0.8f;
264  GPU_polygon_smooth(false);
265  UI_icon_draw_alpha(pos[0], pos[1], button->icon, alpha);
266  GPU_polygon_smooth(true);
267  }
269  }
270 
271  if (need_to_pop) {
272  GPU_matrix_pop();
273  }
274 }
275 
276 static void gizmo_button2d_draw_select(const bContext *C, wmGizmo *gz, int select_id)
277 {
278  GPU_select_load_id(select_id);
279  button2d_draw_intern(C, gz, true, false);
280 }
281 
282 static void gizmo_button2d_draw(const bContext *C, wmGizmo *gz)
283 {
284  const bool is_highlight = (gz->state & WM_GIZMO_STATE_HIGHLIGHT) != 0;
285 
287  button2d_draw_intern(C, gz, false, is_highlight);
289 }
290 
291 static int gizmo_button2d_test_select(bContext *C, wmGizmo *gz, const int mval[2])
292 {
293  float point_local[2];
294 
295  if (0) {
296  /* correct, but unnecessarily slow. */
297  if (gizmo_window_project_2d(C, gz, (const float[2]){UNPACK2(mval)}, 2, true, point_local) ==
298  false) {
299  return -1;
300  }
301  }
302  else {
303  copy_v2_v2(point_local, (float[2]){UNPACK2(mval)});
304  sub_v2_v2(point_local, gz->matrix_basis[3]);
305  mul_v2_fl(point_local, 1.0f / gz->scale_final);
306  }
307  /* The 'gz->scale_final' is already applied when projecting. */
308  if (len_squared_v2(point_local) < 1.0f) {
309  return 0;
310  }
311 
312  return -1;
313 }
314 
316 {
317  if (RNA_boolean_get(gz->ptr, "show_drag")) {
318  return WM_CURSOR_NSEW_SCROLL;
319  }
320  return WM_CURSOR_DEFAULT;
321 }
322 
323 static bool gizmo_button2d_bounds(bContext *C, wmGizmo *gz, rcti *r_bounding_box)
324 {
326  float rad = CIRCLE_RESOLUTION * U.dpi_fac / 2.0f;
327  const float *co = NULL;
328  float matrix_final[4][4];
329  float co_proj[3];
330  WM_gizmo_calc_matrix_final(gz, matrix_final);
331 
333  ARegion *region = CTX_wm_region(C);
334  if (ED_view3d_project_float_global(region, matrix_final[3], co_proj, V3D_PROJ_TEST_NOP) ==
335  V3D_PROJ_RET_OK) {
336  float matrix_final_no_offset[4][4];
337  const RegionView3D *rv3d = region->regiondata;
338  WM_gizmo_calc_matrix_final_no_offset(gz, matrix_final_no_offset);
339  const float factor = ED_view3d_pixel_size_no_ui_scale(rv3d, matrix_final_no_offset[3]) /
340  ED_view3d_pixel_size_no_ui_scale(rv3d, matrix_final[3]);
341  /* It's possible (although unlikely) `matrix_final_no_offset` is behind the view.
342  * `matrix_final` has already been projected so both can't be negative. */
343  if (factor > 0.0f) {
344  rad *= factor;
345  }
346  co = co_proj;
347  }
348  }
349  else {
350  co = matrix_final[3];
351  }
352 
353  if (co != NULL) {
354  r_bounding_box->xmin = co[0] + area->totrct.xmin - rad;
355  r_bounding_box->ymin = co[1] + area->totrct.ymin - rad;
356  r_bounding_box->xmax = r_bounding_box->xmin + rad;
357  r_bounding_box->ymax = r_bounding_box->ymin + rad;
358  return true;
359  }
360  return false;
361 }
362 
363 static void gizmo_button2d_free(wmGizmo *gz)
364 {
365  ButtonGizmo2D *shape = (ButtonGizmo2D *)gz;
366 
367  for (uint i = 0; i < ARRAY_SIZE(shape->shape_batch); i++) {
369  }
370 }
371 
374 /* -------------------------------------------------------------------- */
379 {
380  /* identifiers */
381  gzt->idname = "GIZMO_GT_button_2d";
382 
383  /* api callbacks */
384  gzt->draw = gizmo_button2d_draw;
389  gzt->free = gizmo_button2d_free;
390 
391  gzt->struct_size = sizeof(ButtonGizmo2D);
392 
393  /* rna */
394  static EnumPropertyItem rna_enum_draw_options[] = {
395  {ED_GIZMO_BUTTON_SHOW_OUTLINE, "OUTLINE", 0, "Outline", ""},
396  {ED_GIZMO_BUTTON_SHOW_BACKDROP, "BACKDROP", 0, "Backdrop", ""},
397  {ED_GIZMO_BUTTON_SHOW_HELPLINE, "HELPLINE", 0, "Help Line", ""},
398  {0, NULL, 0, NULL, NULL},
399  };
400  PropertyRNA *prop;
401 
402  RNA_def_enum_flag(gzt->srna, "draw_options", rna_enum_draw_options, 0, "Draw Options", "");
403 
404  prop = RNA_def_property(gzt->srna, "icon", PROP_ENUM, PROP_NONE);
406 
407  /* Passed to 'GPU_batch_tris_from_poly_2d_encoded' */
409 
410  /* Currently only used for cursor display. */
411  RNA_def_boolean(gzt->srna, "show_drag", true, "Show Drag", "");
412 
413  RNA_def_float(gzt->srna,
414  "backdrop_fill_alpha",
415  1.0f,
416  0.0f,
417  1.0,
418  "When below 1.0, draw the interior with a reduced alpha compared to the outline",
419  "",
420  0.0f,
421  1.0f);
422 }
423 
425 {
427 }
428  /* Button Gizmo API */
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:714
struct ARegion * CTX_wm_region(const bContext *C)
Definition: context.c:725
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
Definition: context.c:769
#define BLI_assert(a)
Definition: BLI_assert.h:58
MINLINE float rgb_to_grayscale(const float rgb[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
Definition: math_matrix.c:262
void normalize_m4_m4(float R[4][4], const float M[4][4]) ATTR_NONNULL()
Definition: math_matrix.c:1972
void transpose_m4(float R[4][4])
Definition: math_matrix.c:1358
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
unsigned char uchar
Definition: BLI_sys_types.h:86
unsigned int uint
Definition: BLI_sys_types.h:83
#define UNPACK2(a)
#define UNPACK4(a)
#define ARRAY_SIZE(arr)
#define UNUSED_VARS(...)
#define UNPACK3(a)
@ ED_GIZMO_BUTTON_SHOW_BACKDROP
@ ED_GIZMO_BUTTON_SHOW_OUTLINE
@ ED_GIZMO_BUTTON_SHOW_HELPLINE
@ V3D_PROJ_TEST_NOP
Definition: ED_view3d.h:193
@ V3D_PROJ_RET_OK
Definition: ED_view3d.h:176
float ED_view3d_pixel_size_no_ui_scale(const struct RegionView3D *rv3d, const float co[3])
eV3DProjStatus ED_view3d_project_float_global(const struct ARegion *region, const float co[3], float r_co[2], const eV3DProjTest flag)
GPUBatch
Definition: GPU_batch.h:93
#define GPU_batch_uniform_1f(batch, name, x)
Definition: GPU_batch.h:134
void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id)
Definition: gpu_batch.cc:299
#define GPU_batch_uniform_2fv(batch, name, val)
Definition: GPU_batch.h:140
#define GPU_BATCH_DISCARD_SAFE(batch)
Definition: GPU_batch.h:199
void GPU_batch_draw(GPUBatch *batch)
Definition: gpu_batch.cc:234
struct GPUBatch * GPU_batch_tris_from_poly_2d_encoded(const uchar *polys_flat, uint polys_flat_len, const struct rctf *rect) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
struct GPUBatch * GPU_batch_wire_from_poly_2d_encoded(const uchar *polys_flat, uint polys_flat_len, const struct rctf *rect) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void immUniform2fv(const char *name, const float data[2])
void immUnbindProgram(void)
void immBindBuiltinProgram(eGPUBuiltinShader shader_id)
void immUniform1f(const char *name, float x)
void immUniformColor4fv(const float rgba[4])
GPUVertFormat * immVertexFormat(void)
void immVertex3fv(uint attr_id, const float data[3])
void immBegin(GPUPrimType, uint vertex_len)
void immEnd(void)
void imm_draw_circle_fill_2d(uint shdr_pos, float x, float y, float radius, int nsegments)
void imm_draw_circle_wire_2d(uint shdr_pos, float x, float y, float radius, int nsegments)
void GPU_matrix_pop(void)
Definition: gpu_matrix.cc:142
void GPU_matrix_scale_2f(float x, float y)
Definition: gpu_matrix.cc:232
#define GPU_matrix_mul(x)
Definition: GPU_matrix.h:223
void GPU_matrix_push(void)
Definition: gpu_matrix.cc:135
void GPU_matrix_translate_2f(float x, float y)
Definition: gpu_matrix.cc:190
@ GPU_PRIM_LINE_STRIP
Definition: GPU_primitive.h:38
bool GPU_select_load_id(unsigned int id)
Definition: gpu_select.c:108
void GPU_shader_uniform_4f(GPUShader *sh, const char *name, float x, float y, float z, float w)
Definition: gpu_shader.cc:662
@ GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR
Definition: GPU_shader.h:223
@ GPU_SHADER_2D_UNIFORM_COLOR
Definition: GPU_shader.h:171
@ GPU_SHADER_3D_UNIFORM_COLOR
Definition: GPU_shader.h:200
@ GPU_BLEND_NONE
Definition: GPU_state.h:55
@ GPU_BLEND_ALPHA
Definition: GPU_state.h:57
void GPU_blend(eGPUBlend blend)
Definition: gpu_state.cc:55
void GPU_line_smooth(bool enable)
Definition: gpu_state.cc:85
void GPU_viewport_size_get_f(float coords[4])
Definition: gpu_state.cc:279
void GPU_polygon_smooth(bool enable)
Definition: gpu_state.cc:90
@ GPU_FETCH_FLOAT
uint GPU_vertformat_attr_add(GPUVertFormat *, const char *name, GPUVertCompType, uint comp_len, GPUVertFetchMode)
@ GPU_COMP_F32
Read Guarded memory(de)allocation.
@ PROP_ENUM
Definition: RNA_types.h:77
@ PROP_STRING
Definition: RNA_types.h:76
@ PROP_BYTESTRING
Definition: RNA_types.h:120
@ PROP_NONE
Definition: RNA_types.h:113
#define C
Definition: RandGen.cpp:39
#define UI_DPI_FAC
Definition: UI_interface.h:309
#define ICON_DEFAULT_HEIGHT
void UI_icon_draw_alpha(float x, float y, int icon_id, float alpha)
#define ICON_DEFAULT_WIDTH
@ WM_GIZMOGROUPTYPE_3D
@ WM_GIZMO_STATE_HIGHLIGHT
unsigned int U
Definition: btGjkEpa3.h:78
static void GIZMO_GT_button_2d(wmGizmoType *gzt)
static void button2d_draw_intern(const bContext *C, wmGizmo *gz, const bool select, const bool highlight)
static bool gizmo_button2d_bounds(bContext *C, wmGizmo *gz, rcti *r_bounding_box)
static void gizmo_button2d_free(wmGizmo *gz)
struct ButtonGizmo2D ButtonGizmo2D
static int gizmo_button2d_test_select(bContext *C, wmGizmo *gz, const int mval[2])
static int gizmo_button2d_cursor_get(wmGizmo *gz)
void ED_gizmotypes_button_2d(void)
static void button2d_geom_draw_backdrop(const wmGizmo *gz, const float color[4], const float fill_alpha, const bool select)
#define CIRCLE_RESOLUTION
static void gizmo_button2d_draw_select(const bContext *C, wmGizmo *gz, int select_id)
static void gizmo_button2d_draw(const bContext *C, wmGizmo *gz)
static CCL_NAMESPACE_BEGIN const double alpha
bool gizmo_window_project_2d(bContext *C, const struct wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2])
void gizmo_color_get(const struct wmGizmo *gz, const bool highlight, float r_color[4])
uint pos
format
Definition: logImageCore.h:47
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:47
static void area(int d1, int d2, int e1, int e2, float weights[2])
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:6655
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
Definition: rna_access.c:866
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
Definition: rna_access.c:3310
float RNA_float_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6355
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:3543
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6261
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6402
int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:3375
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
Definition: rna_define.c:3825
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3481
PropertyRNA * RNA_def_enum_flag(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3795
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1892
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1279
const EnumPropertyItem rna_enum_icon_items[]
Definition: rna_ui_api.c:46
void * regiondata
GPUBatch * shape_batch[2]
float viewmat[4][4]
int ymin
Definition: DNA_vec_types.h:80
int ymax
Definition: DNA_vec_types.h:80
int xmin
Definition: DNA_vec_types.h:79
int xmax
Definition: DNA_vec_types.h:79
eWM_GizmoFlagGroupTypeFlag flag
struct wmGizmoGroupType * type
wmGizmoFnDraw draw
wmGizmoFnScreenBoundsGet screen_bounds_get
const char * idname
wmGizmoFnTestSelect test_select
wmGizmoFnCursorGet cursor_get
struct StructRNA * srna
wmGizmoFnFree free
wmGizmoFnDrawSelect draw_select
eWM_GizmoFlagState state
struct wmGizmoGroup * parent_gzgroup
float matrix_basis[4][4]
float scale_final
struct PointerRNA * ptr
float line_width
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
Definition: util_avxb.h:167
@ WM_CURSOR_NSEW_SCROLL
Definition: wm_cursors.h:67
@ WM_CURSOR_DEFAULT
Definition: wm_cursors.h:34
void WM_gizmo_calc_matrix_final(const wmGizmo *gz, float r_mat[4][4])
Definition: wm_gizmo.c:601
void WM_gizmo_calc_matrix_final_no_offset(const wmGizmo *gz, float r_mat[4][4])
Definition: wm_gizmo.c:586
void WM_gizmotype_append(void(*gtfunc)(struct wmGizmoType *))