diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-08 11:35:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-08 11:35:07 +0400 |
commit | 1d0a567023d89b4e397800eeb164512b40336184 (patch) | |
tree | f74e408485e26ad12428ab69d7a73621e59583c2 /source/blender/editors/space_view3d/view3d_select.c | |
parent | fab4bf0816834744664858cdcca96792a6225ca3 (diff) |
Curve/Surface Editing
- rename "Nurb" to "Spline" in RNA, eg. bpy.data.curves[0].splines[2].type == 'NURBS'
from a user perspective spline is a more generic term while Nurb is misleading when used for beziers and poly lines.
- added curve.active_spline property so the python UI can display the last selected curve.
- set the active spline when entering editmode (uses first selected spline)
- added back Hide Handles as a curve property (removed the global flag), access from the view panel in editmode.
- added hide normal option for curve, normal size access for curve and mesh display.
- changing orderU/V, endpoints, cyclic, bezierU/V now work in editmode and calls update functions.
- entering editmode was crashing with text objects
- curve.switch_direction() crashed (own fault from last commit)
- Tkey for tilt was overridden by Toolbar, made Tilt Ctrl+T.
- OBJECT_OT_mode_set check for compatible modes before running - so curves dont try go into paint mode with V key for eg.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 42954e09060..a7696d9fe31 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -549,13 +549,15 @@ static void do_lasso_select_mesh_uv(short mcords[][2], short moves, short select static void do_lasso_select_curve__doSelect(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y) { - struct { short (*mcords)[2]; short moves; short select; } *data = userData; - + struct { ViewContext vc; short (*mcords)[2]; short moves; short select; } *data = userData; + if (lasso_inside(data->mcords, data->moves, x, y)) { if (bp) { bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT); } else { - if (G.f & G_HIDDENHANDLES) { + Curve *cu= data->vc.obedit->data; + + if (cu->drawflag & CU_HIDE_HANDLES) { /* can only be beztindex==0 here since handles are hidden */ bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT); } else { @@ -573,9 +575,10 @@ static void do_lasso_select_curve__doSelect(void *userData, Nurb *nu, BPoint *bp static void do_lasso_select_curve(ViewContext *vc, short mcords[][2], short moves, short select) { - struct { short (*mcords)[2]; short moves; short select; } data; + struct { ViewContext vc; short (*mcords)[2]; short moves; short select; } data; /* set vc->editnurb */ + data.vc = *vc; data.mcords = mcords; data.moves = moves; data.select = select; @@ -1196,7 +1199,9 @@ static void do_nurbs_box_select__doSelect(void *userData, Nurb *nu, BPoint *bp, if (bp) { bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT); } else { - if (G.f & G_HIDDENHANDLES) { + Curve *cu= data->vc.obedit->data; + + if (cu->drawflag & CU_HIDE_HANDLES) { /* can only be beztindex==0 here since handles are hidden */ bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT); } else { @@ -1215,7 +1220,7 @@ static void do_nurbs_box_select(ViewContext *vc, rcti *rect, int select) { struct { ViewContext vc; rcti *rect; int select; } data; - data.vc= *vc; + data.vc = *vc; data.rect = rect; data.select = select; |