From 5a43406e1bad973a8cb32702b4fdb588068a6dcd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Jan 2019 22:19:13 +1100 Subject: Cleanup: move DNA comments before struct members Needed for clang-format in some cases, see: T53211 --- source/blender/makesdna/DNA_curve_types.h | 90 ++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 30 deletions(-) (limited to 'source/blender/makesdna/DNA_curve_types.h') diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 0cf60a98376..4016332467b 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -53,7 +53,8 @@ struct GHash; # # typedef struct PathPoint { - float vec[4]; /* grr, cant get rid of tilt yet */ + /** Grr, cant get rid of tilt yet. */ + float vec[4]; float quat[4]; float radius, weight; } PathPoint; @@ -72,8 +73,10 @@ typedef struct Path { # typedef struct BevPoint { float vec[3], alfa, radius, weight, offset; - float sina, cosa; /* 2D Only */ - float dir[3], tan[3], quat[4]; /* 3D Only */ + /** 2D Only. */ + float sina, cosa; + /** 3D Only. */ + float dir[3], tan[3], quat[4]; short split_tag, dupe_tag; } BevPoint; @@ -109,29 +112,41 @@ typedef struct BevList { */ 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 */ + /** Alfa: tilt in 3D View, weight: used for softbody goal weight, radius: for bevel tapering. */ + float alfa, weight, radius; - char ipo; /* ipo: interpolation mode for segment from this BezTriple to the next */ + /** Ipo: interpolation mode for segment from this BezTriple to the next. */ + char ipo; - char h1, h2; /* h1, h2: the handle type of the two handles */ - char f1, f2, f3; /* f1, f2, f3: used for selection status */ + /** H1, h2: the handle type of the two handles. */ + char h1, h2; + /** F1, f2, f3: used for selection status. */ + char f1, f2, f3; - char hide; /* hide: used to indicate whether BezTriple is hidden (3D), type of keyframe (eBezTriple_KeyframeType) */ + /** Hide: used to indicate whether BezTriple is hidden (3D), type of keyframe (eBezTriple_KeyframeType). */ + char hide; - char easing; /* easing: easing type for interpolation mode (eBezTriple_Easing) */ - float back; /* BEZT_IPO_BACK */ - float amplitude, period; /* BEZT_IPO_ELASTIC */ + /** Easing: easing type for interpolation mode (eBezTriple_Easing). */ + char easing; + /** BEZT_IPO_BACK. */ + float back; + /** BEZT_IPO_ELASTIC. */ + float amplitude, period; - char f5; /* f5: used for auto handle to distinguish between normal handle and exception (extrema) */ + /** F5: used for auto handle to distinguish between normal handle and exception (extrema). */ + char f5; char pad[3]; } BezTriple; /* note; alfa location in struct is abused by Key system */ typedef struct BPoint { float vec[4]; - float alfa, weight; /* alfa: tilt in 3D View, weight: used for softbody goal weight */ - short f1, hide; /* f1: selection status, hide: is point hidden or not */ - float radius, pad; /* user-set radius per point for beveling etc */ + /** Alfa: tilt in 3D View, weight: used for softbody goal weight. */ + float alfa, weight; + /** F1: selection status, hide: is point hidden or not. */ + short f1, hide; + /** User-set radius per point for beveling etc. */ + float radius, pad; } BPoint; /** @@ -139,13 +154,17 @@ typedef struct BPoint { * also, it should be NURBS (Nurb isn't the singular of Nurbs). */ typedef struct Nurb { - struct Nurb *next, *prev; /* multiple nurbs per curve object are allowed */ + /** Multiple nurbs per curve object are allowed. */ + struct Nurb *next, *prev; short type; - short mat_nr; /* index into material list */ + /** Index into material list. */ + short mat_nr; short hide, flag; - int pntsu, pntsv; /* number of points in the U or V directions */ + /** Number of points in the U or V directions. */ + int pntsu, pntsv; short pad[2]; - short resolu, resolv; /* tessellation resolution in the U or V directions */ + /** Tessellation resolution in the U or V directions. */ + short resolu, resolv; short orderu, orderv; short flagu, flagv; @@ -153,7 +172,8 @@ typedef struct Nurb { BPoint *bp; BezTriple *bezt; - short tilt_interp; /* KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE */ + /** KEY_LINEAR, KEY_CARDINAL, KEY_BSPLINE. */ + short tilt_interp; short radius_interp; /* only used for dynamically generated Nurbs created from OB_FONT's */ @@ -162,7 +182,8 @@ typedef struct Nurb { typedef struct CharInfo { short kern; - short mat_nr; /* index start at 1, unlike mesh & nurbs */ + /** Index start at 1, unlike mesh & nurbs. */ + short mat_nr; char flag; char pad; short pad2; @@ -187,16 +208,20 @@ typedef struct EditNurb { typedef struct Curve { ID id; - struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ + /** Animation data (must be immediately after id for utilities to use it). */ + struct AnimData *adt; struct BoundBox *bb; - ListBase nurb; /* actual data, called splines in rna */ + /** Actual data, called splines in rna. */ + ListBase nurb; - EditNurb *editnurb; /* edited data, not in file, use pointer so we can check for it */ + /** Edited data, not in file, use pointer so we can check for it. */ + EditNurb *editnurb; struct Object *bevobj, *taperobj, *textoncurve; - struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ + /** Old animation system, deprecated for 2.5. */ + struct Ipo *ipo DNA_DEPRECATED; struct Key *key; struct Material **mat; @@ -205,9 +230,11 @@ typedef struct Curve { float size[3]; float rot[3]; - short type; /* creation-time type of curve datablock */ + /** Creation-time type of curve datablock. */ + short type; - short texflag; /* keep a short because of BKE_object_obdata_texspace_get() */ + /** Keep a short because of BKE_object_obdata_texspace_get(). */ + short texflag; short drawflag, twist_mode; float twist_smooth, smallcaps_scale; @@ -241,8 +268,10 @@ typedef struct Curve { int selstart, selend; /* text data */ - int len_wchar; /* number of characters (strinfo) */ - int len; /* number of bytes (str - utf8) */ + /** Number of characters (strinfo). */ + int len_wchar; + /** Number of bytes (str - utf8). */ + int len; char *str; struct EditFont *editfont; @@ -260,7 +289,8 @@ typedef struct Curve { /* font part end */ - float ctime; /* current evaltime - for use by Objects parented to curves */ + /** Current evaltime - for use by Objects parented to curves. */ + float ctime; float bevfac1, bevfac2; char bevfac1_mapping, bevfac2_mapping; -- cgit v1.2.3