Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_curve_types.h
| Context not available. | |||||
| char _pad[4]; | char _pad[4]; | ||||
| } BPoint; | } BPoint; | ||||
| typedef struct NurbTrim { | |||||
| struct NurbTrim *next, *prev; | |||||
| ListBase nurb_list; /* A list of Nurb objects that define the trim when concatenated (implicit lines connect discontinuous endpoints) */ | |||||
| short type; /* CU_TRIM_AND (AND), CU_TRIM_SUB (SUB), CU_TRIM_ADD (ADD) */ | |||||
| short flag; /* SELECTED */ | |||||
| short _pad[2]; | |||||
| void *parent_nurb; /* DNA doesn't like forward declarations? */ | |||||
| } NurbTrim; | |||||
| /* A breakpoint is a unique knot with multiplicitly stored explicitly rather | |||||
| * than implicitly. This structure should only ever serve as part of a NurbEditKnot. | |||||
| * It is transient and should never be written to files. | |||||
| */ | |||||
| typedef struct NurbBreakpt { | |||||
| float v[1]; /* So the v translation operator can have a ptr to a float[2] */ | |||||
| float loc; | |||||
| float u[1]; /* So the u translation operator can have a ptr to a float[2] */ | |||||
| short multiplicity; /* Number of times loc is to be repeated in knotsu/knotsv */ | |||||
| short flag; /* per-break flags: SELECT */ | |||||
| } NurbBreakpt; | |||||
| /* In situations where knots are to be edited, the knot arrays (Nurb->knots{u,v}) | |||||
| * are converted into a NurbEditKnot object which conceptually represents them | |||||
| * as an array of breakpoints. After editing, the knots are transferred | |||||
| * back into Nurb->knots{u,v} and the NurbEditKnot is freed. | |||||
| * NurbEditKnot and NurbBreakpt objects should never be written to files. They are | |||||
| * strictly runtime transient structures. | |||||
| */ | |||||
| typedef struct NurbEditKnot { | |||||
| int capu, capv; /* length of breaks{u,v}, multiplicity{u,v}, and flag{u,v} arrays */ | |||||
| int num_breaksu, num_breaksv; /* the set of breakpoints is the set of unique knots */ | |||||
| NurbBreakpt *breaksu, *breaksv; | |||||
| } NurbEditKnot; | |||||
| /** | /** | ||||
| * \note Nurb name is misleading, since it can be used for polygons too, | * \note Nurb name is misleading, since it can be used for polygons too, | ||||
| * also, it should be NURBS (Nurb isn't the singular of Nurbs). | * also, it should be NURBS (Nurb isn't the singular of Nurbs). | ||||
| Context not available. | |||||
| short hide, flag; | short hide, flag; | ||||
| /** Number of points in the U or V directions. */ | /** Number of points in the U or V directions. */ | ||||
| int pntsu, pntsv; | int pntsu, pntsv; | ||||
| char _pad[4]; | |||||
| short flag2; /* CU_SELECTED2, CU_...2 */ | |||||
| short resol_trim; /* deprecated: tessellation res of trim curve (per pt) */ | |||||
| /** Tessellation resolution in the U or V directions. */ | /** Tessellation resolution in the U or V directions. */ | ||||
| short resolu, resolv; | short resolu, resolv; | ||||
| short orderu, orderv; | short orderu, orderv; | ||||
| Context not available. | |||||
| /* only used for dynamically generated Nurbs created from OB_FONT's */ | /* only used for dynamically generated Nurbs created from OB_FONT's */ | ||||
| int charidx; | int charidx; | ||||
| ListBase trims; | |||||
| int UV_verts_count; /* UV mesh is cached */ | |||||
| int UV_tri_count; | |||||
| float *UV_verts; /* 2*UV_verts_count floats */ | |||||
| int *UV_idxs; /* 3*UV_tri_count ints */ | |||||
| NurbEditKnot *editknot; | |||||
| } Nurb; | } Nurb; | ||||
| typedef struct CharInfo { | typedef struct CharInfo { | ||||
| Context not available. | |||||
| * Set #Main.is_memfile_undo_flush_needed when enabling. | * Set #Main.is_memfile_undo_flush_needed when enabling. | ||||
| */ | */ | ||||
| char needs_flush_to_id; | char needs_flush_to_id; | ||||
| char flag; /* EDITNURB_HAS_DRAWN_UV */ | |||||
| } EditNurb; | } EditNurb; | ||||
| Context not available. | |||||
| } Curve; | } Curve; | ||||
| #define CURVE_VFONT_ANY(cu) ((cu)->vfont), ((cu)->vfontb), ((cu)->vfonti), ((cu)->vfontbi) | #define CURVE_VFONT_ANY(cu) ((cu)->vfont), ((cu)->vfontb), ((cu)->vfonti), ((cu)->vfontbi) | ||||
| #define EDITNURB_HAS_DRAWN_UV 1 | |||||
| /* **************** CURVE ********************* */ | /* **************** CURVE ********************* */ | ||||
| Context not available. | |||||
| CU_MAP_TAPER = 1 << 15, | CU_MAP_TAPER = 1 << 15, | ||||
| }; | }; | ||||
| /* flag2 */ | |||||
| #define CU_SELECTED2 1 | |||||
| /* Curve.twist_mode */ | /* Curve.twist_mode */ | ||||
| enum { | enum { | ||||
| CU_TWIST_Z_UP = 0, | CU_TWIST_Z_UP = 0, | ||||
| Context not available. | |||||
| enum { | enum { | ||||
| CU_SMOOTH = 1 << 0, | CU_SMOOTH = 1 << 0, | ||||
| CU_2D = 1 << 3, /* moved from type since 2.4x */ | CU_2D = 1 << 3, /* moved from type since 2.4x */ | ||||
| CU_TRIMMED = 1 << 4, | |||||
| }; | }; | ||||
| /* Nurb.type */ | /* Nurb.type */ | ||||
| Context not available. | |||||
| CU_PRIM_PATH = 0x700, | CU_PRIM_PATH = 0x700, | ||||
| }; | }; | ||||
| /* trim curve type */ | |||||
| enum { | |||||
| CU_TRIM_SUB = 1, | |||||
| CU_TRIM_AND = 2, | |||||
| CU_TRIM_ADD = 3, | |||||
| }; | |||||
| /* Nurb.flagu, Nurb.flagv */ | /* Nurb.flagu, Nurb.flagv */ | ||||
| enum { | enum { | ||||
| CU_NURB_CYCLIC = 1 << 0, | CU_NURB_CYCLIC = 1 << 0, | ||||
| CU_NURB_ENDPOINT = 1 << 1, | CU_NURB_ENDPOINT = 1 << 1, | ||||
| CU_NURB_BEZIER = 1 << 2, | CU_NURB_BEZIER = 1 << 2, | ||||
| CU_NURB_CUSTOMKNOT = 1 << 3, | |||||
| }; | }; | ||||
| #define CU_ACT_NONE -1 | #define CU_ACT_NONE -1 | ||||
| Context not available. | |||||