Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-15 13:03:04 +0300
committerCampbell Barton <campbell@blender.org>2022-03-16 06:48:25 +0300
commit5e5285baf621a0c225cb5fc06fcec6ffed8302d7 (patch)
treefcdc655a6b063d32a7630b648e126c20ade295f2 /source/blender/editors/curve/editfont.c
parent9a763d24f2b50ad38d22cad0a23d7344afe5f1c7 (diff)
View 3D: move picking arguments into a struct & minor refactor
- Add SelectPick_Params struct to make picking logic more straightforward and easier to extend. - Use `eSelectOp` instead of booleans (extend, deselect, toggle) which were used to represent 4 states (which wasn't obvious). - Handle deselect_all when pocking instead of view3d_select_exec, de-duplicate de-selection which was already needed in when replacing the selection in picking functions. - Handle outliner update & notifiers in the picking functions instead of view3d_select_exec. - Fix particle select deselect_all option which did nothing.
Diffstat (limited to 'source/blender/editors/curve/editfont.c')
-rw-r--r--source/blender/editors/curve/editfont.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index fdd145ff8cf..0afb1c2f4af 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -2184,7 +2184,10 @@ void FONT_OT_unlink(wmOperatorType *ot)
}
bool ED_curve_editfont_select_pick(
- bContext *C, const int mval[2], bool extend, bool deselect, bool toggle)
+ bContext *C,
+ const int mval[2],
+ /* NOTE: `params->deselect_all` is ignored as only one text-box is active at once. */
+ const struct SelectPick_Params *params)
{
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
Object *obedit = CTX_data_edit_object(C);
@@ -2203,9 +2206,7 @@ bool ED_curve_editfont_select_pick(
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
/* currently only select active */
- (void)extend;
- (void)deselect;
- (void)toggle;
+ (void)params;
for (i_iter = 0; i_iter < cu->totbox; i_iter++) {
int i = (i_iter + i_actbox) % cu->totbox;