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:
Diffstat (limited to 'source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c')
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c246
1 files changed, 123 insertions, 123 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
index 72b24e03c00..9807a111d26 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c
@@ -26,15 +26,15 @@
/** \file arrow3d_gizmo.c
* \ingroup wm
*
- * \name Arrow Manipulator
+ * \name Arrow Gizmo
*
- * 3D Manipulator
+ * 3D Gizmo
*
- * \brief Simple arrow manipulator which is dragged into a certain direction.
+ * \brief Simple arrow gizmo which is dragged into a certain direction.
* The arrow head can have varying shapes, e.g. cone, box, etc.
*
* - `matrix[0]` is derived from Y and Z.
- * - `matrix[1]` is 'up' for manipulator types that have an up.
+ * - `matrix[1]` is 'up' for gizmo types that have an up.
* - `matrix[2]` is the arrow direction (for all arrowes).
*/
@@ -69,35 +69,35 @@
#include "../gizmo_geometry.h"
#include "../gizmo_library_intern.h"
-/* to use custom arrows exported to geom_arrow_manipulator.c */
-//#define USE_MANIPULATOR_CUSTOM_ARROWS
+/* to use custom arrows exported to geom_arrow_gizmo.c */
+//#define USE_GIZMO_CUSTOM_ARROWS
-typedef struct ArrowManipulator3D {
- wmManipulator manipulator;
- ManipulatorCommonData data;
-} ArrowManipulator3D;
+typedef struct ArrowGizmo3D {
+ wmGizmo gizmo;
+ GizmoCommonData data;
+} ArrowGizmo3D;
/* -------------------------------------------------------------------- */
-static void manipulator_arrow_matrix_basis_get(const wmManipulator *mpr, float r_matrix[4][4])
+static void gizmo_arrow_matrix_basis_get(const wmGizmo *mpr, float r_matrix[4][4])
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
+ ArrowGizmo3D *arrow = (ArrowGizmo3D *)mpr;
- copy_m4_m4(r_matrix, arrow->manipulator.matrix_basis);
- madd_v3_v3fl(r_matrix[3], arrow->manipulator.matrix_basis[2], arrow->data.offset);
+ copy_m4_m4(r_matrix, arrow->gizmo.matrix_basis);
+ madd_v3_v3fl(r_matrix[3], arrow->gizmo.matrix_basis[2], arrow->data.offset);
}
-static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool select, const float color[4])
+static void arrow_draw_geom(const ArrowGizmo3D *arrow, const bool select, const float color[4])
{
uint pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
bool unbind_shader = true;
- const int draw_style = RNA_enum_get(arrow->manipulator.ptr, "draw_style");
- const int draw_options = RNA_enum_get(arrow->manipulator.ptr, "draw_options");
+ const int draw_style = RNA_enum_get(arrow->gizmo.ptr, "draw_style");
+ const int draw_options = RNA_enum_get(arrow->gizmo.ptr, "draw_options");
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
- if (draw_style == ED_MANIPULATOR_ARROW_STYLE_CROSS) {
+ if (draw_style == ED_GIZMO_ARROW_STYLE_CROSS) {
immUniformColor4fv(color);
immBegin(GWN_PRIM_LINES, 4);
@@ -107,9 +107,9 @@ static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool select,
immVertex3f(pos, 0.0f, 1.0f, 0.0f);
immEnd();
}
- else if (draw_style == ED_MANIPULATOR_ARROW_STYLE_CONE) {
+ else if (draw_style == ED_GIZMO_ARROW_STYLE_CONE) {
float aspect[2];
- RNA_float_get_array(arrow->manipulator.ptr, "aspect", aspect);
+ RNA_float_get_array(arrow->gizmo.ptr, "aspect", aspect);
const float unitx = aspect[0];
const float unity = aspect[1];
const float vec[4][3] = {
@@ -119,23 +119,23 @@ static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool select,
{-unitx, unity, 0},
};
- GPU_line_width(arrow->manipulator.line_width);
- wm_manipulator_vec_draw(color, vec, ARRAY_SIZE(vec), pos, GWN_PRIM_LINE_LOOP);
+ GPU_line_width(arrow->gizmo.line_width);
+ wm_gizmo_vec_draw(color, vec, ARRAY_SIZE(vec), pos, GWN_PRIM_LINE_LOOP);
}
else {
-#ifdef USE_MANIPULATOR_CUSTOM_ARROWS
- wm_manipulator_geometryinfo_draw(&wm_manipulator_geom_data_arrow, select, color);
+#ifdef USE_GIZMO_CUSTOM_ARROWS
+ wm_gizmo_geometryinfo_draw(&wm_gizmo_geom_data_arrow, select, color);
#else
- const float arrow_length = RNA_float_get(arrow->manipulator.ptr, "length");
+ const float arrow_length = RNA_float_get(arrow->gizmo.ptr, "length");
const float vec[2][3] = {
{0.0f, 0.0f, 0.0f},
{0.0f, 0.0f, arrow_length},
};
- if (draw_options & ED_MANIPULATOR_ARROW_DRAW_FLAG_STEM) {
- GPU_line_width(arrow->manipulator.line_width);
- wm_manipulator_vec_draw(color, vec, ARRAY_SIZE(vec), pos, GWN_PRIM_LINE_STRIP);
+ if (draw_options & ED_GIZMO_ARROW_DRAW_FLAG_STEM) {
+ GPU_line_width(arrow->gizmo.line_width);
+ wm_gizmo_vec_draw(color, vec, ARRAY_SIZE(vec), pos, GWN_PRIM_LINE_STRIP);
}
else {
immUniformColor4fv(color);
@@ -145,7 +145,7 @@ static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool select,
gpuPushMatrix();
- if (draw_style == ED_MANIPULATOR_ARROW_STYLE_BOX) {
+ if (draw_style == ED_GIZMO_ARROW_STYLE_BOX) {
const float size = 0.05f;
/* translate to line end with some extra offset so box starts exactly where line ends */
@@ -156,10 +156,10 @@ static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool select,
/* draw cube */
immUnbindProgram();
unbind_shader = false;
- wm_manipulator_geometryinfo_draw(&wm_manipulator_geom_data_cube, select, color);
+ wm_gizmo_geometryinfo_draw(&wm_gizmo_geom_data_cube, select, color);
}
else {
- BLI_assert(draw_style == ED_MANIPULATOR_ARROW_STYLE_NORMAL);
+ BLI_assert(draw_style == ED_GIZMO_ARROW_STYLE_NORMAL);
const float len = 0.25f;
const float width = 0.06f;
@@ -172,7 +172,7 @@ static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool select,
}
gpuPopMatrix();
-#endif /* USE_MANIPULATOR_CUSTOM_ARROWS */
+#endif /* USE_GIZMO_CUSTOM_ARROWS */
}
if (unbind_shader) {
@@ -180,15 +180,15 @@ static void arrow_draw_geom(const ArrowManipulator3D *arrow, const bool select,
}
}
-static void arrow_draw_intern(ArrowManipulator3D *arrow, const bool select, const bool highlight)
+static void arrow_draw_intern(ArrowGizmo3D *arrow, const bool select, const bool highlight)
{
- wmManipulator *mpr = &arrow->manipulator;
+ wmGizmo *mpr = &arrow->gizmo;
float color[4];
float matrix_final[4][4];
- manipulator_color_get(mpr, highlight, color);
+ gizmo_color_get(mpr, highlight, color);
- WM_manipulator_calc_matrix_final(mpr, matrix_final);
+ WM_gizmo_calc_matrix_final(mpr, matrix_final);
gpuPushMatrix();
gpuMultMatrix(matrix_final);
@@ -199,7 +199,7 @@ static void arrow_draw_intern(ArrowManipulator3D *arrow, const bool select, cons
gpuPopMatrix();
if (mpr->interaction_data) {
- ManipulatorInteraction *inter = mpr->interaction_data;
+ GizmoInteraction *inter = mpr->interaction_data;
gpuPushMatrix();
gpuMultMatrix(inter->init_matrix_final);
@@ -213,29 +213,29 @@ static void arrow_draw_intern(ArrowManipulator3D *arrow, const bool select, cons
}
}
-static void manipulator_arrow_draw_select(
- const bContext *UNUSED(C), wmManipulator *mpr,
+static void gizmo_arrow_draw_select(
+ const bContext *UNUSED(C), wmGizmo *mpr,
int select_id)
{
GPU_select_load_id(select_id);
- arrow_draw_intern((ArrowManipulator3D *)mpr, true, false);
+ arrow_draw_intern((ArrowGizmo3D *)mpr, true, false);
}
-static void manipulator_arrow_draw(const bContext *UNUSED(C), wmManipulator *mpr)
+static void gizmo_arrow_draw(const bContext *UNUSED(C), wmGizmo *mpr)
{
- arrow_draw_intern((ArrowManipulator3D *)mpr, false, (mpr->state & WM_MANIPULATOR_STATE_HIGHLIGHT) != 0);
+ arrow_draw_intern((ArrowGizmo3D *)mpr, false, (mpr->state & WM_GIZMO_STATE_HIGHLIGHT) != 0);
}
/**
* Calculate arrow offset independent from prop min value,
* meaning the range will not be offset by min value first.
*/
-static int manipulator_arrow_modal(
- bContext *C, wmManipulator *mpr, const wmEvent *event,
- eWM_ManipulatorTweak tweak_flag)
+static int gizmo_arrow_modal(
+ bContext *C, wmGizmo *mpr, const wmEvent *event,
+ eWM_GizmoFlagTweak tweak_flag)
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
- ManipulatorInteraction *inter = mpr->interaction_data;
+ ArrowGizmo3D *arrow = (ArrowGizmo3D *)mpr;
+ GizmoInteraction *inter = mpr->interaction_data;
View3D *v3d = CTX_wm_view3d(C);
ARegion *ar = CTX_wm_region(C);
RegionView3D *rv3d = ar->regiondata;
@@ -256,7 +256,7 @@ static int manipulator_arrow_modal(
float arrow_co[3];
float arrow_no[3];
copy_v3_v3(arrow_co, inter->init_matrix_basis[3]);
- normalize_v3_v3(arrow_no, arrow->manipulator.matrix_basis[2]);
+ normalize_v3_v3(arrow_no, arrow->gizmo.matrix_basis[2]);
int ok = 0;
@@ -268,7 +268,7 @@ static int manipulator_arrow_modal(
{
/* Force Y axis if we're view aligned */
if (j == 0) {
- if (RAD2DEGF(acosf(dot_v3v3(proj[j].ray_direction, arrow->manipulator.matrix_basis[2]))) < 5.0f) {
+ if (RAD2DEGF(acosf(dot_v3v3(proj[j].ray_direction, arrow->gizmo.matrix_basis[2]))) < 5.0f) {
normalize_v3_v3(arrow_no, rv3d->viewinv[1]);
}
}
@@ -296,24 +296,24 @@ static int manipulator_arrow_modal(
sub_v3_v3v3(offset, proj[1].location, proj[0].location);
facdir = dot_v3v3(arrow_no, offset) < 0.0f ? -1 : 1;
- ManipulatorCommonData *data = &arrow->data;
+ GizmoCommonData *data = &arrow->data;
const float ofs_new = facdir * len_v3(offset);
- wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
+ wmGizmoProperty *mpr_prop = WM_gizmo_target_property_find(mpr, "offset");
/* set the property for the operator and call its modal function */
- if (WM_manipulator_target_property_is_valid(mpr_prop)) {
- const int transform_flag = RNA_enum_get(arrow->manipulator.ptr, "transform");
- const bool constrained = (transform_flag & ED_MANIPULATOR_ARROW_XFORM_FLAG_CONSTRAINED) != 0;
- const bool inverted = (transform_flag & ED_MANIPULATOR_ARROW_XFORM_FLAG_INVERTED) != 0;
- const bool use_precision = (tweak_flag & WM_MANIPULATOR_TWEAK_PRECISE) != 0;
- float value = manipulator_value_from_offset(data, inter, ofs_new, constrained, inverted, use_precision);
-
- WM_manipulator_target_property_value_set(C, mpr, mpr_prop, value);
+ if (WM_gizmo_target_property_is_valid(mpr_prop)) {
+ const int transform_flag = RNA_enum_get(arrow->gizmo.ptr, "transform");
+ const bool constrained = (transform_flag & ED_GIZMO_ARROW_XFORM_FLAG_CONSTRAINED) != 0;
+ const bool inverted = (transform_flag & ED_GIZMO_ARROW_XFORM_FLAG_INVERTED) != 0;
+ const bool use_precision = (tweak_flag & WM_GIZMO_TWEAK_PRECISE) != 0;
+ float value = gizmo_value_from_offset(data, inter, ofs_new, constrained, inverted, use_precision);
+
+ WM_gizmo_target_property_value_set(C, mpr, mpr_prop, value);
/* get clamped value */
- value = WM_manipulator_target_property_value_get(mpr, mpr_prop);
+ value = WM_gizmo_target_property_value_get(mpr, mpr_prop);
- data->offset = manipulator_offset_from_value(data, value, constrained, inverted);
+ data->offset = gizmo_offset_from_value(data, value, constrained, inverted);
}
else {
data->offset = ofs_new;
@@ -326,25 +326,25 @@ static int manipulator_arrow_modal(
return OPERATOR_RUNNING_MODAL;
}
-static void manipulator_arrow_setup(wmManipulator *mpr)
+static void gizmo_arrow_setup(wmGizmo *mpr)
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
+ ArrowGizmo3D *arrow = (ArrowGizmo3D *)mpr;
- arrow->manipulator.flag |= WM_MANIPULATOR_DRAW_MODAL;
+ arrow->gizmo.flag |= WM_GIZMO_DRAW_MODAL;
arrow->data.range_fac = 1.0f;
}
-static int manipulator_arrow_invoke(
- bContext *UNUSED(C), wmManipulator *mpr, const wmEvent *event)
+static int gizmo_arrow_invoke(
+ bContext *UNUSED(C), wmGizmo *mpr, const wmEvent *event)
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
- ManipulatorInteraction *inter = MEM_callocN(sizeof(ManipulatorInteraction), __func__);
- wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
+ ArrowGizmo3D *arrow = (ArrowGizmo3D *)mpr;
+ GizmoInteraction *inter = MEM_callocN(sizeof(GizmoInteraction), __func__);
+ wmGizmoProperty *mpr_prop = WM_gizmo_target_property_find(mpr, "offset");
- /* Some manipulators don't use properties. */
- if (WM_manipulator_target_property_is_valid(mpr_prop)) {
- inter->init_value = WM_manipulator_target_property_value_get(mpr, mpr_prop);
+ /* Some gizmos don't use properties. */
+ if (WM_gizmo_target_property_is_valid(mpr_prop)) {
+ inter->init_value = WM_gizmo_target_property_value_get(mpr, mpr_prop);
}
inter->init_offset = arrow->data.offset;
@@ -352,126 +352,126 @@ static int manipulator_arrow_invoke(
inter->init_mval[0] = event->mval[0];
inter->init_mval[1] = event->mval[1];
- manipulator_arrow_matrix_basis_get(mpr, inter->init_matrix_basis);
- WM_manipulator_calc_matrix_final(mpr, inter->init_matrix_final);
+ gizmo_arrow_matrix_basis_get(mpr, inter->init_matrix_basis);
+ WM_gizmo_calc_matrix_final(mpr, inter->init_matrix_final);
mpr->interaction_data = inter;
return OPERATOR_RUNNING_MODAL;
}
-static void manipulator_arrow_property_update(wmManipulator *mpr, wmManipulatorProperty *mpr_prop)
+static void gizmo_arrow_property_update(wmGizmo *mpr, wmGizmoProperty *mpr_prop)
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
- const int transform_flag = RNA_enum_get(arrow->manipulator.ptr, "transform");
- const bool constrained = (transform_flag & ED_MANIPULATOR_ARROW_XFORM_FLAG_CONSTRAINED) != 0;
- const bool inverted = (transform_flag & ED_MANIPULATOR_ARROW_XFORM_FLAG_INVERTED) != 0;
- manipulator_property_data_update(mpr, &arrow->data, mpr_prop, constrained, inverted);
+ ArrowGizmo3D *arrow = (ArrowGizmo3D *)mpr;
+ const int transform_flag = RNA_enum_get(arrow->gizmo.ptr, "transform");
+ const bool constrained = (transform_flag & ED_GIZMO_ARROW_XFORM_FLAG_CONSTRAINED) != 0;
+ const bool inverted = (transform_flag & ED_GIZMO_ARROW_XFORM_FLAG_INVERTED) != 0;
+ gizmo_property_data_update(mpr, &arrow->data, mpr_prop, constrained, inverted);
}
-static void manipulator_arrow_exit(bContext *C, wmManipulator *mpr, const bool cancel)
+static void gizmo_arrow_exit(bContext *C, wmGizmo *mpr, const bool cancel)
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
- ManipulatorCommonData *data = &arrow->data;
- wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
- const bool is_prop_valid = WM_manipulator_target_property_is_valid(mpr_prop);
+ ArrowGizmo3D *arrow = (ArrowGizmo3D *)mpr;
+ GizmoCommonData *data = &arrow->data;
+ wmGizmoProperty *mpr_prop = WM_gizmo_target_property_find(mpr, "offset");
+ const bool is_prop_valid = WM_gizmo_target_property_is_valid(mpr_prop);
if (!cancel) {
/* Assign incase applying the opetration needs an updated offset
* editmesh bisect needs this. */
if (is_prop_valid) {
- data->offset = WM_manipulator_target_property_value_get(mpr, mpr_prop);
+ data->offset = WM_gizmo_target_property_value_get(mpr, mpr_prop);
}
return;
}
- ManipulatorInteraction *inter = mpr->interaction_data;
+ GizmoInteraction *inter = mpr->interaction_data;
if (is_prop_valid) {
- manipulator_property_value_reset(C, mpr, inter, mpr_prop);
+ gizmo_property_value_reset(C, mpr, inter, mpr_prop);
}
data->offset = inter->init_offset;
}
/* -------------------------------------------------------------------- */
-/** \name Arrow Manipulator API
+/** \name Arrow Gizmo API
*
* \{ */
/**
* Define a custom property UI range
*
- * \note Needs to be called before WM_manipulator_target_property_def_rna!
+ * \note Needs to be called before WM_gizmo_target_property_def_rna!
*/
-void ED_manipulator_arrow3d_set_ui_range(wmManipulator *mpr, const float min, const float max)
+void ED_gizmo_arrow3d_set_ui_range(wmGizmo *mpr, const float min, const float max)
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
+ ArrowGizmo3D *arrow = (ArrowGizmo3D *)mpr;
BLI_assert(min < max);
- BLI_assert(!(WM_manipulator_target_property_is_valid(WM_manipulator_target_property_find(mpr, "offset")) &&
- "Make sure this function is called before WM_manipulator_target_property_def_rna"));
+ BLI_assert(!(WM_gizmo_target_property_is_valid(WM_gizmo_target_property_find(mpr, "offset")) &&
+ "Make sure this function is called before WM_gizmo_target_property_def_rna"));
arrow->data.range = max - min;
arrow->data.min = min;
- arrow->data.flag |= MANIPULATOR_CUSTOM_RANGE_SET;
+ arrow->data.flag |= GIZMO_CUSTOM_RANGE_SET;
}
/**
* Define a custom factor for arrow min/max distance
*
- * \note Needs to be called before WM_manipulator_target_property_def_rna!
+ * \note Needs to be called before WM_gizmo_target_property_def_rna!
*/
-void ED_manipulator_arrow3d_set_range_fac(wmManipulator *mpr, const float range_fac)
+void ED_gizmo_arrow3d_set_range_fac(wmGizmo *mpr, const float range_fac)
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
- BLI_assert(!(WM_manipulator_target_property_is_valid(WM_manipulator_target_property_find(mpr, "offset")) &&
- "Make sure this function is called before WM_manipulator_target_property_def_rna"));
+ ArrowGizmo3D *arrow = (ArrowGizmo3D *)mpr;
+ BLI_assert(!(WM_gizmo_target_property_is_valid(WM_gizmo_target_property_find(mpr, "offset")) &&
+ "Make sure this function is called before WM_gizmo_target_property_def_rna"));
arrow->data.range_fac = range_fac;
}
-static void MANIPULATOR_WT_arrow_3d(wmManipulatorType *wt)
+static void GIZMO_WT_arrow_3d(wmGizmoType *wt)
{
/* identifiers */
- wt->idname = "MANIPULATOR_WT_arrow_3d";
+ wt->idname = "GIZMO_WT_arrow_3d";
/* api callbacks */
- wt->draw = manipulator_arrow_draw;
- wt->draw_select = manipulator_arrow_draw_select;
- wt->matrix_basis_get = manipulator_arrow_matrix_basis_get;
- wt->modal = manipulator_arrow_modal;
- wt->setup = manipulator_arrow_setup;
- wt->invoke = manipulator_arrow_invoke;
- wt->property_update = manipulator_arrow_property_update;
- wt->exit = manipulator_arrow_exit;
+ wt->draw = gizmo_arrow_draw;
+ wt->draw_select = gizmo_arrow_draw_select;
+ wt->matrix_basis_get = gizmo_arrow_matrix_basis_get;
+ wt->modal = gizmo_arrow_modal;
+ wt->setup = gizmo_arrow_setup;
+ wt->invoke = gizmo_arrow_invoke;
+ wt->property_update = gizmo_arrow_property_update;
+ wt->exit = gizmo_arrow_exit;
- wt->struct_size = sizeof(ArrowManipulator3D);
+ wt->struct_size = sizeof(ArrowGizmo3D);
/* rna */
static EnumPropertyItem rna_enum_draw_style_items[] = {
- {ED_MANIPULATOR_ARROW_STYLE_NORMAL, "NORMAL", 0, "Normal", ""},
- {ED_MANIPULATOR_ARROW_STYLE_CROSS, "CROSS", 0, "Cross", ""},
- {ED_MANIPULATOR_ARROW_STYLE_BOX, "BOX", 0, "Box", ""},
- {ED_MANIPULATOR_ARROW_STYLE_CONE, "CONE", 0, "Cone", ""},
+ {ED_GIZMO_ARROW_STYLE_NORMAL, "NORMAL", 0, "Normal", ""},
+ {ED_GIZMO_ARROW_STYLE_CROSS, "CROSS", 0, "Cross", ""},
+ {ED_GIZMO_ARROW_STYLE_BOX, "BOX", 0, "Box", ""},
+ {ED_GIZMO_ARROW_STYLE_CONE, "CONE", 0, "Cone", ""},
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem rna_enum_draw_options_items[] = {
- {ED_MANIPULATOR_ARROW_DRAW_FLAG_STEM, "STEM", 0, "Stem", ""},
+ {ED_GIZMO_ARROW_DRAW_FLAG_STEM, "STEM", 0, "Stem", ""},
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem rna_enum_transform_items[] = {
- {ED_MANIPULATOR_ARROW_XFORM_FLAG_INVERTED, "INVERT", 0, "Inverted", ""},
- {ED_MANIPULATOR_ARROW_XFORM_FLAG_CONSTRAINED, "CONSTRAIN", 0, "Constrained", ""},
+ {ED_GIZMO_ARROW_XFORM_FLAG_INVERTED, "INVERT", 0, "Inverted", ""},
+ {ED_GIZMO_ARROW_XFORM_FLAG_CONSTRAINED, "CONSTRAIN", 0, "Constrained", ""},
{0, NULL, 0, NULL, NULL}
};
RNA_def_enum(
wt->srna, "draw_style", rna_enum_draw_style_items,
- ED_MANIPULATOR_ARROW_STYLE_NORMAL,
+ ED_GIZMO_ARROW_STYLE_NORMAL,
"Draw Style", "");
RNA_def_enum_flag(
wt->srna, "draw_options", rna_enum_draw_options_items,
- ED_MANIPULATOR_ARROW_DRAW_FLAG_STEM,
+ ED_GIZMO_ARROW_DRAW_FLAG_STEM,
"Draw Options", "");
RNA_def_enum_flag(
wt->srna, "transform", rna_enum_transform_items,
@@ -481,12 +481,12 @@ static void MANIPULATOR_WT_arrow_3d(wmManipulatorType *wt)
RNA_def_float(wt->srna, "length", 1.0f, 0.0f, FLT_MAX, "Arrow Line Length", "", 0.0f, FLT_MAX);
RNA_def_float_vector(wt->srna, "aspect", 2, NULL, 0, FLT_MAX, "Aspect", "Cone/box style only", 0.0f, FLT_MAX);
- WM_manipulatortype_target_property_def(wt, "offset", PROP_FLOAT, 1);
+ WM_gizmotype_target_property_def(wt, "offset", PROP_FLOAT, 1);
}
-void ED_manipulatortypes_arrow_3d(void)
+void ED_gizmotypes_arrow_3d(void)
{
- WM_manipulatortype_append(MANIPULATOR_WT_arrow_3d);
+ WM_gizmotype_append(GIZMO_WT_arrow_3d);
}
/** \} */