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-05-12 22:56:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-12 23:04:45 +0300
commit1422c0650c951f21bee2555e4e7f03bb8c64cace (patch)
tree372c5500708c4a573bcacf09eb09bac4b555dd04 /source/blender/editors/space_view3d
parente0a561be1f83e94ea976166cf4ff6d5ecd16f990 (diff)
UI: move pivot to the topbar
Pivot variables are now stored in scene toolsettings.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c6
3 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 4014874a5b9..d6413e8bdfb 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -336,7 +336,6 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
v3d->far = 1000.0f;
v3d->twflag |= U.manipulator_flag & V3D_MANIPULATOR_DRAW;
- v3d->around = V3D_AROUND_CENTER_MEAN;
v3d->bundle_size = 0.2f;
v3d->bundle_drawtype = OB_PLAINAXES;
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 7ae65f6db87..e7f6cf36476 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -328,7 +328,6 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
Object *obedit = CTX_data_edit_object(C);
bGPdata *gpd = CTX_data_gpencil_data(C);
uiBlock *block;
- uiLayout *row;
bool is_paint = (
ob && !(gpd && (gpd->flag & GP_DATA_STROKE_EDITMODE)) &&
ELEM(ob->mode,
@@ -344,11 +343,14 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
/* other buttons: */
UI_block_emboss_set(block, UI_EMBOSS);
- row = uiLayoutRow(layout, true);
+ /* moved to topbar */
+#if 0
+ uiLayout *row = uiLayoutRow(layout, true);
uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
if (!ob || ELEM(ob->mode, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_WEIGHT_PAINT)) {
uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
+#endif
if (obedit == NULL && is_paint) {
/* Currently Python calls this directly. */
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index f177a88240c..95ab30d3352 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -222,7 +222,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global
int a;
if (use_offset) {
- if ((v3d && v3d->around == V3D_AROUND_ACTIVE) &&
+ if ((v3d && scene->toolsettings->transform_pivot_point == V3D_AROUND_ACTIVE) &&
snap_calc_active_center(C, true, center_global))
{
/* pass */
@@ -582,7 +582,7 @@ static bool snap_curs_to_sel_ex(bContext *C, float cursor[3])
minmax_v3v3_v3(min, max, vec);
}
- if (v3d->around == V3D_AROUND_CENTER_MEAN) {
+ if (scene->toolsettings->transform_pivot_point == V3D_AROUND_CENTER_MEAN) {
mul_v3_fl(centroid, 1.0f / (float)tvs.transverts_tot);
copy_v3_v3(cursor, centroid);
}
@@ -634,7 +634,7 @@ static bool snap_curs_to_sel_ex(bContext *C, float cursor[3])
return false;
}
- if (v3d->around == V3D_AROUND_CENTER_MEAN) {
+ if (scene->toolsettings->transform_pivot_point == V3D_AROUND_CENTER_MEAN) {
mul_v3_fl(centroid, 1.0f / (float)count);
copy_v3_v3(cursor, centroid);
}