diff options
author | Habib Gahbiche <habibgahbiche@gmail.com> | 2018-11-07 03:01:50 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-11-07 03:56:33 +0300 |
commit | 4e9911663a22766f6751d33ae84c1ebcc1fae559 (patch) | |
tree | 4d4e043ffaf16a81427e92caba77220407ea329c /source/blender/editors/include | |
parent | c19dafd2a62fe0bebe6f834017b108e77d133682 (diff) |
Multi-Objects: CURVE_OT_select_similar
Implemented the following methods:
* SIMCURHAND_TYPE
* SIMCURHAND_RADIUS
* SIMCURHAND_WEIGHT
* SIMCURHAND_DIRECTION
Limits:
* DIRECTION does not support surfaces, because `BKE_nurb_bpoint_calc_normal`
does not work with Nurbs of type `CU_CARDINAL`. This also didn't work prior
to this patch, so we wait until surfaces are properly supported in EditMode.
* Also DIRECTION should take scaling into consideration. We need our own
versions of BKE_nurb_bpoint_calc_normal/bezt.
* Threshold default is too large. Not sure if it's better to change the default
or scale the threshold in code.
Differential Revision: https://developer.blender.org/D3846
Changes from committer (Dalai Felinto):
* Moved nurb_bpoint_direction_worldspace_get/bezt to functions.
* Comments hinting at the mode (direction) that require scaling to be
taken into account - to be addressed by patch creator in a future
patch.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_curve.h | 1 | ||||
-rw-r--r-- | source/blender/editors/include/ED_select_utils.h | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 5133fb46dc7..e4eea9921db 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -74,6 +74,7 @@ void ED_curve_deselect_all(struct EditNurb *editnurb); void ED_curve_deselect_all_multi(struct Object **objects, int objects_len); void ED_curve_select_all(struct EditNurb *editnurb); void ED_curve_select_swap(struct EditNurb *editnurb, bool hide_handles); +int ED_curve_select_count(struct View3D *v3d, struct EditNurb *editnurb); /* editcurve_undo.c */ void ED_curve_undosys_type(struct UndoType *ut); diff --git a/source/blender/editors/include/ED_select_utils.h b/source/blender/editors/include/ED_select_utils.h index add1c812e1f..d7f55e2a2d6 100644 --- a/source/blender/editors/include/ED_select_utils.h +++ b/source/blender/editors/include/ED_select_utils.h @@ -25,6 +25,8 @@ #ifndef __ED_SELECT_UTILS_H__ #define __ED_SELECT_UTILS_H__ +struct KDTree; + enum { SEL_TOGGLE = 0, SEL_SELECT = 1, @@ -41,6 +43,13 @@ typedef enum { SEL_OP_XOR, } eSelectOp; +/* Select Similar */ +enum { + SIM_CMP_EQ = 0, + SIM_CMP_GT, + SIM_CMP_LT +}; + #define SEL_OP_USE_OUTSIDE(sel_op) (ELEM(sel_op, SEL_OP_AND)) #define SEL_OP_USE_PRE_DESELECT(sel_op) (ELEM(sel_op, SEL_OP_SET)) #define SEL_OP_CAN_DESELECT(sel_op) (!ELEM(sel_op, SEL_OP_ADD)) @@ -49,4 +58,6 @@ typedef enum { int ED_select_op_action(const eSelectOp sel_op, const bool is_select, const bool is_inside); int ED_select_op_action_deselected(const eSelectOp sel_op, const bool is_select, const bool is_inside); +int ED_select_similar_compare_float(const float delta, const float thresh, const int compare); +bool ED_select_similar_compare_float_tree(const struct KDTree *tree, const float length, const float thresh, const int compare); #endif /* __ED_SELECT_UTILS_H__ */ |