diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-15 13:03:04 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-16 06:48:25 +0300 |
commit | 5e5285baf621a0c225cb5fc06fcec6ffed8302d7 (patch) | |
tree | fcdc655a6b063d32a7630b648e126c20ade295f2 /source/blender/editors/include/ED_particle.h | |
parent | 9a763d24f2b50ad38d22cad0a23d7344afe5f1c7 (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/include/ED_particle.h')
-rw-r--r-- | source/blender/editors/include/ED_particle.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index a4797ff167c..553aa444891 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -16,6 +16,7 @@ struct PTCacheEdit; struct ParticleEditSettings; struct ParticleSystem; struct Scene; +struct SelectPick_Params; struct UndoType; struct ViewLayer; struct bContext; @@ -54,8 +55,9 @@ void PE_update_object(struct Depsgraph *depsgraph, /* selection tools */ -bool PE_mouse_particles( - struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); +bool PE_mouse_particles(struct bContext *C, + const int mval[2], + const struct SelectPick_Params *params); bool PE_box_select(struct bContext *C, const struct rcti *rect, int sel_op); bool PE_circle_select(struct bContext *C, struct wmGenericUserData *wm_userdata, |