Transform: rename Warp to Bend
authorCampbell Barton <ideasman42@gmail.com>
Wed, 20 Nov 2013 01:14:10 +0000 (12:14 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 20 Nov 2013 01:14:10 +0000 (12:14 +1100)
release/scripts/addons
release/scripts/presets/keyconfig/3dsmax.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/include/ED_transform.h
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c

index 120612c8bd74040dd624f25e359f30a257d180e6..48bdb7b52fe827cbc21d50cce3079223243414bd 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 120612c8bd74040dd624f25e359f30a257d180e6
+Subproject commit 48bdb7b52fe827cbc21d50cce3079223243414bd
index e18624461a2e7920804d3eb1af097bbbf9fcc0df..f484ecd44b58ed415fd3bd12ade18419058ed43e 100644 (file)
@@ -687,7 +687,7 @@ kmi = km.keymap_items.new('transform.translate', 'W', 'PRESS', shift=True)
 kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
 kmi = km.keymap_items.new('transform.rotate', 'E', 'PRESS', shift=True)
 kmi = km.keymap_items.new('transform.resize', 'R', 'PRESS', shift=True)
-kmi = km.keymap_items.new('transform.warp', 'Q', 'PRESS', shift=True)
+kmi = km.keymap_items.new('transform.bend', 'Q', 'PRESS', shift=True)
 kmi = km.keymap_items.new('transform.tosphere', 'S', 'PRESS', shift=True, alt=True)
 kmi = km.keymap_items.new('transform.shear', 'S', 'PRESS', shift=True, ctrl=True, alt=True)
 kmi = km.keymap_items.new('transform.select_orientation', 'SPACE', 'PRESS', alt=True)
index c49fa6768feae2e03b567b9112a62268542404a2..4c316c9426995af2112f8fce0fcc36a7884f4f74 100644 (file)
@@ -179,7 +179,7 @@ class VIEW3D_MT_transform_base(Menu):
 
         layout.operator("transform.tosphere", text="To Sphere")
         layout.operator("transform.shear", text="Shear")
-        layout.operator("transform.warp", text="Warp")
+        layout.operator("transform.bend", text="Bend")
         layout.operator("transform.push_pull", text="Push/Pull")
 
 
index 8ad78630dc726d34bf8c0992a747bc06220abffd..dde1aa30a26fb2e665c0bd1f2218de2f1db22575 100644 (file)
@@ -62,7 +62,7 @@ enum TfmMode {
        TFM_SKIN_RESIZE,
        TFM_TOSPHERE,
        TFM_SHEAR,
-       TFM_WARP,
+       TFM_BEND,
        TFM_SHRINKFATTEN,
        TFM_TILT,
        TFM_TRACKBALL,
index ea5c86b596648b0a3616f4507161f4eba3b8587a..2756685e9f6beee767eaab68ad44d29cea873583 100644 (file)
@@ -111,9 +111,9 @@ static void postInputRotation(TransInfo *t, float values[3]);
 
 
 /* Transform Callbacks */
-static void initWarp(TransInfo *t);
-static eRedrawFlag handleEventWarp(TransInfo *t, const struct wmEvent *event);
-static void Warp(TransInfo *t, const int mval[2]);
+static void initBend(TransInfo *t);
+static eRedrawFlag handleEventBend(TransInfo *t, const struct wmEvent *event);
+static void Bend(TransInfo *t, const int mval[2]);
 
 static void initShear(TransInfo *t);
 static eRedrawFlag handleEventShear(TransInfo *t, const struct wmEvent *event);
@@ -2069,8 +2069,8 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
                case TFM_SHEAR:
                        initShear(t);
                        break;
-               case TFM_WARP:
-                       initWarp(t);
+               case TFM_BEND:
+                       initBend(t);
                        break;
                case TFM_SHRINKFATTEN:
                        initShrinkFatten(t);
@@ -2672,12 +2672,12 @@ static void constraintSizeLim(TransInfo *t, TransData *td)
 
 
 /* -------------------------------------------------------------------- */
-/* Transform (Warp) */
+/* Transform (Bend) */
 
-/** \name Transform Warp
+/** \name Transform Bend
  * \{ */
 
-struct WarpCustomData {
+struct BendCustomData {
        float warp_sta[3];
        float warp_end[3];
 
@@ -2688,16 +2688,16 @@ struct WarpCustomData {
        float warp_init_dist;
 };
 
-static void initWarp(TransInfo *t)
+static void initBend(TransInfo *t)
 {
        const float mval_fl[2] = {UNPACK2(t->mval)};
        const float *curs;
        float tvec[3];
-       struct WarpCustomData *data;
+       struct BendCustomData *data;
        
-       t->mode = TFM_WARP;
-       t->transform = Warp;
-       t->handleEvent = handleEventWarp;
+       t->mode = TFM_BEND;
+       t->transform = Bend;
+       t->handleEvent = handleEventBend;
        
        setInputPostFct(&t->mouse, postInputRotation);
        initMouseInputMode(t, &t->mouse, INPUT_ANGLE_SPRING);
@@ -2740,7 +2740,7 @@ static void initWarp(TransInfo *t)
        t->customData = data;
 }
 
-static eRedrawFlag handleEventWarp(TransInfo *UNUSED(t), const wmEvent *event)
+static eRedrawFlag handleEventBend(TransInfo *UNUSED(t), const wmEvent *event)
 {
        eRedrawFlag status = TREDRAW_NOTHING;
        
@@ -2751,7 +2751,7 @@ static eRedrawFlag handleEventWarp(TransInfo *UNUSED(t), const wmEvent *event)
        return status;
 }
 
-static void Warp(TransInfo *t, const int UNUSED(mval[2]))
+static void Bend(TransInfo *t, const int UNUSED(mval[2]))
 {
        TransData *td = t->data;
        float vec[3];
@@ -2759,7 +2759,7 @@ static void Warp(TransInfo *t, const int UNUSED(mval[2]))
        float warp_end_radius[3];
        int i;
        char str[MAX_INFO_LEN];
-       const struct WarpCustomData *data = t->customData;
+       const struct BendCustomData *data = t->customData;
        const bool is_clamp = (t->flag & T_ALT_TRANSFORM) == 0;
 
        union {
@@ -2767,7 +2767,7 @@ static void Warp(TransInfo *t, const int UNUSED(mval[2]))
                float vector[2];
        } values;
 
-       /* amount of radians for warp */
+       /* amount of radians for bend */
        copy_v2_v2(values.vector, t->values);
 
 #if 0
@@ -2792,7 +2792,7 @@ static void Warp(TransInfo *t, const int UNUSED(mval[2]))
 
                outputNumInput(&(t->num), c);
                
-               BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Warp Angle: %s Radius: %s Alt, Clamp %s"),
+               BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Bend Angle: %s Radius: %s Alt, Clamp %s"),
                             &c[0], &c[NUM_STR_REP_LEN],
                             WM_bool_as_string(is_clamp));
 
@@ -2801,7 +2801,7 @@ static void Warp(TransInfo *t, const int UNUSED(mval[2]))
        }
        else {
                /* default header print */
-               BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Warp Angle: %.3f Radius: %.4f, Alt, Clamp %s"),
+               BLI_snprintf(str, MAX_INFO_LEN, IFACE_("Bend Angle: %.3f Radius: %.4f, Alt, Clamp %s"),
                             RAD2DEGF(values.angle), values.scale * data->warp_init_dist,
                             WM_bool_as_string(is_clamp));
        }
index 422060c48e669a208b700fe70db1ae59aa7a12fc..95b6067f2c4912109d0f9b82a029fe15d19b46d6 100644 (file)
@@ -1137,8 +1137,8 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
                if (v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
                t->around = v3d->around;
                
-               /* warp always uses the cursor */
-               if (t->mode == TFM_WARP) {
+               /* bend always uses the cursor */
+               if (t->mode == TFM_BEND) {
                        t->around = V3D_CURSOR;
                }
 
index 8f31e49bfe98998bac55860bda4fded9f61b145c..106024cd3e2326a531b53198b06a6459337e456d 100644 (file)
@@ -68,7 +68,7 @@ static char OP_TOSPHERE[] = "TRANSFORM_OT_tosphere";
 static char OP_RESIZE[] = "TRANSFORM_OT_resize";
 static char OP_SKIN_RESIZE[] = "TRANSFORM_OT_skin_resize";
 static char OP_SHEAR[] = "TRANSFORM_OT_shear";
-static char OP_WARP[] = "TRANSFORM_OT_warp";
+static char OP_BEND[] = "TRANSFORM_OT_bend";
 static char OP_SHRINK_FATTEN[] = "TRANSFORM_OT_shrink_fatten";
 static char OP_PUSH_PULL[] = "TRANSFORM_OT_push_pull";
 static char OP_TILT[] = "TRANSFORM_OT_tilt";
@@ -86,7 +86,7 @@ static void TRANSFORM_OT_tosphere(struct wmOperatorType *ot);
 static void TRANSFORM_OT_resize(struct wmOperatorType *ot);
 static void TRANSFORM_OT_skin_resize(struct wmOperatorType *ot);
 static void TRANSFORM_OT_shear(struct wmOperatorType *ot);
-static void TRANSFORM_OT_warp(struct wmOperatorType *ot);
+static void TRANSFORM_OT_bend(struct wmOperatorType *ot);
 static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot);
 static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot);
 static void TRANSFORM_OT_tilt(struct wmOperatorType *ot);
@@ -106,7 +106,7 @@ static TransformModeItem transform_modes[] =
        {OP_RESIZE, TFM_RESIZE, TRANSFORM_OT_resize},
        {OP_SKIN_RESIZE, TFM_SKIN_RESIZE, TRANSFORM_OT_skin_resize},
        {OP_SHEAR, TFM_SHEAR, TRANSFORM_OT_shear},
-       {OP_WARP, TFM_WARP, TRANSFORM_OT_warp},
+       {OP_BEND, TFM_BEND, TRANSFORM_OT_bend},
        {OP_SHRINK_FATTEN, TFM_SHRINKFATTEN, TRANSFORM_OT_shrink_fatten},
        {OP_PUSH_PULL, TFM_PUSHPULL, TRANSFORM_OT_push_pull},
        {OP_TILT, TFM_TILT, TRANSFORM_OT_tilt},
@@ -130,7 +130,7 @@ EnumPropertyItem transform_mode_types[] =
        {TFM_SKIN_RESIZE, "SKIN_RESIZE", 0, "Skin Resize", ""},
        {TFM_TOSPHERE, "TOSPHERE", 0, "Tosphere", ""},
        {TFM_SHEAR, "SHEAR", 0, "Shear", ""},
-       {TFM_WARP, "WARP", 0, "Warp", ""},
+       {TFM_BEND, "BEND", 0, "Bend", ""},
        {TFM_SHRINKFATTEN, "SHRINKFATTEN", 0, "Shrinkfatten", ""},
        {TFM_TILT, "TILT", 0, "Tilt", ""},
        {TFM_TRACKBALL, "TRACKBALL", 0, "Trackball", ""},
@@ -693,12 +693,12 @@ static void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
        Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP);
 }
 
-static void TRANSFORM_OT_warp(struct wmOperatorType *ot)
+static void TRANSFORM_OT_bend(struct wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name   = "Warp";
-       ot->description = "Warp selected items around the cursor";
-       ot->idname = OP_WARP;
+       ot->name   = "Bend";
+       ot->description = "Bend selected items between the 3D cursor and the mouse";
+       ot->idname = OP_BEND;
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
 
        /* api callbacks */
@@ -711,7 +711,6 @@ static void TRANSFORM_OT_warp(struct wmOperatorType *ot)
        RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI * 2, M_PI * 2);
 
        Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP);
-       // XXX Warp axis?
 }
 
 static void TRANSFORM_OT_shear(struct wmOperatorType *ot)
@@ -982,7 +981,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac
 
                        WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0);
 
-                       WM_keymap_add_item(keymap, OP_WARP, WKEY, KM_PRESS, KM_SHIFT, 0);
+                       WM_keymap_add_item(keymap, OP_BEND, WKEY, KM_PRESS, KM_SHIFT, 0);
 
                        WM_keymap_add_item(keymap, OP_TOSPHERE, SKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0);