diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-02-13 01:12:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-02-13 01:12:21 +0300 |
commit | 763a98f4c0169f7a44b37124b88babcc0df02dc2 (patch) | |
tree | ec74ec033ae78126f746661c12b27dfeff083988 /source/blender/editors/screen | |
parent | cfa511ab9ed32c6c86dc94b0b1ec11f6951112ef (diff) |
2.5: Most curve/surface editmode operators back:
* Hide, Reveal
* Separate, Duplicate, Delete
* Set Weight, Set Radius, Set Spline Type, Set Handle Type, Set Smooth
* Tilt, Clear Tilt
* Smooth, Smooth Radius
* De(select) First, De(select) Last, De(select) All, Select Inverse,
Select Linked, Select Control Point Row, Select Next, Select Previous,
Select More, Select Less, Select Random, Select Every Nth
* Switch Direction, Subdivide, Make Segment, Spin, Extrude, Toggle Cyclic
* Specials Menu
Not working correct yet:
* Add Vertex (ctrl click)
* Add Menu
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 2225be4eda8..04e66995b2e 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -232,11 +232,11 @@ int ED_operator_uvmap(bContext *C) return 0; } -int ED_operator_editcurve(bContext *C) +int ED_operator_editsurfcurve(bContext *C) { Object *obedit= CTX_data_edit_object(C); - if(obedit && obedit->type==OB_CURVE) - return NULL != ((Mesh *)obedit->data)->edit_mesh; + if(obedit && ELEM(obedit->type, OB_CURVE, OB_SURF)) + return NULL != ((Curve *)obedit->data)->editnurb; return 0; // XXX this test was in many tools, still needed? @@ -244,6 +244,22 @@ int ED_operator_editcurve(bContext *C) } +int ED_operator_editcurve(bContext *C) +{ + Object *obedit= CTX_data_edit_object(C); + if(obedit && obedit->type==OB_CURVE) + return NULL != ((Curve *)obedit->data)->editnurb; + return 0; +} + +int ED_operator_editsurf(bContext *C) +{ + Object *obedit= CTX_data_edit_object(C); + if(obedit && obedit->type==OB_SURF) + return NULL != ((Curve *)obedit->data)->editnurb; + return 0; +} + /* *************************** action zone operator ************************** */ /* operator state vars used: |