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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-01 15:00:08 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-01 15:00:08 +0400
commit4b48a5a497136e6839474a7089e9674fe31b1fc9 (patch)
tree3fbe5564d6e53dbf23686b1c5d580c1cb43629f6 /source/blender
parentdd8a575c22db8b6e1a78610115cf7e369f26ae0c (diff)
Fix #29101: 2D Tilt on Bezier Curve Bug?
Changing tilt for 2D curves doesn't really hurt, just makes things not so clear tosee what's going on because you're changing value which isn't used at all for 2D curves. Disallwo to run TRANSFORM_OT_tilt operator for 2D curves. Also made a correct fix for incorrect shortcut for tilt in 3D viewport toolbar, it was really confusing to have almost the same operators (TRANSFORM_OT_tilt and TRANSFORM_OT_transform with mode=tilt) in keymap. Better to use tilt operator in toolbar.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/curve/curve_ops.c1
-rw-r--r--source/blender/editors/include/ED_screen.h1
-rw-r--r--source/blender/editors/screen/screen_ops.c11
-rw-r--r--source/blender/editors/transform/transform_ops.c2
4 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index be6b322e6b4..95f3bb55ba5 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -223,7 +223,6 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CURVE_OT_tilt_clear", TKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "TRANSFORM_OT_tilt", TKEY, KM_PRESS, KM_CTRL, 0);
- RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", TKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", TFM_TILT);
RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", TFM_CURVE_SHRINKFATTEN);
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index f92ee724f6f..05537004927 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -159,6 +159,7 @@ int ED_operator_editmesh_view3d(struct bContext *C);
int ED_operator_editmesh_region_view3d(struct bContext *C);
int ED_operator_editarmature(struct bContext *C);
int ED_operator_editcurve(struct bContext *C);
+int ED_operator_editcurve_3d(struct bContext *C);
int ED_operator_editsurf(struct bContext *C);
int ED_operator_editsurfcurve(struct bContext *C);
int ED_operator_editsurfcurve_region_view3d(struct bContext *C);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 0a7e3a2763a..171adc8d89a 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -406,6 +406,17 @@ int ED_operator_editcurve(bContext *C)
return 0;
}
+int ED_operator_editcurve_3d(bContext *C)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ if(obedit && obedit->type==OB_CURVE) {
+ Curve *cu= (Curve *)obedit->data;
+
+ return (cu->flag&CU_3D) && (NULL != cu->editnurb);
+ }
+ return 0;
+}
+
int ED_operator_editsurf(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 2d3c1d80d8d..f926f442830 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -610,7 +610,7 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
ot->exec = transform_exec;
ot->modal = transform_modal;
ot->cancel = transform_cancel;
- ot->poll = ED_operator_editcurve;
+ ot->poll = ED_operator_editcurve_3d;
RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2);