Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-15 00:49:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-15 00:49:00 +0300
commit5ebebcfbfff4c218ab4101ee7f6a66617ee9b01f (patch)
tree86f319a9291847c2608bfd0b89bae3d504e378cf /source/blender/editors/mesh
parentcd1600413246a62156441f6e7910489b19ae5a28 (diff)
WM: rename manipulator to gizmo internally
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_add_gizmo.c138
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c2
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c180
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c120
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin.c208
-rw-r--r--source/blender/editors/mesh/editmesh_inset.c2
-rw-r--r--source/blender/editors/mesh/editmesh_polybuild.c2
-rw-r--r--source/blender/editors/mesh/mesh_intern.h4
-rw-r--r--source/blender/editors/mesh/mesh_ops.c2
9 files changed, 329 insertions, 329 deletions
diff --git a/source/blender/editors/mesh/editmesh_add_gizmo.c b/source/blender/editors/mesh/editmesh_add_gizmo.c
index 3918d8847a6..be5c01e08df 100644
--- a/source/blender/editors/mesh/editmesh_add_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_add_gizmo.c
@@ -21,7 +21,7 @@
/** \file blender/editors/mesh/editmesh_add_gizmo.c
* \ingroup edmesh
*
- * Creation manipulators.
+ * Creation gizmos.
*/
#include "MEM_guardedalloc.h"
@@ -123,24 +123,24 @@ static void calc_initial_placement_point_from_view(
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Placement Manipulator
+/** \name Placement Gizmo
* \{ */
-typedef struct ManipulatorPlacementGroup {
- struct wmManipulator *cage;
+typedef struct GizmoPlacementGroup {
+ struct wmGizmo *cage;
struct {
bContext *context;
wmOperator *op;
PropertyRNA *prop_matrix;
} data;
-} ManipulatorPlacementGroup;
+} GizmoPlacementGroup;
/**
* \warning Calling redo from property updates is not great.
* This is needed because changing the RNA doesn't cause a redo
* and we're not using operator UI which does just this.
*/
-static void manipulator_placement_exec(ManipulatorPlacementGroup *man)
+static void gizmo_placement_exec(GizmoPlacementGroup *man)
{
wmOperator *op = man->data.op;
if (op == WM_operator_last_redo((bContext *)man->data.context)) {
@@ -148,7 +148,7 @@ static void manipulator_placement_exec(ManipulatorPlacementGroup *man)
}
}
-static void manipulator_mesh_placement_update_from_op(ManipulatorPlacementGroup *man)
+static void gizmo_mesh_placement_update_from_op(GizmoPlacementGroup *man)
{
wmOperator *op = man->data.op;
UNUSED_VARS(op);
@@ -159,11 +159,11 @@ static void manipulator_mesh_placement_update_from_op(ManipulatorPlacementGroup
}
/* translate callbacks */
-static void manipulator_placement_prop_matrix_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_placement_prop_matrix_get(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
void *value_p)
{
- ManipulatorPlacementGroup *man = mpr->parent_mgroup->customdata;
+ GizmoPlacementGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
float *value = value_p;
BLI_assert(mpr_prop->type->array_length == 16);
@@ -175,11 +175,11 @@ static void manipulator_placement_prop_matrix_get(
}
}
-static void manipulator_placement_prop_matrix_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_placement_prop_matrix_set(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
const void *value)
{
- ManipulatorPlacementGroup *man = mpr->parent_mgroup->customdata;
+ GizmoPlacementGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
BLI_assert(mpr_prop->type->array_length == 16);
@@ -194,30 +194,30 @@ static void manipulator_placement_prop_matrix_set(
RNA_property_float_set_array(op->ptr, man->data.prop_matrix, &mat[0][0]);
- manipulator_placement_exec(man);
+ gizmo_placement_exec(man);
}
-static bool manipulator_mesh_placement_poll(const bContext *C, wmManipulatorGroupType *wgt)
+static bool gizmo_mesh_placement_poll(const bContext *C, wmGizmoGroupType *wgt)
{
wmOperator *op = WM_operator_last_redo(C);
- if (op == NULL || !STREQ(op->type->idname, "MESH_OT_primitive_cube_add_manipulator")) {
- WM_manipulator_group_type_unlink_delayed_ptr(wgt);
+ if (op == NULL || !STREQ(op->type->idname, "MESH_OT_primitive_cube_add_gizmo")) {
+ WM_gizmo_group_type_unlink_delayed_ptr(wgt);
return false;
}
return true;
}
-static void manipulator_mesh_placement_modal_from_setup(
- const bContext *C, wmManipulatorGroup *mgroup)
+static void gizmo_mesh_placement_modal_from_setup(
+ const bContext *C, wmGizmoGroup *mgroup)
{
- ManipulatorPlacementGroup *man = mgroup->customdata;
+ GizmoPlacementGroup *man = mgroup->customdata;
/* Initial size. */
{
- wmManipulator *mpr = man->cage;
+ wmGizmo *mpr = man->cage;
zero_m4(mpr->matrix_offset);
- /* TODO: support zero scaled matrix in 'MANIPULATOR_WT_cage_3d'. */
+ /* TODO: support zero scaled matrix in 'GIZMO_WT_cage_3d'. */
mpr->matrix_offset[0][0] = 0.01;
mpr->matrix_offset[1][1] = 0.01;
mpr->matrix_offset[2][2] = 0.01;
@@ -228,7 +228,7 @@ static void manipulator_mesh_placement_modal_from_setup(
{
wmWindow *win = CTX_wm_window(C);
ARegion *ar = CTX_wm_region(C);
- wmManipulator *mpr = man->cage;
+ wmGizmo *mpr = man->cage;
{
float mat3[3][3];
@@ -244,87 +244,87 @@ static void manipulator_mesh_placement_modal_from_setup(
}
if (1) {
- wmManipulatorMap *mmap = mgroup->parent_mmap;
- WM_manipulator_modal_set_from_setup(
- mmap, (bContext *)C, man->cage, ED_MANIPULATOR_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MAX_Z, win->eventstate);
+ wmGizmoMap *mmap = mgroup->parent_mmap;
+ WM_gizmo_modal_set_from_setup(
+ mmap, (bContext *)C, man->cage, ED_GIZMO_CAGE3D_PART_SCALE_MAX_X_MAX_Y_MAX_Z, win->eventstate);
}
}
}
-static void manipulator_mesh_placement_setup(const bContext *C, wmManipulatorGroup *mgroup)
+static void gizmo_mesh_placement_setup(const bContext *C, wmGizmoGroup *mgroup)
{
wmOperator *op = WM_operator_last_redo(C);
- if (op == NULL || !STREQ(op->type->idname, "MESH_OT_primitive_cube_add_manipulator")) {
+ if (op == NULL || !STREQ(op->type->idname, "MESH_OT_primitive_cube_add_gizmo")) {
return;
}
- struct ManipulatorPlacementGroup *man = MEM_callocN(sizeof(ManipulatorPlacementGroup), __func__);
+ struct GizmoPlacementGroup *man = MEM_callocN(sizeof(GizmoPlacementGroup), __func__);
mgroup->customdata = man;
- const wmManipulatorType *wt_cage = WM_manipulatortype_find("MANIPULATOR_WT_cage_3d", true);
+ const wmGizmoType *wt_cage = WM_gizmotype_find("GIZMO_WT_cage_3d", true);
- man->cage = WM_manipulator_new_ptr(wt_cage, mgroup, NULL);
+ man->cage = WM_gizmo_new_ptr(wt_cage, mgroup, NULL);
- UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->cage->color);
+ UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, man->cage->color);
RNA_enum_set(man->cage->ptr, "transform",
- ED_MANIPULATOR_CAGE2D_XFORM_FLAG_SCALE |
- ED_MANIPULATOR_CAGE2D_XFORM_FLAG_TRANSLATE |
- ED_MANIPULATOR_CAGE2D_XFORM_FLAG_SCALE_SIGNED);
+ ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE |
+ ED_GIZMO_CAGE2D_XFORM_FLAG_TRANSLATE |
+ ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_SIGNED);
- WM_manipulator_set_flag(man->cage, WM_MANIPULATOR_DRAW_VALUE, true);
+ WM_gizmo_set_flag(man->cage, WM_GIZMO_DRAW_VALUE, true);
man->data.context = (bContext *)C;
man->data.op = op;
man->data.prop_matrix = RNA_struct_find_property(op->ptr, "matrix");
- manipulator_mesh_placement_update_from_op(man);
+ gizmo_mesh_placement_update_from_op(man);
/* Setup property callbacks */
{
- WM_manipulator_target_property_def_func(
+ WM_gizmo_target_property_def_func(
man->cage, "matrix",
- &(const struct wmManipulatorPropertyFnParams) {
- .value_get_fn = manipulator_placement_prop_matrix_get,
- .value_set_fn = manipulator_placement_prop_matrix_set,
+ &(const struct wmGizmoPropertyFnParams) {
+ .value_get_fn = gizmo_placement_prop_matrix_get,
+ .value_set_fn = gizmo_placement_prop_matrix_set,
.range_get_fn = NULL,
.user_data = NULL,
});
}
- manipulator_mesh_placement_modal_from_setup(C, mgroup);
+ gizmo_mesh_placement_modal_from_setup(C, mgroup);
}
-static void manipulator_mesh_placement_draw_prepare(
- const bContext *UNUSED(C), wmManipulatorGroup *mgroup)
+static void gizmo_mesh_placement_draw_prepare(
+ const bContext *UNUSED(C), wmGizmoGroup *mgroup)
{
- ManipulatorPlacementGroup *man = mgroup->customdata;
+ GizmoPlacementGroup *man = mgroup->customdata;
if (man->data.op->next) {
man->data.op = WM_operator_last_redo((bContext *)man->data.context);
}
- manipulator_mesh_placement_update_from_op(man);
+ gizmo_mesh_placement_update_from_op(man);
}
-static void MESH_WGT_add_bounds(struct wmManipulatorGroupType *wgt)
+static void MESH_WGT_add_bounds(struct wmGizmoGroupType *wgt)
{
wgt->name = "Mesh Add Bounds";
wgt->idname = "MESH_WGT_add_bounds";
- wgt->flag = WM_MANIPULATORGROUPTYPE_3D;
+ wgt->flag = WM_GIZMOGROUPTYPE_3D;
wgt->mmap_params.spaceid = SPACE_VIEW3D;
wgt->mmap_params.regionid = RGN_TYPE_WINDOW;
- wgt->poll = manipulator_mesh_placement_poll;
- wgt->setup = manipulator_mesh_placement_setup;
- wgt->draw_prepare = manipulator_mesh_placement_draw_prepare;
+ wgt->poll = gizmo_mesh_placement_poll;
+ wgt->setup = gizmo_mesh_placement_setup;
+ wgt->draw_prepare = gizmo_mesh_placement_draw_prepare;
}
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Add Cube Manipulator-Operator
+/** \name Add Cube Gizmo-Operator
*
* For now we use a separate operator to add a cube,
* we can try to merge then however they are invoked differently
@@ -332,13 +332,13 @@ static void MESH_WGT_add_bounds(struct wmManipulatorGroupType *wgt)
* \{ */
-static int add_primitive_cube_manipulator_exec(bContext *C, wmOperator *op)
+static int add_primitive_cube_gizmo_exec(bContext *C, wmOperator *op)
{
Object *obedit = CTX_data_edit_object(C);;
BMEditMesh *em = BKE_editmesh_from_object(obedit);
float matrix[4][4];
- /* Get the matrix that defines the cube bounds (as set by the manipulator cage). */
+ /* Get the matrix that defines the cube bounds (as set by the gizmo cage). */
{
PropertyRNA *prop_matrix = RNA_struct_find_property(op->ptr, "matrix");
if (RNA_property_is_set(op->ptr, prop_matrix)) {
@@ -372,25 +372,25 @@ static int add_primitive_cube_manipulator_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int add_primitive_cube_manipulator_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int add_primitive_cube_gizmo_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
View3D *v3d = CTX_wm_view3d(C);
- int ret = add_primitive_cube_manipulator_exec(C, op);
+ int ret = add_primitive_cube_gizmo_exec(C, op);
if (ret & OPERATOR_FINISHED) {
- /* Setup manipulators */
- if (v3d && ((v3d->mpr_flag & V3D_MANIPULATOR_HIDE) == 0)) {
+ /* Setup gizmos */
+ if (v3d && ((v3d->mpr_flag & V3D_GIZMO_HIDE) == 0)) {
ARegion *ar = CTX_wm_region(C);
- wmManipulatorMap *mmap = ar->manipulator_map;
- wmManipulatorGroupType *wgt = WM_manipulatorgrouptype_find("MESH_WGT_add_bounds", false);
- wmManipulatorGroup *mgroup = WM_manipulatormap_group_find_ptr(mmap, wgt);
+ wmGizmoMap *mmap = ar->gizmo_map;
+ wmGizmoGroupType *wgt = WM_gizmogrouptype_find("MESH_WGT_add_bounds", false);
+ wmGizmoGroup *mgroup = WM_gizmomap_group_find_ptr(mmap, wgt);
if (mgroup != NULL) {
- ManipulatorPlacementGroup *man = mgroup->customdata;
+ GizmoPlacementGroup *man = mgroup->customdata;
man->data.op = op;
- manipulator_mesh_placement_modal_from_setup(C, mgroup);
+ gizmo_mesh_placement_modal_from_setup(C, mgroup);
}
else {
- WM_manipulator_group_type_ensure_ptr(wgt);
+ WM_gizmo_group_type_ensure_ptr(wgt);
}
}
}
@@ -398,16 +398,16 @@ static int add_primitive_cube_manipulator_invoke(bContext *C, wmOperator *op, co
return ret;
}
-void MESH_OT_primitive_cube_add_manipulator(wmOperatorType *ot)
+void MESH_OT_primitive_cube_add_gizmo(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Add Cube";
ot->description = "Construct a cube mesh";
- ot->idname = "MESH_OT_primitive_cube_add_manipulator";
+ ot->idname = "MESH_OT_primitive_cube_add_gizmo";
/* api callbacks */
- ot->invoke = add_primitive_cube_manipulator_invoke;
- ot->exec = add_primitive_cube_manipulator_exec;
+ ot->invoke = add_primitive_cube_gizmo_invoke;
+ ot->exec = add_primitive_cube_gizmo_exec;
ot->poll = ED_operator_editmesh_view3d;
/* flags */
@@ -420,7 +420,7 @@ void MESH_OT_primitive_cube_add_manipulator(wmOperatorType *ot)
PropertyRNA *prop = RNA_def_float_matrix(ot->srna, "matrix", 4, 4, NULL, 0.0f, 0.0f, "Matrix", "", 0.0f, 0.0f);
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
- WM_manipulatorgrouptype_append(MESH_WGT_add_bounds);
+ WM_gizmogrouptype_append(MESH_WGT_add_bounds);
}
/** \} */
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 58246a60362..b73ce410626 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -202,7 +202,7 @@ static bool edbm_bevel_init(bContext *C, wmOperator *op, const bool is_modal)
if (v3d) {
opdata->mpr_flag = v3d->mpr_flag;
- v3d->mpr_flag = V3D_MANIPULATOR_HIDE;
+ v3d->mpr_flag = V3D_GIZMO_HIDE;
}
}
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index 87a65924979..a9e11b7b411 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -54,9 +54,9 @@
#include "mesh_intern.h" /* own include */
-#define USE_MANIPULATOR
+#define USE_GIZMO
-#ifdef USE_MANIPULATOR
+#ifdef USE_GIZMO
#include "ED_gizmo_library.h"
#include "ED_undo.h"
#endif
@@ -157,7 +157,7 @@ static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* misc other vars */
G.moving = G_TRANSFORM_EDIT;
opdata->mpr_flag = v3d->mpr_flag;
- v3d->mpr_flag = V3D_MANIPULATOR_HIDE;
+ v3d->mpr_flag = V3D_GIZMO_HIDE;
/* initialize modal callout */
ED_workspace_status_text(C, IFACE_("LMB: Click and drag to draw cut line"));
@@ -195,12 +195,12 @@ static int mesh_bisect_modal(bContext *C, wmOperator *op, const wmEvent *event)
if (ret & (OPERATOR_FINISHED | OPERATOR_CANCELLED)) {
edbm_bisect_exit(C, &opdata_back);
-#ifdef USE_MANIPULATOR
- /* Setup manipulators */
+#ifdef USE_GIZMO
+ /* Setup gizmos */
{
View3D *v3d = CTX_wm_view3d(C);
- if (v3d && (v3d->mpr_flag & V3D_MANIPULATOR_HIDE) == 0) {
- WM_manipulator_group_type_ensure("MESH_WGT_bisect");
+ if (v3d && (v3d->mpr_flag & V3D_GIZMO_HIDE) == 0) {
+ WM_gizmo_group_type_ensure("MESH_WGT_bisect");
}
}
#endif
@@ -333,8 +333,8 @@ static int mesh_bisect_exec(bContext *C, wmOperator *op)
}
}
-#ifdef USE_MANIPULATOR
-static void MESH_WGT_bisect(struct wmManipulatorGroupType *wgt);
+#ifdef USE_GIZMO
+static void MESH_WGT_bisect(struct wmGizmoGroupType *wgt);
#endif
void MESH_OT_bisect(struct wmOperatorType *ot)
@@ -373,26 +373,26 @@ void MESH_OT_bisect(struct wmOperatorType *ot)
WM_operator_properties_gesture_straightline(ot, CURSOR_EDIT);
-#ifdef USE_MANIPULATOR
- WM_manipulatorgrouptype_append(MESH_WGT_bisect);
+#ifdef USE_GIZMO
+ WM_gizmogrouptype_append(MESH_WGT_bisect);
#endif
}
-#ifdef USE_MANIPULATOR
+#ifdef USE_GIZMO
/* -------------------------------------------------------------------- */
-/** \name Bisect Manipulator
+/** \name Bisect Gizmo
* \{ */
-typedef struct ManipulatorGroup {
+typedef struct GizmoGroup {
/* Arrow to change plane depth. */
- struct wmManipulator *translate_z;
+ struct wmGizmo *translate_z;
/* Translate XYZ */
- struct wmManipulator *translate_c;
- /* For grabbing the manipulator and moving freely. */
- struct wmManipulator *rotate_c;
+ struct wmGizmo *translate_c;
+ /* For grabbing the gizmo and moving freely. */
+ struct wmGizmo *rotate_c;
/* We could store more vars here! */
struct {
@@ -404,14 +404,14 @@ typedef struct ManipulatorGroup {
float rotate_axis[3];
float rotate_up[3];
} data;
-} ManipulatorGroup;
+} GizmoGroup;
/**
* XXX. calling redo from property updates is not great.
* This is needed because changing the RNA doesn't cause a redo
* and we're not using operator UI which does just this.
*/
-static void manipulator_bisect_exec(ManipulatorGroup *man)
+static void gizmo_bisect_exec(GizmoGroup *man)
{
wmOperator *op = man->data.op;
if (op == WM_operator_last_redo((bContext *)man->data.context)) {
@@ -419,7 +419,7 @@ static void manipulator_bisect_exec(ManipulatorGroup *man)
}
}
-static void manipulator_mesh_bisect_update_from_op(ManipulatorGroup *man)
+static void gizmo_mesh_bisect_update_from_op(GizmoGroup *man)
{
wmOperator *op = man->data.op;
@@ -428,13 +428,13 @@ static void manipulator_mesh_bisect_update_from_op(ManipulatorGroup *man)
RNA_property_float_get_array(op->ptr, man->data.prop_plane_co, plane_co);
RNA_property_float_get_array(op->ptr, man->data.prop_plane_no, plane_no);
- WM_manipulator_set_matrix_location(man->translate_z, plane_co);
- WM_manipulator_set_matrix_location(man->rotate_c, plane_co);
+ WM_gizmo_set_matrix_location(man->translate_z, plane_co);
+ WM_gizmo_set_matrix_location(man->rotate_c, plane_co);
/* translate_c location comes from the property. */
- WM_manipulator_set_matrix_rotation_from_z_axis(man->translate_z, plane_no);
+ WM_gizmo_set_matrix_rotation_from_z_axis(man->translate_z, plane_no);
- WM_manipulator_set_scale(man->translate_c, 0.2);
+ WM_gizmo_set_scale(man->translate_c, 0.2);
RegionView3D *rv3d = ED_view3d_context_rv3d(man->data.context);
if (rv3d) {
@@ -445,24 +445,24 @@ static void manipulator_mesh_bisect_update_from_op(ManipulatorGroup *man)
project_plane_normalized_v3_v3v3(man->data.rotate_up, man->data.rotate_up, man->data.rotate_axis);
normalize_v3(man->data.rotate_up);
- WM_manipulator_set_matrix_rotation_from_z_axis(man->translate_c, plane_no);
+ WM_gizmo_set_matrix_rotation_from_z_axis(man->translate_c, plane_no);
float plane_no_cross[3];
cross_v3_v3v3(plane_no_cross, plane_no, man->data.rotate_axis);
- WM_manipulator_set_matrix_offset_rotation_from_yz_axis(man->rotate_c, plane_no_cross, man->data.rotate_axis);
+ WM_gizmo_set_matrix_offset_rotation_from_yz_axis(man->rotate_c, plane_no_cross, man->data.rotate_axis);
RNA_enum_set(man->rotate_c->ptr, "draw_options",
- ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_MIRROR |
- ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_START_Y);
+ ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_MIRROR |
+ ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_START_Y);
}
}
/* depth callbacks */
-static void manipulator_bisect_prop_depth_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_bisect_prop_depth_get(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
void *value_p)
{
- ManipulatorGroup *man = mpr->parent_mgroup->customdata;
+ GizmoGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
float *value = value_p;
@@ -476,11 +476,11 @@ static void manipulator_bisect_prop_depth_get(
value[0] = dot_v3v3(plane_no, plane_co) - dot_v3v3(plane_no, mpr->matrix_basis[3]);
}
-static void manipulator_bisect_prop_depth_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_bisect_prop_depth_set(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
const void *value_p)
{
- ManipulatorGroup *man = mpr->parent_mgroup->customdata;
+ GizmoGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
const float *value = value_p;
@@ -499,15 +499,15 @@ static void manipulator_bisect_prop_depth_set(
RNA_property_float_set_array(op->ptr, man->data.prop_plane_co, plane_co);
- manipulator_bisect_exec(man);
+ gizmo_bisect_exec(man);
}
/* translate callbacks */
-static void manipulator_bisect_prop_translate_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_bisect_prop_translate_get(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
void *value_p)
{
- ManipulatorGroup *man = mpr->parent_mgroup->customdata;
+ GizmoGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
BLI_assert(mpr_prop->type->array_length == 3);
@@ -516,11 +516,11 @@ static void manipulator_bisect_prop_translate_get(
RNA_property_float_get_array(op->ptr, man->data.prop_plane_co, value_p);
}
-static void manipulator_bisect_prop_translate_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_bisect_prop_translate_set(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
const void *value_p)
{
- ManipulatorGroup *man = mpr->parent_mgroup->customdata;
+ GizmoGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
BLI_assert(mpr_prop->type->array_length == 3);
@@ -528,15 +528,15 @@ static void manipulator_bisect_prop_translate_set(
RNA_property_float_set_array(op->ptr, man->data.prop_plane_co, value_p);
- manipulator_bisect_exec(man);
+ gizmo_bisect_exec(man);
}
/* angle callbacks */
-static void manipulator_bisect_prop_angle_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_bisect_prop_angle_get(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
void *value_p)
{
- ManipulatorGroup *man = mpr->parent_mgroup->customdata;
+ GizmoGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
float *value = value_p;
@@ -559,11 +559,11 @@ static void manipulator_bisect_prop_angle_get(
}
}
-static void manipulator_bisect_prop_angle_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_bisect_prop_angle_set(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
const void *value_p)
{
- ManipulatorGroup *man = mpr->parent_mgroup->customdata;
+ GizmoGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
const float *value = value_p;
@@ -588,22 +588,22 @@ static void manipulator_bisect_prop_angle_set(
/* re-normalize - seems acceptable */
RNA_property_float_set_array(op->ptr, man->data.prop_plane_no, plane_no);
- manipulator_bisect_exec(man);
+ gizmo_bisect_exec(man);
}
}
}
-static bool manipulator_mesh_bisect_poll(const bContext *C, wmManipulatorGroupType *wgt)
+static bool gizmo_mesh_bisect_poll(const bContext *C, wmGizmoGroupType *wgt)
{
wmOperator *op = WM_operator_last_redo(C);
if (op == NULL || !STREQ(op->type->idname, "MESH_OT_bisect")) {
- WM_manipulator_group_type_unlink_delayed_ptr(wgt);
+ WM_gizmo_group_type_unlink_delayed_ptr(wgt);
return false;
}
return true;
}
-static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup *mgroup)
+static void gizmo_mesh_bisect_setup(const bContext *C, wmGizmoGroup *mgroup)
{
wmOperator *op = WM_operator_last_redo(C);
@@ -611,26 +611,26 @@ static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup
return;
}
- struct ManipulatorGroup *man = MEM_callocN(sizeof(ManipulatorGroup), __func__);
+ struct GizmoGroup *man = MEM_callocN(sizeof(GizmoGroup), __func__);
mgroup->customdata = man;
- const wmManipulatorType *wt_arrow = WM_manipulatortype_find("MANIPULATOR_WT_arrow_3d", true);
- const wmManipulatorType *wt_grab = WM_manipulatortype_find("MANIPULATOR_WT_grab_3d", true);
- const wmManipulatorType *wt_dial = WM_manipulatortype_find("MANIPULATOR_WT_dial_3d", true);
+ const wmGizmoType *wt_arrow = WM_gizmotype_find("GIZMO_WT_arrow_3d", true);
+ const wmGizmoType *wt_grab = WM_gizmotype_find("GIZMO_WT_grab_3d", true);
+ const wmGizmoType *wt_dial = WM_gizmotype_find("GIZMO_WT_dial_3d", true);
- man->translate_z = WM_manipulator_new_ptr(wt_arrow, mgroup, NULL);
- man->translate_c = WM_manipulator_new_ptr(wt_grab, mgroup, NULL);
- man->rotate_c = WM_manipulator_new_ptr(wt_dial, mgroup, NULL);
+ man->translate_z = WM_gizmo_new_ptr(wt_arrow, mgroup, NULL);
+ man->translate_c = WM_gizmo_new_ptr(wt_grab, mgroup, NULL);
+ man->rotate_c = WM_gizmo_new_ptr(wt_dial, mgroup, NULL);
- UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->translate_z->color);
- UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->translate_c->color);
- UI_GetThemeColor3fv(TH_MANIPULATOR_SECONDARY, man->rotate_c->color);
+ UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, man->translate_z->color);
+ UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, man->translate_c->color);
+ UI_GetThemeColor3fv(TH_GIZMO_SECONDARY, man->rotate_c->color);
- RNA_enum_set(man->translate_z->ptr, "draw_style", ED_MANIPULATOR_ARROW_STYLE_NORMAL);
- RNA_enum_set(man->translate_c->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_RING_2D);
+ RNA_enum_set(man->translate_z->ptr, "draw_style", ED_GIZMO_ARROW_STYLE_NORMAL);
+ RNA_enum_set(man->translate_c->ptr, "draw_style", ED_GIZMO_GRAB_STYLE_RING_2D);
- WM_manipulator_set_flag(man->translate_c, WM_MANIPULATOR_DRAW_VALUE, true);
- WM_manipulator_set_flag(man->rotate_c, WM_MANIPULATOR_DRAW_VALUE, true);
+ WM_gizmo_set_flag(man->translate_c, WM_GIZMO_DRAW_VALUE, true);
+ WM_gizmo_set_flag(man->rotate_c, WM_GIZMO_DRAW_VALUE, true);
{
man->data.context = (bContext *)C;
@@ -639,64 +639,64 @@ static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup
man->data.prop_plane_no = RNA_struct_find_property(op->ptr, "plane_no");
}
- manipulator_mesh_bisect_update_from_op(man);
+ gizmo_mesh_bisect_update_from_op(man);
/* Setup property callbacks */
{
- WM_manipulator_target_property_def_func(
+ WM_gizmo_target_property_def_func(
man->translate_z, "offset",
- &(const struct wmManipulatorPropertyFnParams) {
- .value_get_fn = manipulator_bisect_prop_depth_get,
- .value_set_fn = manipulator_bisect_prop_depth_set,
+ &(const struct wmGizmoPropertyFnParams) {
+ .value_get_fn = gizmo_bisect_prop_depth_get,
+ .value_set_fn = gizmo_bisect_prop_depth_set,
.range_get_fn = NULL,
.user_data = NULL,
});
- WM_manipulator_target_property_def_func(
+ WM_gizmo_target_property_def_func(
man->translate_c, "offset",
- &(const struct wmManipulatorPropertyFnParams) {
- .value_get_fn = manipulator_bisect_prop_translate_get,
- .value_set_fn = manipulator_bisect_prop_translate_set,
+ &(const struct wmGizmoPropertyFnParams) {
+ .value_get_fn = gizmo_bisect_prop_translate_get,
+ .value_set_fn = gizmo_bisect_prop_translate_set,
.range_get_fn = NULL,
.user_data = NULL,
});
- WM_manipulator_target_property_def_func(
+ WM_gizmo_target_property_def_func(
man->rotate_c, "offset",
- &(const struct wmManipulatorPropertyFnParams) {
- .value_get_fn = manipulator_bisect_prop_angle_get,
- .value_set_fn = manipulator_bisect_prop_angle_set,
+ &(const struct wmGizmoPropertyFnParams) {
+ .value_get_fn = gizmo_bisect_prop_angle_get,
+ .value_set_fn = gizmo_bisect_prop_angle_set,
.range_get_fn = NULL,
.user_data = NULL,
});
}
}
-static void manipulator_mesh_bisect_draw_prepare(
- const bContext *UNUSED(C), wmManipulatorGroup *mgroup)
+static void gizmo_mesh_bisect_draw_prepare(
+ const bContext *UNUSED(C), wmGizmoGroup *mgroup)
{
- ManipulatorGroup *man = mgroup->customdata;
+ GizmoGroup *man = mgroup->customdata;
if (man->data.op->next) {
man->data.op = WM_operator_last_redo((bContext *)man->data.context);
}
- manipulator_mesh_bisect_update_from_op(man);
+ gizmo_mesh_bisect_update_from_op(man);
}
-static void MESH_WGT_bisect(struct wmManipulatorGroupType *wgt)
+static void MESH_WGT_bisect(struct wmGizmoGroupType *wgt)
{
wgt->name = "Mesh Bisect";
wgt->idname = "MESH_WGT_bisect";
- wgt->flag = WM_MANIPULATORGROUPTYPE_3D;
+ wgt->flag = WM_GIZMOGROUPTYPE_3D;
wgt->mmap_params.spaceid = SPACE_VIEW3D;
wgt->mmap_params.regionid = RGN_TYPE_WINDOW;
- wgt->poll = manipulator_mesh_bisect_poll;
- wgt->setup = manipulator_mesh_bisect_setup;
- wgt->draw_prepare = manipulator_mesh_bisect_draw_prepare;
+ wgt->poll = gizmo_mesh_bisect_poll;
+ wgt->setup = gizmo_mesh_bisect_setup;
+ wgt->draw_prepare = gizmo_mesh_bisect_draw_prepare;
}
/** \} */
-#endif /* USE_MANIPULATOR */
+#endif /* USE_GIZMO */
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index b007bcf04ba..dd167c1fc15 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -61,7 +61,7 @@
#include "mesh_intern.h" /* own include */
-#define USE_MANIPULATOR
+#define USE_GIZMO
/* -------------------------------------------------------------------- */
/** \name Extrude Internal Utilities
@@ -360,10 +360,10 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
/* -------------------------------------------------------------------- */
-/** \name Extrude Manipulator
+/** \name Extrude Gizmo
* \{ */
-#ifdef USE_MANIPULATOR
+#ifdef USE_GIZMO
const float extrude_button_scale = 0.15f;
const float extrude_button_offset_scale = 1.5f;
@@ -380,11 +380,11 @@ static const uchar shape_plus[] = {
0x90, 0x6e, 0xd7, 0x80, 0xff, 0x5f, 0xfb, 0x5f, 0xfb,
};
-typedef struct ManipulatorExtrudeGroup {
+typedef struct GizmoExtrudeGroup {
/* XYZ & normal. */
- struct wmManipulator *invoke_xyz_no[4];
- struct wmManipulator *adjust_xyz_no[5];
+ struct wmGizmo *invoke_xyz_no[4];
+ struct wmGizmo *adjust_xyz_no[5];
struct {
float normal_mat3[3][3]; /* use Z axis for normal. */
@@ -392,10 +392,10 @@ typedef struct ManipulatorExtrudeGroup {
} data;
wmOperatorType *ot_extrude;
-} ManipulatorExtrudeGroup;
+} GizmoExtrudeGroup;
-static void manipulator_mesh_extrude_orientation_matrix_set(
- struct ManipulatorExtrudeGroup *man, const float mat[3][3])
+static void gizmo_mesh_extrude_orientation_matrix_set(
+ struct GizmoExtrudeGroup *man, const float mat[3][3])
{
for (int i = 0; i < 3; i++) {
/* Set orientation without location. */
@@ -417,32 +417,32 @@ static void manipulator_mesh_extrude_orientation_matrix_set(
}
}
-static bool manipulator_mesh_extrude_poll(const bContext *C, wmManipulatorGroupType *wgt)
+static bool gizmo_mesh_extrude_poll(const bContext *C, wmGizmoGroupType *wgt)
{
ScrArea *sa = CTX_wm_area(C);
bToolRef_Runtime *tref_rt = sa->runtime.tool ? sa->runtime.tool->runtime : NULL;
if ((tref_rt == NULL) ||
- !STREQ(wgt->idname, tref_rt->manipulator_group) ||
+ !STREQ(wgt->idname, tref_rt->gizmo_group) ||
!ED_operator_editmesh_view3d((bContext *)C))
{
- WM_manipulator_group_type_unlink_delayed_ptr(wgt);
+ WM_gizmo_group_type_unlink_delayed_ptr(wgt);
return false;
}
return true;
}
-static void manipulator_mesh_extrude_setup(const bContext *UNUSED(C), wmManipulatorGroup *mgroup)
+static void gizmo_mesh_extrude_setup(const bContext *UNUSED(C), wmGizmoGroup *mgroup)
{
- struct ManipulatorExtrudeGroup *man = MEM_callocN(sizeof(ManipulatorExtrudeGroup), __func__);
+ struct GizmoExtrudeGroup *man = MEM_callocN(sizeof(GizmoExtrudeGroup), __func__);
mgroup->customdata = man;
- const wmManipulatorType *wt_arrow = WM_manipulatortype_find("MANIPULATOR_WT_arrow_3d", true);
- const wmManipulatorType *wt_grab = WM_manipulatortype_find("MANIPULATOR_WT_button_2d", true);
+ const wmGizmoType *wt_arrow = WM_gizmotype_find("GIZMO_WT_arrow_3d", true);
+ const wmGizmoType *wt_grab = WM_gizmotype_find("GIZMO_WT_button_2d", true);
for (int i = 0; i < 4; i++) {
- man->adjust_xyz_no[i] = WM_manipulator_new_ptr(wt_arrow, mgroup, NULL);
- man->invoke_xyz_no[i] = WM_manipulator_new_ptr(wt_grab, mgroup, NULL);
- man->invoke_xyz_no[i]->flag |= WM_MANIPULATOR_DRAW_OFFSET_SCALE;
+ man->adjust_xyz_no[i] = WM_gizmo_new_ptr(wt_arrow, mgroup, NULL);
+ man->invoke_xyz_no[i] = WM_gizmo_new_ptr(wt_grab, mgroup, NULL);
+ man->invoke_xyz_no[i]->flag |= WM_GIZMO_DRAW_OFFSET_SCALE;
}
{
@@ -460,25 +460,25 @@ static void manipulator_mesh_extrude_setup(const bContext *UNUSED(C), wmManipula
UI_GetThemeColor3fv(TH_AXIS_X + i, man->invoke_xyz_no[i]->color);
UI_GetThemeColor3fv(TH_AXIS_X + i, man->adjust_xyz_no[i]->color);
}
- UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->invoke_xyz_no[3]->color);
- UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->adjust_xyz_no[3]->color);
+ UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, man->invoke_xyz_no[3]->color);
+ UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, man->adjust_xyz_no[3]->color);
for (int i = 0; i < 4; i++) {
- WM_manipulator_set_scale(man->invoke_xyz_no[i], extrude_button_scale);
- WM_manipulator_set_scale(man->adjust_xyz_no[i], extrude_arrow_scale);
+ WM_gizmo_set_scale(man->invoke_xyz_no[i], extrude_button_scale);
+ WM_gizmo_set_scale(man->adjust_xyz_no[i], extrude_arrow_scale);
}
- WM_manipulator_set_scale(man->adjust_xyz_no[3], extrude_arrow_normal_axis_scale);
+ WM_gizmo_set_scale(man->adjust_xyz_no[3], extrude_arrow_normal_axis_scale);
for (int i = 0; i < 4; i++) {
}
for (int i = 0; i < 4; i++) {
- WM_manipulator_set_flag(man->adjust_xyz_no[i], WM_MANIPULATOR_DRAW_VALUE, true);
+ WM_gizmo_set_flag(man->adjust_xyz_no[i], WM_GIZMO_DRAW_VALUE, true);
}
/* XYZ & normal axis extrude. */
for (int i = 0; i < 4; i++) {
- PointerRNA *ptr = WM_manipulator_operator_set(man->invoke_xyz_no[i], 0, man->ot_extrude, NULL);
+ PointerRNA *ptr = WM_gizmo_operator_set(man->invoke_xyz_no[i], 0, man->ot_extrude, NULL);
{
bool constraint[3] = {0, 0, 0};
constraint[MIN2(i, 2)] = 1;
@@ -490,7 +490,7 @@ static void manipulator_mesh_extrude_setup(const bContext *UNUSED(C), wmManipula
/* Adjust extrude. */
for (int i = 0; i < 4; i++) {
- PointerRNA *ptr = WM_manipulator_operator_set(man->adjust_xyz_no[i], 0, man->ot_extrude, NULL);
+ PointerRNA *ptr = WM_gizmo_operator_set(man->adjust_xyz_no[i], 0, man->ot_extrude, NULL);
{
bool constraint[3] = {0, 0, 0};
constraint[MIN2(i, 2)] = 1;
@@ -498,18 +498,18 @@ static void manipulator_mesh_extrude_setup(const bContext *UNUSED(C), wmManipula
RNA_boolean_set(&macroptr, "release_confirm", true);
RNA_boolean_set_array(&macroptr, "constraint_axis", constraint);
}
- wmManipulatorOpElem *mpop = WM_manipulator_operator_get(man->adjust_xyz_no[i], 0);
+ wmGizmoOpElem *mpop = WM_gizmo_operator_get(man->adjust_xyz_no[i], 0);
mpop->is_redo = true;
}
}
-static void manipulator_mesh_extrude_refresh(const bContext *C, wmManipulatorGroup *mgroup)
+static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *mgroup)
{
- ManipulatorExtrudeGroup *man = mgroup->customdata;
+ GizmoExtrudeGroup *man = mgroup->customdata;
for (int i = 0; i < 4; i++) {
- WM_manipulator_set_flag(man->invoke_xyz_no[i], WM_MANIPULATOR_HIDDEN, true);
- WM_manipulator_set_flag(man->adjust_xyz_no[i], WM_MANIPULATOR_HIDDEN, true);
+ WM_gizmo_set_flag(man->invoke_xyz_no[i], WM_GIZMO_HIDDEN, true);
+ WM_gizmo_set_flag(man->adjust_xyz_no[i], WM_GIZMO_HIDDEN, true);
}
if (G.moving) {
@@ -525,7 +525,7 @@ static void manipulator_mesh_extrude_refresh(const bContext *C, wmManipulatorGro
if (use_normal) {
struct TransformBounds tbounds_normal;
- if (!ED_transform_calc_manipulator_stats(
+ if (!ED_transform_calc_gizmo_stats(
C, &(struct TransformCalcParams){
.orientation_type = V3D_MANIP_NORMAL + 1,
}, &tbounds_normal))
@@ -536,7 +536,7 @@ static void manipulator_mesh_extrude_refresh(const bContext *C, wmManipulatorGro
}
/* TODO(campbell): run second since this modifies the 3D view, it should not. */
- if (!ED_transform_calc_manipulator_stats(
+ if (!ED_transform_calc_gizmo_stats(
C, &(struct TransformCalcParams){
.orientation_type = man->data.orientation_type + 1,
}, &tbounds))
@@ -556,15 +556,15 @@ static void manipulator_mesh_extrude_refresh(const bContext *C, wmManipulatorGro
(extrude_arrow_normal_axis_scale * extrude_button_offset_scale) / extrude_button_scale);
/* Needed for normal orientation. */
- manipulator_mesh_extrude_orientation_matrix_set(man, tbounds.axis);
+ gizmo_mesh_extrude_orientation_matrix_set(man, tbounds.axis);
if (use_normal) {
copy_m4_m3(man->adjust_xyz_no[3]->matrix_basis, man->data.normal_mat3);
}
/* Location. */
for (int i = 0; i < axis_len_used; i++) {
- WM_manipulator_set_matrix_location(man->invoke_xyz_no[i], tbounds.center);
- WM_manipulator_set_matrix_location(man->adjust_xyz_no[i], tbounds.center);
+ WM_gizmo_set_matrix_location(man->invoke_xyz_no[i], tbounds.center);
+ WM_gizmo_set_matrix_location(man->adjust_xyz_no[i], tbounds.center);
}
wmOperator *op = WM_operator_last_redo(C);
@@ -572,13 +572,13 @@ static void manipulator_mesh_extrude_refresh(const bContext *C, wmManipulatorGro
/* Un-hide. */
for (int i = 0; i < axis_len_used; i++) {
- WM_manipulator_set_flag(man->invoke_xyz_no[i], WM_MANIPULATOR_HIDDEN, false);
- WM_manipulator_set_flag(man->adjust_xyz_no[i], WM_MANIPULATOR_HIDDEN, !has_redo);
+ WM_gizmo_set_flag(man->invoke_xyz_no[i], WM_GIZMO_HIDDEN, false);
+ WM_gizmo_set_flag(man->adjust_xyz_no[i], WM_GIZMO_HIDDEN, !has_redo);
}
/* Operator properties. */
if (use_normal) {
- wmManipulatorOpElem *mpop = WM_manipulator_operator_get(man->invoke_xyz_no[3], 0);
+ wmGizmoOpElem *mpop = WM_gizmo_operator_get(man->invoke_xyz_no[3], 0);
PointerRNA macroptr = RNA_pointer_get(&mpop->ptr, "TRANSFORM_OT_translate");
RNA_enum_set(&macroptr, "constraint_orientation", V3D_MANIP_NORMAL);
}
@@ -598,7 +598,7 @@ static void manipulator_mesh_extrude_refresh(const bContext *C, wmManipulatorGro
(orientation_type == man->data.orientation_type && constraint_axis[i]) :
(orientation_type == V3D_MANIP_NORMAL && constraint_axis[2]))
{
- wmManipulatorOpElem *mpop = WM_manipulator_operator_get(man->adjust_xyz_no[i], 0);
+ wmGizmoOpElem *mpop = WM_gizmo_operator_get(man->adjust_xyz_no[i], 0);
PointerRNA macroptr = RNA_pointer_get(&mpop->ptr, "TRANSFORM_OT_translate");
@@ -609,7 +609,7 @@ static void manipulator_mesh_extrude_refresh(const bContext *C, wmManipulatorGro
else {
/* TODO(campbell): ideally we could adjust all,
* this is complicated by how operator redo and the transform macro works. */
- WM_manipulator_set_flag(man->adjust_xyz_no[i], WM_MANIPULATOR_HIDDEN, true);
+ WM_gizmo_set_flag(man->adjust_xyz_no[i], WM_GIZMO_HIDDEN, true);
}
}
}
@@ -618,14 +618,14 @@ static void manipulator_mesh_extrude_refresh(const bContext *C, wmManipulatorGro
RNA_enum_set(
man->invoke_xyz_no[i]->ptr,
"draw_options",
- (man->adjust_xyz_no[i]->flag & WM_MANIPULATOR_HIDDEN) ?
- ED_MANIPULATOR_BUTTON_SHOW_HELPLINE : 0);
+ (man->adjust_xyz_no[i]->flag & WM_GIZMO_HIDDEN) ?
+ ED_GIZMO_BUTTON_SHOW_HELPLINE : 0);
}
}
-static void manipulator_mesh_extrude_draw_prepare(const bContext *C, wmManipulatorGroup *mgroup)
+static void gizmo_mesh_extrude_draw_prepare(const bContext *C, wmGizmoGroup *mgroup)
{
- ManipulatorExtrudeGroup *man = mgroup->customdata;
+ GizmoExtrudeGroup *man = mgroup->customdata;
switch (man->data.orientation_type) {
case V3D_MANIP_VIEW:
{
@@ -633,14 +633,14 @@ static void manipulator_mesh_extrude_draw_prepare(const bContext *C, wmManipulat
float mat[3][3];
copy_m3_m4(mat, rv3d->viewinv);
normalize_m3(mat);
- manipulator_mesh_extrude_orientation_matrix_set(man, mat);
+ gizmo_mesh_extrude_orientation_matrix_set(man, mat);
break;
}
}
}
-static void manipulator_mesh_extrude_message_subscribe(
- const bContext *C, wmManipulatorGroup *mgroup, struct wmMsgBus *mbus)
+static void gizmo_mesh_extrude_message_subscribe(
+ const bContext *C, wmGizmoGroup *mgroup, struct wmMsgBus *mbus)
{
ARegion *ar = CTX_wm_region(C);
@@ -648,7 +648,7 @@ static void manipulator_mesh_extrude_message_subscribe(
wmMsgSubscribeValue msg_sub_value_mpr_tag_refresh = {
.owner = ar,
.user_data = mgroup->parent_mmap,
- .notify = WM_manipulator_do_msg_notify_tag_refresh,
+ .notify = WM_gizmo_do_msg_notify_tag_refresh,
};
{
@@ -657,24 +657,24 @@ static void manipulator_mesh_extrude_message_subscribe(
}
-static void MESH_WGT_extrude(struct wmManipulatorGroupType *wgt)
+static void MESH_WGT_extrude(struct wmGizmoGroupType *wgt)
{
wgt->name = "Mesh Extrude";
wgt->idname = "MESH_WGT_extrude";
- wgt->flag = WM_MANIPULATORGROUPTYPE_3D;
+ wgt->flag = WM_GIZMOGROUPTYPE_3D;
wgt->mmap_params.spaceid = SPACE_VIEW3D;
wgt->mmap_params.regionid = RGN_TYPE_WINDOW;
- wgt->poll = manipulator_mesh_extrude_poll;
- wgt->setup = manipulator_mesh_extrude_setup;
- wgt->refresh = manipulator_mesh_extrude_refresh;
- wgt->draw_prepare = manipulator_mesh_extrude_draw_prepare;
- wgt->message_subscribe = manipulator_mesh_extrude_message_subscribe;
+ wgt->poll = gizmo_mesh_extrude_poll;
+ wgt->setup = gizmo_mesh_extrude_setup;
+ wgt->refresh = gizmo_mesh_extrude_refresh;
+ wgt->draw_prepare = gizmo_mesh_extrude_draw_prepare;
+ wgt->message_subscribe = gizmo_mesh_extrude_message_subscribe;
}
-#endif /* USE_MANIPULATOR */
+#endif /* USE_GIZMO */
/** \} */
@@ -825,8 +825,8 @@ void MESH_OT_extrude_context(wmOperatorType *ot)
Transform_Properties(ot, P_NO_DEFAULTS | P_MIRROR_DUMMY);
-#ifdef USE_MANIPULATOR
- WM_manipulatorgrouptype_append(MESH_WGT_extrude);
+#ifdef USE_GIZMO
+ WM_gizmogrouptype_append(MESH_WGT_extrude);
#endif
}
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin.c b/source/blender/editors/mesh/editmesh_extrude_spin.c
index 74e2833b2d9..3864bd63036 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin.c
@@ -54,27 +54,27 @@
#include "mesh_intern.h" /* own include */
-#define USE_MANIPULATOR
+#define USE_GIZMO
-#ifdef USE_MANIPULATOR
+#ifdef USE_GIZMO
#include "ED_gizmo_library.h"
#include "ED_undo.h"
#endif
/* -------------------------------------------------------------------- */
-/** \name Spin Manipulator
+/** \name Spin Gizmo
* \{ */
-#ifdef USE_MANIPULATOR
-typedef struct ManipulatorSpinGroup {
+#ifdef USE_GIZMO
+typedef struct GizmoSpinGroup {
/* Arrow to change plane depth. */
- struct wmManipulator *translate_z;
+ struct wmGizmo *translate_z;
/* Translate XYZ */
- struct wmManipulator *translate_c;
- /* For grabbing the manipulator and moving freely. */
- struct wmManipulator *rotate_c;
+ struct wmGizmo *translate_c;
+ /* For grabbing the gizmo and moving freely. */
+ struct wmGizmo *rotate_c;
/* Spin angle */
- struct wmManipulator *angle_z;
+ struct wmGizmo *angle_z;
/* We could store more vars here! */
struct {
@@ -87,14 +87,14 @@ typedef struct ManipulatorSpinGroup {
float rotate_axis[3];
float rotate_up[3];
} data;
-} ManipulatorSpinGroup;
+} GizmoSpinGroup;
/**
* XXX. calling redo from property updates is not great.
* This is needed because changing the RNA doesn't cause a redo
* and we're not using operator UI which does just this.
*/
-static void manipulator_spin_exec(ManipulatorSpinGroup *man)
+static void gizmo_spin_exec(GizmoSpinGroup *man)
{
wmOperator *op = man->data.op;
if (op == WM_operator_last_redo((bContext *)man->data.context)) {
@@ -102,7 +102,7 @@ static void manipulator_spin_exec(ManipulatorSpinGroup *man)
}
}
-static void manipulator_mesh_spin_update_from_op(ManipulatorSpinGroup *man)
+static void gizmo_mesh_spin_update_from_op(GizmoSpinGroup *man)
{
wmOperator *op = man->data.op;
@@ -111,15 +111,15 @@ static void manipulator_mesh_spin_update_from_op(ManipulatorSpinGroup *man)
RNA_property_float_get_array(op->ptr, man->data.prop_axis_co, plane_co);
RNA_property_float_get_array(op->ptr, man->data.prop_axis_no, plane_no);
- WM_manipulator_set_matrix_location(man->translate_z, plane_co);
- WM_manipulator_set_matrix_location(man->rotate_c, plane_co);
- WM_manipulator_set_matrix_location(man->angle_z, plane_co);
+ WM_gizmo_set_matrix_location(man->translate_z, plane_co);
+ WM_gizmo_set_matrix_location(man->rotate_c, plane_co);
+ WM_gizmo_set_matrix_location(man->angle_z, plane_co);
/* translate_c location comes from the property. */
- WM_manipulator_set_matrix_rotation_from_z_axis(man->translate_z, plane_no);
- WM_manipulator_set_matrix_rotation_from_z_axis(man->angle_z, plane_no);
+ WM_gizmo_set_matrix_rotation_from_z_axis(man->translate_z, plane_no);
+ WM_gizmo_set_matrix_rotation_from_z_axis(man->angle_z, plane_no);
- WM_manipulator_set_scale(man->translate_c, 0.2);
+ WM_gizmo_set_scale(man->translate_c, 0.2);
RegionView3D *rv3d = ED_view3d_context_rv3d(man->data.context);
if (rv3d) {
@@ -130,23 +130,23 @@ static void manipulator_mesh_spin_update_from_op(ManipulatorSpinGroup *man)
project_plane_normalized_v3_v3v3(man->data.rotate_up, man->data.rotate_up, man->data.rotate_axis);
normalize_v3(man->data.rotate_up);
- WM_manipulator_set_matrix_rotation_from_z_axis(man->translate_c, plane_no);
- WM_manipulator_set_matrix_rotation_from_yz_axis(man->rotate_c, plane_no, man->data.rotate_axis);
+ WM_gizmo_set_matrix_rotation_from_z_axis(man->translate_c, plane_no);
+ WM_gizmo_set_matrix_rotation_from_yz_axis(man->rotate_c, plane_no, man->data.rotate_axis);
/* show the axis instead of mouse cursor */
RNA_enum_set(man->rotate_c->ptr, "draw_options",
- ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_MIRROR |
- ED_MANIPULATOR_DIAL_DRAW_FLAG_ANGLE_START_Y);
+ ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_MIRROR |
+ ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_START_Y);
}
}
/* depth callbacks */
-static void manipulator_spin_prop_depth_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_spin_prop_depth_get(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
void *value_p)
{
- ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
+ GizmoSpinGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
float *value = value_p;
@@ -160,11 +160,11 @@ static void manipulator_spin_prop_depth_get(
value[0] = dot_v3v3(plane_no, plane_co) - dot_v3v3(plane_no, mpr->matrix_basis[3]);
}
-static void manipulator_spin_prop_depth_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_spin_prop_depth_set(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
const void *value_p)
{
- ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
+ GizmoSpinGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
const float *value = value_p;
@@ -183,15 +183,15 @@ static void manipulator_spin_prop_depth_set(
RNA_property_float_set_array(op->ptr, man->data.prop_axis_co, plane_co);
- manipulator_spin_exec(man);
+ gizmo_spin_exec(man);
}
/* translate callbacks */
-static void manipulator_spin_prop_translate_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_spin_prop_translate_get(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
void *value_p)
{
- ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
+ GizmoSpinGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
float *value = value_p;
@@ -201,11 +201,11 @@ static void manipulator_spin_prop_translate_get(
RNA_property_float_get_array(op->ptr, man->data.prop_axis_co, value);
}
-static void manipulator_spin_prop_translate_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_spin_prop_translate_set(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
const void *value)
{
- ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
+ GizmoSpinGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
BLI_assert(mpr_prop->type->array_length == 3);
@@ -213,15 +213,15 @@ static void manipulator_spin_prop_translate_set(
RNA_property_float_set_array(op->ptr, man->data.prop_axis_co, value);
- manipulator_spin_exec(man);
+ gizmo_spin_exec(man);
}
/* angle callbacks */
-static void manipulator_spin_prop_axis_angle_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_spin_prop_axis_angle_get(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
void *value_p)
{
- ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
+ GizmoSpinGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
float *value = value_p;
@@ -244,11 +244,11 @@ static void manipulator_spin_prop_axis_angle_get(
}
}
-static void manipulator_spin_prop_axis_angle_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_spin_prop_axis_angle_set(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
const void *value_p)
{
- ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
+ GizmoSpinGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
const float *value = value_p;
@@ -273,17 +273,17 @@ static void manipulator_spin_prop_axis_angle_set(
/* re-normalize - seems acceptable */
RNA_property_float_set_array(op->ptr, man->data.prop_axis_no, plane_no);
- manipulator_spin_exec(man);
+ gizmo_spin_exec(man);
}
}
}
/* angle callbacks */
-static void manipulator_spin_prop_angle_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_spin_prop_angle_get(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
void *value_p)
{
- ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
+ GizmoSpinGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
float *value = value_p;
@@ -292,31 +292,31 @@ static void manipulator_spin_prop_angle_get(
value[0] = RNA_property_float_get(op->ptr, man->data.prop_angle);
}
-static void manipulator_spin_prop_angle_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
+static void gizmo_spin_prop_angle_set(
+ const wmGizmo *mpr, wmGizmoProperty *mpr_prop,
const void *value_p)
{
- ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
+ GizmoSpinGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
BLI_assert(mpr_prop->type->array_length == 1);
UNUSED_VARS_NDEBUG(mpr_prop);
const float *value = value_p;
RNA_property_float_set(op->ptr, man->data.prop_angle, value[0]);
- manipulator_spin_exec(man);
+ gizmo_spin_exec(man);
}
-static bool manipulator_mesh_spin_poll(const bContext *C, wmManipulatorGroupType *wgt)
+static bool gizmo_mesh_spin_poll(const bContext *C, wmGizmoGroupType *wgt)
{
wmOperator *op = WM_operator_last_redo(C);
if (op == NULL || !STREQ(op->type->idname, "MESH_OT_spin")) {
- WM_manipulator_group_type_unlink_delayed_ptr(wgt);
+ WM_gizmo_group_type_unlink_delayed_ptr(wgt);
return false;
}
return true;
}
-static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *mgroup)
+static void gizmo_mesh_spin_setup(const bContext *C, wmGizmoGroup *mgroup)
{
wmOperator *op = WM_operator_last_redo(C);
@@ -324,32 +324,32 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m
return;
}
- struct ManipulatorSpinGroup *man = MEM_callocN(sizeof(ManipulatorSpinGroup), __func__);
+ struct GizmoSpinGroup *man = MEM_callocN(sizeof(GizmoSpinGroup), __func__);
mgroup->customdata = man;
- const wmManipulatorType *wt_arrow = WM_manipulatortype_find("MANIPULATOR_WT_arrow_3d", true);
- const wmManipulatorType *wt_grab = WM_manipulatortype_find("MANIPULATOR_WT_grab_3d", true);
- const wmManipulatorType *wt_dial = WM_manipulatortype_find("MANIPULATOR_WT_dial_3d", true);
+ const wmGizmoType *wt_arrow = WM_gizmotype_find("GIZMO_WT_arrow_3d", true);
+ const wmGizmoType *wt_grab = WM_gizmotype_find("GIZMO_WT_grab_3d", true);
+ const wmGizmoType *wt_dial = WM_gizmotype_find("GIZMO_WT_dial_3d", true);
- man->translate_z = WM_manipulator_new_ptr(wt_arrow, mgroup, NULL);
- man->translate_c = WM_manipulator_new_ptr(wt_grab, mgroup, NULL);
- man->rotate_c = WM_manipulator_new_ptr(wt_dial, mgroup, NULL);
- man->angle_z = WM_manipulator_new_ptr(wt_dial, mgroup, NULL);
+ man->translate_z = WM_gizmo_new_ptr(wt_arrow, mgroup, NULL);
+ man->translate_c = WM_gizmo_new_ptr(wt_grab, mgroup, NULL);
+ man->rotate_c = WM_gizmo_new_ptr(wt_dial, mgroup, NULL);
+ man->angle_z = WM_gizmo_new_ptr(wt_dial, mgroup, NULL);
- UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->translate_z->color);
- UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, man->translate_c->color);
- UI_GetThemeColor3fv(TH_MANIPULATOR_SECONDARY, man->rotate_c->color);
+ UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, man->translate_z->color);
+ UI_GetThemeColor3fv(TH_GIZMO_PRIMARY, man->translate_c->color);
+ UI_GetThemeColor3fv(TH_GIZMO_SECONDARY, man->rotate_c->color);
UI_GetThemeColor3fv(TH_AXIS_Z, man->angle_z->color);
- RNA_enum_set(man->translate_z->ptr, "draw_style", ED_MANIPULATOR_ARROW_STYLE_NORMAL);
- RNA_enum_set(man->translate_c->ptr, "draw_style", ED_MANIPULATOR_GRAB_STYLE_RING_2D);
+ RNA_enum_set(man->translate_z->ptr, "draw_style", ED_GIZMO_ARROW_STYLE_NORMAL);
+ RNA_enum_set(man->translate_c->ptr, "draw_style", ED_GIZMO_GRAB_STYLE_RING_2D);
- WM_manipulator_set_flag(man->translate_c, WM_MANIPULATOR_DRAW_VALUE, true);
- WM_manipulator_set_flag(man->rotate_c, WM_MANIPULATOR_DRAW_VALUE, true);
- WM_manipulator_set_flag(man->angle_z, WM_MANIPULATOR_DRAW_VALUE, true);
+ WM_gizmo_set_flag(man->translate_c, WM_GIZMO_DRAW_VALUE, true);
+ WM_gizmo_set_flag(man->rotate_c, WM_GIZMO_DRAW_VALUE, true);
+ WM_gizmo_set_flag(man->angle_z, WM_GIZMO_DRAW_VALUE, true);
- WM_manipulator_set_scale(man->angle_z, 0.5f);
+ WM_gizmo_set_scale(man->angle_z, 0.5f);
{
man->data.context = (bContext *)C;
@@ -359,42 +359,42 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m
man->data.prop_angle = RNA_struct_find_property(op->ptr, "angle");
}
- manipulator_mesh_spin_update_from_op(man);
+ gizmo_mesh_spin_update_from_op(man);
/* Setup property callbacks */
{
- WM_manipulator_target_property_def_func(
+ WM_gizmo_target_property_def_func(
man->translate_z, "offset",
- &(const struct wmManipulatorPropertyFnParams) {
- .value_get_fn = manipulator_spin_prop_depth_get,
- .value_set_fn = manipulator_spin_prop_depth_set,
+ &(const struct wmGizmoPropertyFnParams) {
+ .value_get_fn = gizmo_spin_prop_depth_get,
+ .value_set_fn = gizmo_spin_prop_depth_set,
.range_get_fn = NULL,
.user_data = NULL,
});
- WM_manipulator_target_property_def_func(
+ WM_gizmo_target_property_def_func(
man->translate_c, "offset",
- &(const struct wmManipulatorPropertyFnParams) {
- .value_get_fn = manipulator_spin_prop_translate_get,
- .value_set_fn = manipulator_spin_prop_translate_set,
+ &(const struct wmGizmoPropertyFnParams) {
+ .value_get_fn = gizmo_spin_prop_translate_get,
+ .value_set_fn = gizmo_spin_prop_translate_set,
.range_get_fn = NULL,
.user_data = NULL,
});
- WM_manipulator_target_property_def_func(
+ WM_gizmo_target_property_def_func(
man->rotate_c, "offset",
- &(const struct wmManipulatorPropertyFnParams) {
- .value_get_fn = manipulator_spin_prop_axis_angle_get,
- .value_set_fn = manipulator_spin_prop_axis_angle_set,
+ &(const struct wmGizmoPropertyFnParams) {
+ .value_get_fn = gizmo_spin_prop_axis_angle_get,
+ .value_set_fn = gizmo_spin_prop_axis_angle_set,
.range_get_fn = NULL,
.user_data = NULL,
});
- WM_manipulator_target_property_def_func(
+ WM_gizmo_target_property_def_func(
man->angle_z, "offset",
- &(const struct wmManipulatorPropertyFnParams) {
- .value_get_fn = manipulator_spin_prop_angle_get,
- .value_set_fn = manipulator_spin_prop_angle_set,
+ &(const struct wmGizmoPropertyFnParams) {
+ .value_get_fn = gizmo_spin_prop_angle_get,
+ .value_set_fn = gizmo_spin_prop_angle_set,
.range_get_fn = NULL,
.user_data = NULL,
});
@@ -402,34 +402,34 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m
}
}
-static void manipulator_mesh_spin_draw_prepare(
- const bContext *UNUSED(C), wmManipulatorGroup *mgroup)
+static void gizmo_mesh_spin_draw_prepare(
+ const bContext *UNUSED(C), wmGizmoGroup *mgroup)
{
- ManipulatorSpinGroup *man = mgroup->customdata;
+ GizmoSpinGroup *man = mgroup->customdata;
if (man->data.op->next) {
man->data.op = WM_operator_last_redo((bContext *)man->data.context);
}
- manipulator_mesh_spin_update_from_op(man);
+ gizmo_mesh_spin_update_from_op(man);
}
-static void MESH_WGT_spin(struct wmManipulatorGroupType *wgt)
+static void MESH_WGT_spin(struct wmGizmoGroupType *wgt)
{
wgt->name = "Mesh Spin";
wgt->idname = "MESH_WGT_spin";
- wgt->flag = WM_MANIPULATORGROUPTYPE_3D;
+ wgt->flag = WM_GIZMOGROUPTYPE_3D;
wgt->mmap_params.spaceid = SPACE_VIEW3D;
wgt->mmap_params.regionid = RGN_TYPE_WINDOW;
- wgt->poll = manipulator_mesh_spin_poll;
- wgt->setup = manipulator_mesh_spin_setup;
- wgt->draw_prepare = manipulator_mesh_spin_draw_prepare;
+ wgt->poll = gizmo_mesh_spin_poll;
+ wgt->setup = gizmo_mesh_spin_setup;
+ wgt->draw_prepare = gizmo_mesh_spin_draw_prepare;
}
/** \} */
-#endif /* USE_MANIPULATOR */
+#endif /* USE_GIZMO */
/* -------------------------------------------------------------------- */
/** \name Spin Operator
@@ -508,11 +508,11 @@ static int edbm_spin_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e
int ret = edbm_spin_exec(C, op);
-#ifdef USE_MANIPULATOR
+#ifdef USE_GIZMO
if (ret & OPERATOR_FINISHED) {
- /* Setup manipulators */
- if (v3d && ((v3d->mpr_flag & V3D_MANIPULATOR_HIDE) == 0)) {
- WM_manipulator_group_type_ensure("MESH_WGT_spin");
+ /* Setup gizmos */
+ if (v3d && ((v3d->mpr_flag & V3D_GIZMO_HIDE) == 0)) {
+ WM_gizmo_group_type_ensure("MESH_WGT_spin");
}
}
#endif
@@ -548,7 +548,7 @@ void MESH_OT_spin(wmOperatorType *ot)
"Center", "Center in global view space", -1e4f, 1e4f);
RNA_def_float_vector(ot->srna, "axis", 3, NULL, -1.0f, 1.0f, "Axis", "Axis in global view space", -1.0f, 1.0f);
-#ifdef USE_MANIPULATOR
- WM_manipulatorgrouptype_append(MESH_WGT_spin);
+#ifdef USE_GIZMO
+ WM_gizmogrouptype_append(MESH_WGT_spin);
#endif
}
diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c
index 1f1d2f5a2e1..1be180b852c 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -174,7 +174,7 @@ static bool edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
G.moving = G_TRANSFORM_EDIT;
if (v3d) {
opdata->mpr_flag = v3d->mpr_flag;
- v3d->mpr_flag = V3D_MANIPULATOR_HIDE;
+ v3d->mpr_flag = V3D_GIZMO_HIDE;
}
}
diff --git a/source/blender/editors/mesh/editmesh_polybuild.c b/source/blender/editors/mesh/editmesh_polybuild.c
index e8bcfb5eb08..86c9fc0243b 100644
--- a/source/blender/editors/mesh/editmesh_polybuild.c
+++ b/source/blender/editors/mesh/editmesh_polybuild.c
@@ -390,7 +390,7 @@ void MESH_OT_polybuild_dissolve_at_cursor(wmOperatorType *ot)
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Cursor Manipulator
+/** \name Cursor Gizmo
*
* \note This may need its own file, for now not.
* \{ */
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 3800ab9dddd..cc9448e5e06 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -92,8 +92,8 @@ void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot);
void MESH_OT_primitive_uv_sphere_add(struct wmOperatorType *ot);
void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot);
-/* *** editmesh_add_manipulator.c *** */
-void MESH_OT_primitive_cube_add_manipulator(struct wmOperatorType *ot);
+/* *** editmesh_add_gizmo.c *** */
+void MESH_OT_primitive_cube_add_gizmo(struct wmOperatorType *ot);
/* *** editmesh_bevel.c *** */
void MESH_OT_bevel(struct wmOperatorType *ot);
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index 2bfc0634f1e..0fcc5ada854 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -78,7 +78,7 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_primitive_uv_sphere_add);
WM_operatortype_append(MESH_OT_primitive_ico_sphere_add);
- WM_operatortype_append(MESH_OT_primitive_cube_add_manipulator);
+ WM_operatortype_append(MESH_OT_primitive_cube_add_gizmo);
WM_operatortype_append(MESH_OT_duplicate);
WM_operatortype_append(MESH_OT_remove_doubles);