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>2013-05-28 17:01:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-28 17:01:31 +0400
commitdc39ecf0105353d309dd692f74a80b0ae3778091 (patch)
treeecbbe8cc8721c0c16d56b33f49af25190a19df6a /source/blender/editors/transform
parent0559630c7e4cbc9dce4e2998c9b8e52e6b2115f0 (diff)
code cleanup: remove old/unused bmesh bevel transform mode, remove commented character list UI widget and the members these used in 'G' global.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c118
-rw-r--r--source/blender/editors/transform/transform.h4
-rw-r--r--source/blender/editors/transform/transform_ops.c1
3 files changed, 0 insertions, 123 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 3f47e25dee1..68b93fe6560 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2050,9 +2050,6 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
case TFM_MIRROR:
initMirror(t);
break;
- case TFM_BEVEL:
- initBevel(t);
- break;
case TFM_BWEIGHT:
initBevelWeight(t);
break;
@@ -4455,121 +4452,6 @@ int PushPull(TransInfo *t, const int UNUSED(mval[2]))
return 1;
}
-/* ************************** BEVEL **************************** */
-
-void initBevel(TransInfo *t)
-{
- t->transform = Bevel;
- t->handleEvent = handleEventBevel;
-
- initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
-
- t->mode = TFM_BEVEL;
- t->flag |= T_NO_CONSTRAINT;
- t->num.flag |= NUM_NO_NEGATIVE;
-
- t->idx_max = 0;
- t->num.idx_max = 0;
- t->snap[0] = 0.0f;
- t->snap[1] = 0.1f;
- t->snap[2] = t->snap[1] * 0.1f;
-
- t->num.increment = t->snap[1];
-
- /* DON'T KNOW WHY THIS IS NEEDED */
- if (G.editBMesh->imval[0] == 0 && G.editBMesh->imval[1] == 0) {
- /* save the initial mouse co */
- G.editBMesh->imval[0] = t->imval[0];
- G.editBMesh->imval[1] = t->imval[1];
- }
- else {
- /* restore the mouse co from a previous call to initTransform() */
- t->imval[0] = G.editBMesh->imval[0];
- t->imval[1] = G.editBMesh->imval[1];
- }
-}
-
-int handleEventBevel(TransInfo *t, const wmEvent *event)
-{
- if (event->val == KM_PRESS) {
- if (!G.editBMesh) return 0;
-
- switch (event->type) {
- case MIDDLEMOUSE:
- G.editBMesh->options ^= BME_BEVEL_VERT;
- t->state = TRANS_CANCEL;
- return 1;
- //case PADPLUSKEY:
- // G.editBMesh->options ^= BME_BEVEL_RES;
- // G.editBMesh->res += 1;
- // if (G.editBMesh->res > 4) {
- // G.editBMesh->res = 4;
- // }
- // t->state = TRANS_CANCEL;
- // return 1;
- //case PADMINUS:
- // G.editBMesh->options ^= BME_BEVEL_RES;
- // G.editBMesh->res -= 1;
- // if (G.editBMesh->res < 0) {
- // G.editBMesh->res = 0;
- // }
- // t->state = TRANS_CANCEL;
- // return 1;
- default:
- return 0;
- }
- }
- return 0;
-}
-
-int Bevel(TransInfo *t, const int UNUSED(mval[2]))
-{
- float distance, d;
- int i;
- char str[MAX_INFO_LEN];
- const char *mode;
- TransData *td = t->data;
-
- mode = (G.editBMesh->options & BME_BEVEL_VERT) ? IFACE_("verts only") : IFACE_("normal");
- distance = t->values[0] / 4; /* 4 just seemed a nice value to me, nothing special */
-
- distance = fabs(distance);
-
- snapGrid(t, &distance);
-
- applyNumInput(&t->num, &distance);
-
- /* header print for NumInput */
- if (hasNumInput(&t->num)) {
- char c[NUM_STR_REP_LEN];
-
- outputNumInput(&(t->num), c);
-
- BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Bevel - Dist: %s, Mode: %s (MMB to toggle))"), c, mode);
- }
- else {
- /* default header print */
- BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Bevel - Dist: %.4f, Mode: %s (MMB to toggle))"), distance, mode);
- }
-
- if (distance < 0) distance = -distance;
- for (i = 0; i < t->total; i++, td++) {
- if (td->axismtx[1][0] > 0 && distance > td->axismtx[1][0]) {
- d = td->axismtx[1][0];
- }
- else {
- d = distance;
- }
- madd_v3_v3v3fl(td->loc, td->center, td->axismtx[0], (*td->val) * d);
- }
-
- recalcData(t);
-
- ED_area_headerprint(t->sa, str);
-
- return 1;
-}
-
/* ************************** BEVEL WEIGHT *************************** */
void initBevelWeight(TransInfo *t)
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 583a6a47036..987180d4efd 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -531,10 +531,6 @@ int Trackball(TransInfo *t, const int mval[2]);
void initPushPull(TransInfo *t);
int PushPull(TransInfo *t, const int mval[2]);
-void initBevel(TransInfo *t);
-int handleEventBevel(TransInfo *t, const struct wmEvent *event);
-int Bevel(TransInfo *t, const int mval[2]);
-
void initBevelWeight(TransInfo *t);
int BevelWeight(TransInfo *t, const int mval[2]);
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index b6d8507fe8a..148cc638048 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -147,7 +147,6 @@ EnumPropertyItem transform_mode_types[] =
{TFM_TIME_SCALE, "TIME_SCALE", 0, "Time_Scale", ""},
{TFM_TIME_EXTEND, "TIME_EXTEND", 0, "Time_Extend", ""},
{TFM_BAKE_TIME, "BAKE_TIME", 0, "Bake_Time", ""},
- {TFM_BEVEL, "BEVEL", 0, "Bevel", ""},
{TFM_BWEIGHT, "BWEIGHT", 0, "Bweight", ""},
{TFM_ALIGN, "ALIGN", 0, "Align", ""},
{TFM_EDGE_SLIDE, "EDGESLIDE", 0, "Edge Slide", ""},