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/makesdna/DNA_curve_types.h | |
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/makesdna/DNA_curve_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_curve_types.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 8cf9fbbaf40..fe601eefa32 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -145,7 +145,7 @@ typedef struct Curve { struct BoundBox *bb; - ListBase nurb; /* actual data */ + ListBase nurb; /* actual data, called splines in rna */ ListBase disp; ListBase *editnurb; /* edited data, not in file, use pointer so we can check for it */ @@ -163,7 +163,9 @@ typedef struct Curve { float size[3]; float rot[3]; - int texflag; + int texflag; /* keep an int because of give_obdata_texspace() */ + + short drawflag, pad[3]; short pathlen, totcol; short flag, bevresol; @@ -211,6 +213,10 @@ typedef struct Curve { /* texflag */ #define CU_AUTOSPACE 1 +/* drawflag */ +#define CU_HIDE_HANDLES (1 << 0) +#define CU_HIDE_NORMALS (1 << 1) + /* flag */ #define CU_3D 1 #define CU_FRONT 2 @@ -289,6 +295,10 @@ typedef enum eBezTriple_KeyframeType { BEZT_KEYTYPE_BREAKDOWN, /* 'breakdown' keyframe */ } eBezTriple_KeyframeType; +/* checks if the given BezTriple is selected */ +#define BEZSELECTED(bezt) (((bezt)->f2 & SELECT) || ((bezt)->f1 & SELECT) || ((bezt)->f3 & SELECT)) +#define BEZSELECTED_HIDDENHANDLES(cu, bezt) (((cu)->drawflag & CU_HIDE_HANDLES) ? (bezt)->f2 & SELECT : BEZSELECTED(bezt)) + /* *************** CHARINFO **************** */ /* flag */ |