Blender V5.0
transform_gizmo_extrude_3d.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 "BLI_array_utils.h"
10#include "BLI_listbase.h"
11#include "BLI_math_matrix.h"
12#include "BLI_math_vector.h"
13#include "BLI_utildefines.h"
14
15#include "BKE_context.hh"
16#include "BKE_global.hh"
17#include "BKE_scene.hh"
18
19#include "RNA_access.hh"
20#include "RNA_define.hh"
21
22#include "WM_api.hh"
23#include "WM_message.hh"
24#include "WM_toolsystem.hh"
25#include "WM_types.hh"
26
27#include "ED_gizmo_library.hh"
28#include "ED_gizmo_utils.hh"
29#include "ED_screen.hh"
30#include "ED_transform.hh"
31
32#include "UI_resources.hh"
33
34#include "MEM_guardedalloc.h"
35
36namespace blender::ed::transform {
37
38/* -------------------------------------------------------------------- */
41
42enum {
45};
46
47static const float extrude_button_scale = 0.15f;
48static const float extrude_button_offset_scale = 1.5f;
49static const float extrude_outer_scale = 1.2f;
50static const float extrude_arrow_scale = 0.7f;
51static const float extrude_arrow_xyz_axis_scale = 0.6666f;
52static const float extrude_arrow_normal_axis_scale = 0.6666f;
53static const float extrude_dial_scale = 0.2;
54
55static const uchar shape_plus[] = {
56 0x73, 0x73, 0x73, 0x36, 0x8c, 0x36, 0x8c, 0x73, 0xc9, 0x73, 0xc9, 0x8c, 0x8c,
57 0x8c, 0x8c, 0xc9, 0x73, 0xc9, 0x73, 0x8c, 0x36, 0x8c, 0x36, 0x73, 0x36, 0x73,
58};
59
61
62 /* XYZ & normal. */
64 /* Only visible when 'drag' tool option is disabled. */
66 /* Constrained & unconstrained (arrow & circle). */
69
70 /* Copied from the transform operator,
71 * use to redo with the same settings. */
72 struct {
73 float orient_matrix[3][3];
75 float value[4];
78
79 /* Depends on object type. */
81
82 struct {
83 float normal_mat3[3][3]; /* Use Z axis for normal. */
86
89};
90
92 const float mat[3][3])
93{
94 for (int i = 0; i < 3; i++) {
96 mat[i],
99 }
100}
101
103 const float mat[3][3])
104{
105 /* Set orientation without location. */
106 for (int j = 0; j < 3; j++) {
107 copy_v3_v3(ggd->adjust[0]->matrix_basis[j], mat[j]);
108 }
109 /* NOP when (i == 2). */
110 swap_v3_v3(ggd->adjust[0]->matrix_basis[ggd->adjust_axis], ggd->adjust[0]->matrix_basis[2]);
111}
112
113static void gizmo_mesh_extrude_setup(const bContext *C, wmGizmoGroup *gzgroup)
114{
116 gzgroup->customdata = ggd;
117
118 const wmGizmoType *gzt_arrow = WM_gizmotype_find("GIZMO_GT_arrow_3d", true);
119 const wmGizmoType *gzt_move = WM_gizmotype_find("GIZMO_GT_button_2d", true);
120 const wmGizmoType *gzt_dial = WM_gizmotype_find("GIZMO_GT_dial_3d", true);
121
122 ggd->adjust[0] = WM_gizmo_new_ptr(gzt_arrow, gzgroup, nullptr);
123 ggd->adjust[1] = WM_gizmo_new_ptr(gzt_dial, gzgroup, nullptr);
125
126 for (int i = 0; i < 4; i++) {
127 ggd->invoke_xyz_no[i] = WM_gizmo_new_ptr(gzt_move, gzgroup, nullptr);
129 }
130
131 {
132 ggd->invoke_view = WM_gizmo_new_ptr(gzt_dial, gzgroup, nullptr);
133 ggd->invoke_view->select_bias = -2.0f;
135 }
136
137 {
138 PropertyRNA *prop = RNA_struct_find_property(ggd->invoke_xyz_no[3]->ptr, "shape");
139 for (int i = 0; i < 4; i++) {
141 ggd->invoke_xyz_no[i]->ptr, prop, (const char *)shape_plus, ARRAY_SIZE(shape_plus));
142 }
143 }
144
145 {
146 const char *op_idname = nullptr;
147 /* Grease pencil does not use `obedit`. */
148 /* GPXX: Remove if #OB_MODE_EDIT_GPENCIL_LEGACY is merged with #OB_MODE_EDIT. */
149 const Object *obact = CTX_data_active_object(C);
150 if (obact->type == OB_MESH) {
151 op_idname = "MESH_OT_extrude_context_move";
152 ggd->normal_axis = 2;
153 }
154 else if (obact->type == OB_ARMATURE) {
155 op_idname = "ARMATURE_OT_extrude_move";
156 ggd->normal_axis = 1;
157 }
158 else if (obact->type == OB_CURVES_LEGACY) {
159 op_idname = "CURVE_OT_extrude_move";
160 ggd->normal_axis = 2;
161 }
162 else {
163 BLI_assert(0);
164 }
165 ggd->ot_extrude = WM_operatortype_find(op_idname, true);
166 ggd->gzgt_axis_type_prop = RNA_struct_type_find_property(gzgroup->type->srna, "axis_type");
167 }
168
169 for (int i = 0; i < 3; i++) {
171 }
173 ggd->invoke_view->color[3] = 0.5f;
174
175 for (int i = 0; i < 2; i++) {
177 }
178
179 for (int i = 0; i < 4; i++) {
181 }
183 ggd->invoke_view->line_width = 2.0f;
184
187 ggd->adjust[1]->line_width = 2.0f;
188
189 /* XYZ & normal axis extrude. */
190 for (int i = 0; i < 4; i++) {
191 PointerRNA *ptr = WM_gizmo_operator_set(ggd->invoke_xyz_no[i], 0, ggd->ot_extrude, nullptr);
192 {
193 bool constraint[3] = {false, false, false};
194 constraint[(i < 3) ? i : ggd->normal_axis] = true;
195 PointerRNA macroptr = RNA_pointer_get(ptr, "TRANSFORM_OT_translate");
196 RNA_boolean_set(&macroptr, "release_confirm", true);
197 RNA_boolean_set_array(&macroptr, "constraint_axis", constraint);
198 }
199 }
200
201 {
202 PointerRNA *ptr = WM_gizmo_operator_set(ggd->invoke_view, 0, ggd->ot_extrude, nullptr);
203 PointerRNA macroptr = RNA_pointer_get(ptr, "TRANSFORM_OT_translate");
204 RNA_boolean_set(&macroptr, "release_confirm", true);
205
206 const bool constraint[3] = {false, false, false};
207 RNA_boolean_set_array(&macroptr, "constraint_axis", constraint);
208 }
209
210 /* Adjust extrude. */
211 for (int i = 0; i < 2; i++) {
212 wmGizmo *gz = ggd->adjust[i];
213 PointerRNA *ptr = WM_gizmo_operator_set(gz, 0, ggd->ot_extrude, nullptr);
214 PointerRNA macroptr = RNA_pointer_get(ptr, "TRANSFORM_OT_translate");
215 RNA_boolean_set(&macroptr, "release_confirm", true);
217 gzop->is_redo = true;
218 }
219}
220
222{
223 GizmoExtrudeGroup *ggd = static_cast<GizmoExtrudeGroup *>(gzgroup->customdata);
224
225 for (int i = 0; i < 4; i++) {
227 }
229 for (int i = 0; i < 2; i++) {
231 }
232
233 if (G.moving) {
234 return;
235 }
236
237 Scene *scene = CTX_data_scene(C);
238 RegionView3D *rv3d = static_cast<RegionView3D *>(CTX_wm_region_data(C));
239
240 int axis_type;
241 {
246 }
247
249 const bool use_normal = ((ggd->data.orientation_index != V3D_ORIENT_NORMAL) ||
250 (axis_type == EXTRUDE_AXIS_NORMAL));
251 const int axis_len_used = use_normal ? 4 : 3;
252
253 TransformBounds tbounds;
254
255 if (use_normal) {
256 TransformBounds tbounds_normal;
258 params.orientation_index = V3D_ORIENT_NORMAL + 1;
259 if (!calc_gizmo_stats(C, &params, &tbounds_normal, rv3d)) {
260 unit_m3(tbounds_normal.axis);
261 }
262 copy_m3_m3(ggd->data.normal_mat3, tbounds_normal.axis);
263 }
264
265 /* TODO(@ideasman42): run second since this modifies the 3D view, it should not. */
267 params.orientation_index = ggd->data.orientation_index + 1;
268 if (!calc_gizmo_stats(C, &params, &tbounds, rv3d)) {
269 return;
270 }
271
272 /* Main axis is normal. */
273 if (!use_normal) {
274 copy_m3_m3(ggd->data.normal_mat3, tbounds.axis);
275 }
276
277 /* Offset the add icon. */
279 ggd->data.normal_mat3[ggd->normal_axis],
282
283 /* Adjust current operator. */
284 /* Don't use 'WM_operator_last_redo' because selection actions will be ignored. */
285 wmOperator *op = static_cast<wmOperator *>(CTX_wm_manager(C)->runtime->operators.last);
286 bool has_redo = (op && op->type == ggd->ot_extrude);
287 wmOperator *op_xform = static_cast<wmOperator *>(has_redo ? op->macro.last : nullptr);
288
289 bool adjust_is_flip = false;
290 wmGizmo *gz_adjust = nullptr;
291
292 if (has_redo) {
293 gz_adjust = ggd->adjust[1];
294 /* We can't access this from 'ot->last_properties'
295 * because some properties use skip-save. */
296 RNA_float_get_array(op_xform->ptr, "orient_matrix", &ggd->redo_xform.orient_matrix[0][0]);
297 RNA_boolean_get_array(op_xform->ptr, "constraint_axis", ggd->redo_xform.constraint_axis);
298 RNA_float_get_array(op_xform->ptr, "value", ggd->redo_xform.value);
299 ggd->redo_xform.orient_type = RNA_enum_get(op_xform->ptr, "orient_type");
300
301 /* Set properties for redo. */
302 for (int i = 0; i < 3; i++) {
303 if (ggd->redo_xform.constraint_axis[i]) {
304 adjust_is_flip = ggd->redo_xform.value[i] < 0.0f;
305 ggd->adjust_axis = i;
306 gz_adjust = ggd->adjust[0];
307 break;
308 }
309 }
310 }
311
312 /* Needed for normal orientation. */
314
315 /* Location. */
316 for (int i = 0; i < axis_len_used; i++) {
318 }
320 /* Un-hide. */
321 for (int i = 0; i < axis_len_used; i++) {
323 }
324
325 if (has_redo) {
326 if (gz_adjust == ggd->adjust[0]) {
328 if (adjust_is_flip) {
329 negate_v3(ggd->adjust[0]->matrix_basis[2]);
330 }
331 }
332 WM_gizmo_set_matrix_location(gz_adjust, tbounds.center);
333 WM_gizmo_set_flag(gz_adjust, WM_GIZMO_HIDDEN, false);
334 }
335
336 /* Redo with current settings. */
337 if (has_redo) {
338 for (int i = 0; i < 4; i++) {
340 "draw_options",
342 (((gz_adjust == ggd->adjust[0]) &&
343 dot_v3v3(ggd->adjust[0]->matrix_basis[2],
344 ggd->invoke_xyz_no[i]->matrix_offset[3]) > 0.98f) ?
345 0 :
347 }
348 }
349 else {
350 for (int i = 0; i < 4; i++) {
352 "draw_options",
354 }
355 }
356
357 /* TODO: skip calculating axis which won't be used (above). */
358 switch (axis_type) {
360 for (int i = 0; i < 3; i++) {
362 }
363 break;
364 case EXTRUDE_AXIS_XYZ:
366 break;
367 }
368
371 }
372 else {
374 }
375}
376
378{
379 GizmoExtrudeGroup *ggd = static_cast<GizmoExtrudeGroup *>(gzgroup->customdata);
380 switch (ggd->data.orientation_index) {
381 case V3D_ORIENT_VIEW: {
383 float mat[3][3];
384 copy_m3_m4(mat, rv3d->viewinv);
385 normalize_m3(mat);
387 break;
388 }
389 }
390
391 /* Basic ordering for drawing only. */
392 {
394 LISTBASE_FOREACH (wmGizmo *, gz, &gzgroup->gizmos) {
395 gz->temp.f = dot_v3v3(rv3d->viewinv[2], gz->matrix_offset[3]);
396 }
398
399 if ((ggd->adjust[1]->flag & WM_GIZMO_HIDDEN) == 0) {
400 copy_v3_v3(ggd->adjust[1]->matrix_basis[0], rv3d->viewinv[0]);
401 copy_v3_v3(ggd->adjust[1]->matrix_basis[1], rv3d->viewinv[1]);
402 copy_v3_v3(ggd->adjust[1]->matrix_basis[2], rv3d->viewinv[2]);
403 }
404 if ((ggd->invoke_view->flag & WM_GIZMO_HIDDEN) == 0) {
405 copy_v3_v3(ggd->invoke_view->matrix_basis[0], rv3d->viewinv[0]);
406 copy_v3_v3(ggd->invoke_view->matrix_basis[1], rv3d->viewinv[1]);
407 copy_v3_v3(ggd->invoke_view->matrix_basis[2], rv3d->viewinv[2]);
408 }
409 }
410}
411
413 wmGizmoGroup *gzgroup,
414 wmGizmo *gz,
415 const wmEvent * /*event*/)
416{
417 GizmoExtrudeGroup *ggd = static_cast<GizmoExtrudeGroup *>(gzgroup->customdata);
418 if (ELEM(gz, ggd->adjust[0], ggd->adjust[1])) {
419 /* Set properties for redo. */
421 PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, "TRANSFORM_OT_translate");
422 if (gz == ggd->adjust[0]) {
423 RNA_boolean_set_array(&macroptr, "constraint_axis", ggd->redo_xform.constraint_axis);
424 RNA_float_set_array(&macroptr, "orient_matrix", &ggd->redo_xform.orient_matrix[0][0]);
425 RNA_enum_set(&macroptr, "orient_matrix_type", ggd->redo_xform.orient_type);
426 RNA_enum_set(&macroptr, "orient_type", ggd->redo_xform.orient_type);
427 }
428 RNA_float_set_array(&macroptr, "value", ggd->redo_xform.value);
429 }
430 else if (gz == ggd->invoke_view) {
431 /* Pass. */
432 }
433 else {
434 /* Workaround for extrude action modifying normals. */
435 const int i = BLI_array_findindex(ggd->invoke_xyz_no, ARRAY_SIZE(ggd->invoke_xyz_no), &gz);
436 BLI_assert(i != -1);
437 bool use_normal_matrix = false;
438 if (i == 3) {
439 use_normal_matrix = true;
440 }
441 else if (ggd->data.orientation_index == V3D_ORIENT_NORMAL) {
442 use_normal_matrix = true;
443 }
444 if (use_normal_matrix) {
446 PointerRNA macroptr = RNA_pointer_get(&gzop->ptr, "TRANSFORM_OT_translate");
447 RNA_float_set_array(&macroptr, "orient_matrix", &ggd->data.normal_mat3[0][0]);
448 RNA_enum_set(&macroptr, "orient_type", V3D_ORIENT_NORMAL);
449 }
450 }
451}
452
454 wmGizmoGroup *gzgroup,
455 wmMsgBus *mbus)
456{
457 GizmoExtrudeGroup *ggd = static_cast<GizmoExtrudeGroup *>(gzgroup->customdata);
458 ARegion *region = CTX_wm_region(C);
459
460 /* Subscribe to view properties. */
461 wmMsgSubscribeValue msg_sub_value_gz_tag_refresh{};
462 msg_sub_value_gz_tag_refresh.owner = region;
463 msg_sub_value_gz_tag_refresh.user_data = gzgroup->parent_gzmap;
464 msg_sub_value_gz_tag_refresh.notify = WM_gizmo_do_msg_notify_tag_refresh;
465
466 {
468 mbus, TransformOrientationSlot, type, &msg_sub_value_gz_tag_refresh);
469 }
470
472 params.ptr.type = gzgroup->type->srna;
473 params.prop = ggd->gzgt_axis_type_prop;
474 WM_msg_subscribe_rna_params(mbus, &params, &msg_sub_value_gz_tag_refresh, __func__);
475
476 {
477 Scene *scene = CTX_data_scene(C);
478 PointerRNA toolsettings_ptr = RNA_pointer_create_discrete(
479 &scene->id, &RNA_ToolSettings, scene->toolsettings);
480 const PropertyRNA *props[] = {
481 &rna_ToolSettings_workspace_tool_type,
482 };
483 for (int i = 0; i < ARRAY_SIZE(props); i++) {
485 mbus, &toolsettings_ptr, props[i], &msg_sub_value_gz_tag_refresh, __func__);
486 }
487 }
488}
489
491{
492 gzgt->name = "3D View Extrude";
493 gzgt->idname = "VIEW3D_GGT_xform_extrude";
494
497
500
508
509 static const EnumPropertyItem axis_type_items[] = {
510 {EXTRUDE_AXIS_NORMAL, "NORMAL", 0, "Normal", "Only show normal axis"},
511 {EXTRUDE_AXIS_XYZ, "XYZ", 0, "XYZ", "Follow scene orientation"},
512 {0, nullptr, 0, nullptr, nullptr},
513 };
514 RNA_def_enum(gzgt->srna, "axis_type", axis_type_items, 0, "Axis Type", "");
515}
516
518
519} // namespace blender::ed::transform
void * CTX_wm_region_data(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
RegionView3D * CTX_wm_region_view3d(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
int BKE_scene_orientation_get_index(Scene *scene, int slot_index)
Definition scene.cc:2439
Generic array manipulation API.
#define BLI_array_findindex(arr, arr_len, p)
#define BLI_assert(a)
Definition BLI_assert.h:46
#define LISTBASE_FOREACH(type, var, list)
void void BLI_listbase_sort(ListBase *listbase, int(*cmp)(const void *, const void *)) ATTR_NONNULL(1
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void unit_m3(float m[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void normalize_m3(float R[3][3]) ATTR_NONNULL()
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void negate_v3(float r[3])
MINLINE void swap_v3_v3(float a[3], float b[3])
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
unsigned char uchar
#define ARRAY_SIZE(arr)
#define ELEM(...)
@ OB_ARMATURE
@ OB_MESH
@ OB_CURVES_LEGACY
@ SCE_ORIENT_DEFAULT
@ SCE_WORKSPACE_TOOL_FALLBACK
@ RGN_TYPE_WINDOW
@ SPACE_VIEW3D
@ V3D_ORIENT_NORMAL
@ V3D_ORIENT_VIEW
@ ED_GIZMO_DIAL_DRAW_FLAG_FILL_SELECT
@ ED_GIZMO_BUTTON_SHOW_BACKDROP
@ ED_GIZMO_BUTTON_SHOW_HELPLINE
bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
void UI_GetThemeColor3fv(int colorid, float col[3])
@ TH_AXIS_X
@ TH_GIZMO_PRIMARY
@ WM_GIZMO_HIDDEN
@ WM_GIZMO_DRAW_OFFSET_SCALE
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
@ WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK
@ WM_GIZMOGROUPTYPE_3D
#define WM_toolsystem_ref_properties_ensure_from_gizmo_group(tref, gzgroup, r_ptr)
BMesh const char void * data
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
#define G(x, y, z)
static void gizmo_mesh_extrude_invoke_prepare(const bContext *, wmGizmoGroup *gzgroup, wmGizmo *gz, const wmEvent *)
static const float extrude_arrow_xyz_axis_scale
static void gizmo_mesh_extrude_orientation_matrix_set(GizmoExtrudeGroup *ggd, const float mat[3][3])
static void gizmo_mesh_extrude_message_subscribe(const bContext *C, wmGizmoGroup *gzgroup, wmMsgBus *mbus)
static const float extrude_button_offset_scale
static const float extrude_arrow_normal_axis_scale
static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *gzgroup)
void VIEW3D_GGT_xform_extrude(wmGizmoGroupType *gzgt)
static void gizmo_mesh_extrude_orientation_matrix_set_for_adjust(GizmoExtrudeGroup *ggd, const float mat[3][3])
static void gizmo_mesh_extrude_draw_prepare(const bContext *C, wmGizmoGroup *gzgroup)
static void gizmo_mesh_extrude_setup(const bContext *C, wmGizmoGroup *gzgroup)
int calc_gizmo_stats(const bContext *C, const TransformCalcParams *params, TransformBounds *tbounds, RegionView3D *rv3d)
void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const bool *values)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
void RNA_boolean_get_array(PointerRNA *ptr, const char *name, bool *values)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
void RNA_property_string_set_bytes(PointerRNA *ptr, PropertyRNA *prop, const char *value, int len)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void * last
float viewinv[4][4]
struct ToolSettings * toolsettings
struct blender::ed::transform::GizmoExtrudeGroup::@366052352244260137261245044156342143065257061377 redo_xform
struct blender::ed::transform::GizmoExtrudeGroup::@343237261373157205223134025003370305050030252004 data
wmGizmoGroupFnSetupKeymap setup_keymap
wmGizmoGroupFnMsgBusSubscribe message_subscribe
wmGizmoGroupFnRefresh refresh
wmGizmoGroupFnInit setup
const char * idname
wmGizmoGroupFnInvokePrepare invoke_prepare
wmGizmoMapType_Params gzmap_params
eWM_GizmoFlagGroupTypeFlag flag
wmGizmoGroupFnPoll poll
wmGizmoGroupFnDrawPrepare draw_prepare
wmGizmoMap * parent_gzmap
wmGizmoGroupType * type
float matrix_basis[4][4]
float select_bias
float matrix_offset[4][4]
float color[4]
PointerRNA * ptr
float line_width
eWM_GizmoFlag flag
struct wmOperatorType * type
struct PointerRNA * ptr
WindowManagerRuntimeHandle * runtime
i
Definition text_draw.cc:230
PointerRNA * ptr
Definition wm_files.cc:4238
wmGizmoOpElem * WM_gizmo_operator_get(wmGizmo *gz, int part_index)
Definition wm_gizmo.cc:195
wmGizmo * WM_gizmo_new_ptr(const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
Definition wm_gizmo.cc:85
void WM_gizmo_set_scale(wmGizmo *gz, const float scale)
Definition wm_gizmo.cc:317
void WM_gizmo_set_matrix_location(wmGizmo *gz, const float origin[3])
Definition wm_gizmo.cc:287
void WM_gizmo_set_flag(wmGizmo *gz, const int flag, const bool enable)
Definition wm_gizmo.cc:307
PointerRNA * WM_gizmo_operator_set(wmGizmo *gz, int part_index, wmOperatorType *ot, IDProperty *properties)
Definition wm_gizmo.cc:203
int WM_gizmo_cmp_temp_fl_reverse(const void *gz_a_ptr, const void *gz_b_ptr)
wmKeyMap * WM_gizmogroup_setup_keymap_generic_maybe_drag(const wmGizmoGroupType *, wmKeyConfig *kc)
void WM_gizmo_do_msg_notify_tag_refresh(bContext *, wmMsgSubscribeKey *, wmMsgSubscribeValue *msg_val)
const wmGizmoType * WM_gizmotype_find(const StringRef idname, bool quiet)
#define WM_msg_subscribe_rna_anon_prop(mbus, type_, prop_, value)
void WM_msg_subscribe_rna_params(wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void WM_msg_subscribe_rna(wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
bToolRef * WM_toolsystem_ref_from_context(const bContext *C)