diff options
m--------- | release/scripts/addons | 0 | ||||
-rw-r--r-- | release/scripts/presets/keyconfig/3dsmax.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_transform.h | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 38 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 4 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 19 |
7 files changed, 33 insertions, 34 deletions
diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 120612c8bd74040dd624f25e359f30a257d180e +Subproject 48bdb7b52fe827cbc21d50cce3079223243414b diff --git a/release/scripts/presets/keyconfig/3dsmax.py b/release/scripts/presets/keyconfig/3dsmax.py index e18624461a2..f484ecd44b5 100644 --- a/release/scripts/presets/keyconfig/3dsmax.py +++ b/release/scripts/presets/keyconfig/3dsmax.py @@ -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) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index c49fa6768fe..4c316c94269 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -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") diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 8ad78630dc7..dde1aa30a26 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -62,7 +62,7 @@ enum TfmMode { TFM_SKIN_RESIZE, TFM_TOSPHERE, TFM_SHEAR, - TFM_WARP, + TFM_BEND, TFM_SHRINKFATTEN, TFM_TILT, TFM_TRACKBALL, diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index ea5c86b5966..2756685e9f6 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -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)); } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 422060c48e6..95b6067f2c4 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -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; } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 8f31e49bfe9..106024cd3e2 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -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); |