From 0a90a52442071b8c346b8efade465eff714c37d8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 May 2008 09:50:46 +0000 Subject: * The displist would be uninitialized when nurbs bezieru/v was set and the order wasnt 3 or 4. add a function that checks nurbs can produce a valid line. check_valid_nurb_u/v * when check_valid_nurb_u/v fails, no curve is allocated or drawn. * knotsu/v could be NULL but some functions didn't check for this, make sure this is checked for everywhere. * The interface didnt change check the order when the bezier u/v flag was set, added functions clamp_nurb_order_u/v that takes into accound the number of points and the bezier u/v flag. --- source/blender/blenkernel/BKE_curve.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/blenkernel/BKE_curve.h') diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 60444675047..edb4721de4e 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -84,5 +84,12 @@ void switchdirectionNurb( struct Nurb *nu); float (*curve_getVertexCos(struct Curve *cu, struct ListBase *lb, int *numVerts_r))[3]; void curve_applyVertexCos(struct Curve *cu, struct ListBase *lb, float (*vertexCos)[3]); +/* nurb checks if they can be drawn, also clamp order func */ +int check_valid_nurb_u( struct Nurb *nu); +int check_valid_nurb_v( struct Nurb *nu); + +int clamp_nurb_order_u( struct Nurb *nu); +int clamp_nurb_order_v( struct Nurb *nu); + #endif -- cgit v1.2.3