diff options
author | Peter Klimenko <peterklimk@outlook.com> | 2020-07-31 11:45:15 +0300 |
---|---|---|
committer | Peter Klimenko <peterklimk@outlook.com> | 2020-07-31 11:45:15 +0300 |
commit | 97a4a8d0fb7fd9ac34f9f5d4d5a0689c01235e14 (patch) | |
tree | fc9746d2210eda08be9d44ae67d5e58d64b48b40 /source/blender/makesdna/DNA_curveprofile_types.h | |
parent | 4a7c203e9ecc7c5b0370afc0fdd6bcc183dc00df (diff) | |
parent | f3e8326453ae856d7914e45e832a2ed80aa9a9b9 (diff) |
merge
Diffstat (limited to 'source/blender/makesdna/DNA_curveprofile_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_curveprofile_types.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_curveprofile_types.h b/source/blender/makesdna/DNA_curveprofile_types.h index 63e1049b636..7af8c3cf3ca 100644 --- a/source/blender/makesdna/DNA_curveprofile_types.h +++ b/source/blender/makesdna/DNA_curveprofile_types.h @@ -31,7 +31,7 @@ /** Number of table points per control point. */ #define PROF_RESOL 16 /** Dynamic size of widget's high resolution table. Input should be profile->totpoint. */ -#define PROF_N_TABLE(n_pts) min_ii(PROF_TABLE_MAX, (((n_pts - 1)) * PROF_RESOL) + 1) +#define PROF_TABLE_LEN(n_pts) min_ii(PROF_TABLE_MAX, (((n_pts - 1)) * PROF_RESOL) + 1) /** * Each control point that makes up the profile. @@ -43,13 +43,22 @@ typedef struct CurveProfilePoint { float x, y; /** Flag selection state and others. */ short flag; - /** Flags for both handle's type (eBezTriple_Handle). */ + /** Flags for both handle's type (eBezTriple_Handle auto, vect, free, and aligned supported). */ char h1, h2; + /** Handle locations, keep together. + * \note For now the two handle types are set to the same type in RNA. */ + float h1_loc[2]; + float h2_loc[2]; + char _pad[4]; + /** Runtime pointer to the point's profile for updating the curve with no direct reference. */ + struct CurveProfile *profile; } CurveProfilePoint; /** #CurveProfilePoint.flag */ enum { PROF_SELECT = (1 << 0), + PROF_H1_SELECT = (1 << 1), + PROF_H2_SELECT = (1 << 2), }; /** Defines a profile. */ @@ -76,10 +85,11 @@ typedef struct CurveProfile { /** #CurveProfile.flag */ enum { - PROF_USE_CLIP = (1 << 0), /* Keep control points inside bounding rectangle. */ - /* PROF_SYMMETRY_MODE = (1 << 1), */ /* Unused for now. */ - PROF_SAMPLE_STRAIGHT_EDGES = (1 << 2), /* Sample extra points on straight edges. */ - PROF_SAMPLE_EVEN_LENGTHS = (1 << 3), /* Put segments evenly spaced along the path. */ + PROF_USE_CLIP = (1 << 0), /* Keep control points inside bounding rectangle. */ + /* PROF_SYMMETRY_MODE = (1 << 1), Unused for now. */ + PROF_SAMPLE_STRAIGHT_EDGES = (1 << 2), /* Sample extra points on straight edges. */ + PROF_SAMPLE_EVEN_LENGTHS = (1 << 3), /* Put segments evenly spaced along the path. */ + PROF_DIRTY_PRESET = (1 << 4), /* Marks when the dynamic preset has been changed. */ }; typedef enum eCurveProfilePresets { |