From 4a328a76895c4f03b528b3c7e251475e76c68351 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Jul 2015 23:24:16 +1000 Subject: EditCurve: move selection into own file --- source/blender/editors/curve/curve_intern.h | 50 +++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 13 deletions(-) (limited to 'source/blender/editors/curve/curve_intern.h') diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h index 579f149ea8b..bb0abf44744 100644 --- a/source/blender/editors/curve/curve_intern.h +++ b/source/blender/editors/curve/curve_intern.h @@ -37,6 +37,7 @@ struct ListBase; struct EditNurb; struct Object; struct wmOperatorType; +struct ViewContext; /* editfont.c */ enum { DEL_ALL, DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_SELECTION, DEL_NEXT_SEL, DEL_PREV_SEL }; @@ -44,6 +45,25 @@ enum { CASE_LOWER, CASE_UPPER }; enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD, PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE }; +typedef enum eVisible_Types { + HIDDEN = true, + VISIBLE = false, +} eVisible_Types; + +typedef enum eEndPoint_Types { + FIRST = true, + LAST = false, +} eEndPoint_Types; + +typedef enum eCurveElem_Types { + CURVE_VERTEX = 0, + CURVE_SEGMENT, +} eCurveElem_Types; + +/* internal select utils */ +bool select_beztriple(BezTriple *bezt, bool selstatus, short flag, eVisible_Types hidden); +bool select_bpoint(BPoint *bp, bool selstatus, short flag, bool hidden); + void FONT_OT_text_insert(struct wmOperatorType *ot); void FONT_OT_line_break(struct wmOperatorType *ot); void FONT_OT_insert_lorem(struct wmOperatorType *ot); @@ -98,19 +118,6 @@ void CURVE_OT_smooth_weight(struct wmOperatorType *ot); void CURVE_OT_smooth_radius(struct wmOperatorType *ot); void CURVE_OT_smooth_tilt(struct wmOperatorType *ot); -void CURVE_OT_de_select_first(struct wmOperatorType *ot); -void CURVE_OT_de_select_last(struct wmOperatorType *ot); -void CURVE_OT_select_all(struct wmOperatorType *ot); -void CURVE_OT_select_linked(struct wmOperatorType *ot); -void CURVE_OT_select_linked_pick(struct wmOperatorType *ot); -void CURVE_OT_select_row(struct wmOperatorType *ot); -void CURVE_OT_select_next(struct wmOperatorType *ot); -void CURVE_OT_select_previous(struct wmOperatorType *ot); -void CURVE_OT_select_more(struct wmOperatorType *ot); -void CURVE_OT_select_less(struct wmOperatorType *ot); -void CURVE_OT_select_random(struct wmOperatorType *ot); -void CURVE_OT_select_nth(struct wmOperatorType *ot); - void CURVE_OT_switch_direction(struct wmOperatorType *ot); void CURVE_OT_subdivide(struct wmOperatorType *ot); void CURVE_OT_make_segment(struct wmOperatorType *ot); @@ -121,11 +128,28 @@ void CURVE_OT_cyclic_toggle(struct wmOperatorType *ot); void CURVE_OT_match_texture_space(struct wmOperatorType *ot); +bool ED_curve_pick_vert( + struct ViewContext *vc, short sel, const int mval[2], + struct Nurb **r_nurb, struct BezTriple **r_bezt, struct BPoint **r_bp, short *r_handle); + /* helper functions */ void ed_editnurb_translate_flag(struct ListBase *editnurb, short flag, const float vec[3]); bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, short flag); bool ed_editnurb_spin(float viewmat[4][4], struct Object *obedit, const float axis[3], const float cent[3]); +/* editcurve_select.c */ +void CURVE_OT_de_select_first(struct wmOperatorType *ot); +void CURVE_OT_de_select_last(struct wmOperatorType *ot); +void CURVE_OT_select_all(struct wmOperatorType *ot); +void CURVE_OT_select_linked(struct wmOperatorType *ot); +void CURVE_OT_select_linked_pick(struct wmOperatorType *ot); +void CURVE_OT_select_row(struct wmOperatorType *ot); +void CURVE_OT_select_next(struct wmOperatorType *ot); +void CURVE_OT_select_previous(struct wmOperatorType *ot); +void CURVE_OT_select_more(struct wmOperatorType *ot); +void CURVE_OT_select_less(struct wmOperatorType *ot); +void CURVE_OT_select_random(struct wmOperatorType *ot); +void CURVE_OT_select_nth(struct wmOperatorType *ot); /* editcurve_add.c */ void CURVE_OT_primitive_bezier_curve_add(struct wmOperatorType *ot); -- cgit v1.2.3