diff options
Diffstat (limited to 'source/blender/makesdna/DNA_curves_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_curves_types.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_curves_types.h b/source/blender/makesdna/DNA_curves_types.h index bb53dbafdc8..2388f04cc39 100644 --- a/source/blender/makesdna/DNA_curves_types.h +++ b/source/blender/makesdna/DNA_curves_types.h @@ -9,6 +9,8 @@ #include "DNA_ID.h" #include "DNA_customdata_types.h" +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif @@ -87,6 +89,9 @@ typedef struct CurvesGeometry { * this array is allocated with a length one larger than the number of curves. This is allowed * to be null when there are no curves. * + * Every curve offset must be at least one larger than the previous. + * In other words, every curve must have at least one point. + * * \note This is *not* stored in #CustomData because its size is one larger than #curve_data. */ int *curve_offsets; @@ -105,11 +110,11 @@ typedef struct CurvesGeometry { /** * The total number of control points in all curves. */ - int point_size; + int point_num; /** * The number of curves in the data-block. */ - int curve_size; + int curve_num; /** * Runtime data for curves, stored as a pointer to allow defining this as a C++ class. @@ -130,7 +135,13 @@ typedef struct Curves { /* Materials. */ struct Material **mat; short totcol; - short _pad2[3]; + + /** + * User-defined symmetry flag (#eCurvesSymmetryType) that causes editing operations to maintain + * symmetrical geometry. + */ + char symmetry; + char _pad2[5]; /** * Used as base mesh when curves represent e.g. hair or fur. This surface is used in edit modes. @@ -150,6 +161,14 @@ enum { HA_DS_EXPAND = (1 << 0), }; +/** #Curves.symmetry */ +typedef enum eCurvesSymmetryType { + CURVES_SYMMETRY_X = 1 << 0, + CURVES_SYMMETRY_Y = 1 << 1, + CURVES_SYMMETRY_Z = 1 << 2, +} eCurvesSymmetryType; +ENUM_OPERATORS(eCurvesSymmetryType, CURVES_SYMMETRY_Z) + /* Only one material supported currently. */ #define CURVES_MATERIAL_NR 1 |