diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-14 15:26:45 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-14 15:26:45 +0300 |
commit | ea2d6fe0d082b9069adfd72b704560937df3d855 (patch) | |
tree | df06dc078d4852c91b988e2d91c2e2808fb86491 /source/blender/editors/space_view3d | |
parent | 07e85b265de672a4018cdefe14082576d92a763c (diff) |
2.5
Another one back: editcurve.c
- removed global editNurb everywhere
(cu->editnurb now has listbase with edit data)
- also added 'active bpoint' and 'active nurb' in
Curve struct
- editmode in/out works, mouse/border select works
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 0044002d078..11a6014d03d 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -114,8 +114,6 @@ /* pretty stupid */ -/* editcurve.c */ -extern ListBase editNurb; /* editmball.c */ extern ListBase editelems; @@ -1301,6 +1299,7 @@ void mesh_foreachScreenFace(ViewContext *vc, void (*func)(void *userData, EditFa void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y), void *userData) { + Curve *cu= vc->obedit->data; float pmat[4][4], vmat[4][4]; short s[2]; Nurb *nu; @@ -1308,7 +1307,7 @@ void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb view3d_get_object_project_mat(vc->v3d, vc->obedit, pmat, vmat); - for (nu= editNurb.first; nu; nu=nu->next) { + for (nu= cu->editnurb->first; nu; nu=nu->next) { if((nu->type & 7)==CU_BEZIER) { for (i=0; i<nu->pntsu; i++) { BezTriple *bezt = &nu->bezt[i]; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 42668c1e77d..c862562dcff 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -3426,7 +3426,7 @@ static void do_view3d_edit_curvemenu(bContext *C, void *arg, int event) switch(event) { case 0: /* Undo Editing */ - remake_editNurb(); + remake_editNurb(ob); break; case 1: /* transformation properties */ // XXX mainqenter(NKEY, 1); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 11f9ad9a9b4..3da65e9edb2 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -75,6 +75,7 @@ #include "RNA_define.h" #include "ED_armature.h" +#include "ED_curve.h" #include "ED_mesh.h" #include "ED_object.h" #include "ED_screen.h" @@ -1543,6 +1544,8 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) mouse_armature(C, mval, extend); else if(obedit->type==OB_LATTICE) mouse_lattice(C, mval, extend); + else if(ELEM(obedit->type, OB_CURVE, OB_SURF)) + mouse_nurb(C, mval, extend); } else |