Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesdna/DNA_curve_types.h')
-rw-r--r--source/blender/makesdna/DNA_curve_types.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index b0f089d670f..fe601eefa32 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -64,7 +64,7 @@ typedef struct Path {
typedef struct BevList {
struct BevList *next, *prev;
int nr, flag;
- short poly, gat;
+ short poly, hole;
} BevList;
/* These two Lines with # tell makesdna this struct can be excluded. */
@@ -75,25 +75,28 @@ typedef struct BevPoint {
short f1, f2;
} BevPoint;
-/* Keyframes on IPO curves and Points on Bezier Curves/Paths are generally BezTriples */
+/* Keyframes on F-Curves (allows code reuse of Bezier eval code) and
+ * Points on Bezier Curves/Paths are generally BezTriples
+ */
/* note: alfa location in struct is abused by Key system */
/* vec in BezTriple looks like this:
vec[0][0]=x location of handle 1
vec[0][1]=y location of handle 1
- vec[0][2]=z location of handle 1 (not used for IpoCurve Points(2d))
+ vec[0][2]=z location of handle 1 (not used for FCurve Points(2d))
vec[1][0]=x location of control point
vec[1][1]=y location of control point
vec[1][2]=z location of control point
vec[2][0]=x location of handle 2
vec[2][1]=y location of handle 2
- vec[2][2]=z location of handle 2 (not used for IpoCurve Points(2d))
+ vec[2][2]=z location of handle 2 (not used for FCurve Points(2d))
*/
typedef struct BezTriple {
float vec[3][3];
float alfa, weight, radius; /* alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering */
short ipo; /* ipo: interpolation mode for segment from this BezTriple to the next */
char h1, h2; /* h1, h2: the handle type of the two handles */
- char f1, f2, f3, hide; /* f1, f2, f3: used for selection status, hide: used to indicate whether BezTriple is hidden */
+ char f1, f2, f3; /* f1, f2, f3: used for selection status */
+ char hide; /* hide: used to indicate whether BezTriple is hidden (3D), type of keyframe (eBezTriple_KeyframeTypes) */
} BezTriple;
/* note; alfa location in struct is abused by Key system */
@@ -142,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 */
@@ -160,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;
@@ -208,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
@@ -222,6 +231,8 @@ typedef struct Curve {
#define CU_RETOPO 1024
#define CU_DS_EXPAND 2048
+#define CU_NO_TWIST 4096
+
/* spacemode */
#define CU_LEFT 0
#define CU_MIDDLE 1
@@ -231,6 +242,7 @@ typedef struct Curve {
/* flag (nurb) */
#define CU_SMOOTH 1
+#define CU_2D 8 /* moved from type since 2.4x */
/* type (nurb) */
#define CU_POLY 0
@@ -238,9 +250,7 @@ typedef struct Curve {
#define CU_BSPLINE 2
#define CU_CARDINAL 3
#define CU_NURBS 4
-#define CU_TYPE 7
-
-#define CU_2D 8
+#define CU_TYPE (CU_POLY|CU_BEZIER|CU_BSPLINE|CU_CARDINAL|CU_NURBS)
/* only for adding */
#define CU_PRIMITIVE 0xF00
@@ -279,6 +289,16 @@ typedef enum eBezTriple_Interpolation {
BEZT_IPO_BEZ, /* bezier interpolation */
} eBezTriple_Interpolation;
+/* types of keyframe (used only for BezTriple->hide when BezTriple is used in F-Curves) */
+typedef enum eBezTriple_KeyframeType {
+ BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */
+ 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 */