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-04-20 16:59:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-20 16:59:42 +0300
commitb95df9957d9217a7b850b6311ff6d569dbb9111b (patch)
treecddb9b92167341abdacbb3c5d90c51a12fd86ba8 /source/blender/editors/space_view3d
parent8ec25e5dccd21e25ea11336b88e14306ed2f77a0 (diff)
UI: move manipulator to tool-system
Current manipulator now follows active tool.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c46
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h1
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c1
5 files changed, 1 insertions, 53 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index bb521a1a3d9..a87154ea049 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -343,7 +343,6 @@ static SpaceLink *view3d_new(const bContext *C)
v3d->far = 1000.0f;
v3d->twflag |= U.manipulator_flag & V3D_MANIPULATOR_DRAW;
- v3d->twtype = V3D_MANIP_TRANSLATE;
v3d->around = V3D_AROUND_CENTER_MEAN;
scene->orientation_index_custom = -1;
@@ -707,7 +706,6 @@ static void view3d_widgets(void)
wmManipulatorMapType *mmap_type = WM_manipulatormaptype_ensure(
&(const struct wmManipulatorMapType_Params){SPACE_VIEW3D, RGN_TYPE_WINDOW});
- WM_manipulatorgrouptype_append_and_link(mmap_type, TRANSFORM_WGT_manipulator);
WM_manipulatorgrouptype_append_and_link(mmap_type, VIEW3D_WGT_lamp_spot);
WM_manipulatorgrouptype_append_and_link(mmap_type, VIEW3D_WGT_lamp_area);
WM_manipulatorgrouptype_append_and_link(mmap_type, VIEW3D_WGT_lamp_target);
@@ -717,6 +715,7 @@ static void view3d_widgets(void)
WM_manipulatorgrouptype_append_and_link(mmap_type, VIEW3D_WGT_empty_image);
WM_manipulatorgrouptype_append_and_link(mmap_type, VIEW3D_WGT_armature_spline);
+ WM_manipulatorgrouptype_append(TRANSFORM_WGT_manipulator);
WM_manipulatorgrouptype_append(VIEW3D_WGT_xform_cage);
WM_manipulatorgrouptype_append(VIEW3D_WGT_ruler);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 858a4a1dfb6..f80d4a3b4b4 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -4633,52 +4633,6 @@ void VIEW3D_OT_cursor3d(wmOperatorType *ot)
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Enable Transform Manipulator Operator
- * \{ */
-
-static int enable_manipulator_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
-{
- View3D *v3d = CTX_wm_view3d(C);
-
- v3d->twtype = 0;
-
- if (RNA_boolean_get(op->ptr, "translate"))
- v3d->twtype |= V3D_MANIP_TRANSLATE;
- if (RNA_boolean_get(op->ptr, "rotate"))
- v3d->twtype |= V3D_MANIP_ROTATE;
- if (RNA_boolean_get(op->ptr, "scale"))
- v3d->twtype |= V3D_MANIP_SCALE;
-
- WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
-
- return OPERATOR_FINISHED;
-}
-
-void VIEW3D_OT_enable_manipulator(wmOperatorType *ot)
-{
- PropertyRNA *prop;
-
- /* identifiers */
- ot->name = "Enable 3D Manipulator";
- ot->description = "Enable the transform manipulator for use";
- ot->idname = "VIEW3D_OT_enable_manipulator";
-
- /* api callbacks */
- ot->invoke = enable_manipulator_invoke;
- ot->poll = ED_operator_view3d_active;
-
- /* properties */
- prop = RNA_def_boolean(ot->srna, "translate", 0, "Translate", "Enable the translate manipulator");
- RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- prop = RNA_def_boolean(ot->srna, "rotate", 0, "Rotate", "Enable the rotate manipulator");
- RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- prop = RNA_def_boolean(ot->srna, "scale", 0, "Scale", "Enable the scale manipulator");
- RNA_def_property_flag(prop, PROP_SKIP_SAVE);
-}
-
-/** \} */
-
-/* -------------------------------------------------------------------- */
/** \name Toggle Render Shading Operator
* \{ */
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 0aa9a1700c3..6038a53f8a2 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -336,9 +336,6 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
/* Transform widget / manipulators */
row = uiLayoutRow(layout, true);
uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
- if (v3d->twflag & V3D_MANIPULATOR_DRAW) {
- uiItemR(row, &v3dptr, "transform_manipulators", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
- }
uiItemR(row, &sceneptr, "transform_orientation", 0, "", ICON_NONE);
}
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 58bf05299ea..7e0dc20203d 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -99,7 +99,6 @@ void VIEW3D_OT_view_orbit(struct wmOperatorType *ot);
void VIEW3D_OT_view_roll(struct wmOperatorType *ot);
void VIEW3D_OT_clip_border(struct wmOperatorType *ot);
void VIEW3D_OT_cursor3d(struct wmOperatorType *ot);
-void VIEW3D_OT_enable_manipulator(struct wmOperatorType *ot);
void VIEW3D_OT_render_border(struct wmOperatorType *ot);
void VIEW3D_OT_clear_render_border(struct wmOperatorType *ot);
void VIEW3D_OT_zoom_border(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 0274ddd82fc..2e0ca07f601 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -196,7 +196,6 @@ void view3d_operatortypes(void)
WM_operatortype_append(VIEW3D_OT_render_border);
WM_operatortype_append(VIEW3D_OT_clear_render_border);
WM_operatortype_append(VIEW3D_OT_zoom_border);
- WM_operatortype_append(VIEW3D_OT_enable_manipulator);
WM_operatortype_append(VIEW3D_OT_cursor3d);
WM_operatortype_append(VIEW3D_OT_select_lasso);
WM_operatortype_append(VIEW3D_OT_select_menu);