diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-14 03:45:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-14 03:45:00 +0300 |
commit | 1bbddc8a1ed86ff94657e1e1acb34977a4c3a565 (patch) | |
tree | f847f9c20bb05007d7d8f9320895cfccbd861189 /source/blender/editors | |
parent | 3036a9a46c18758bfae90163e14e3b5d38c2680a (diff) | |
parent | b993e8a17a077ae23b909a9da425e72e1b16bf1a (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/ED_particle.h | 2 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index b50250dfb96..08ed8097ea6 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -62,7 +62,7 @@ void PE_update_object( /* selection tools */ int PE_mouse_particles(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); -int PE_border_select(struct bContext *C, struct rcti *rect, bool select, bool extend); +int PE_border_select(struct bContext *C, const struct rcti *rect, bool select, bool extend); int PE_circle_select(struct bContext *C, int selecting, const int mval[2], float rad); int PE_lasso_select(struct bContext *C, const int mcords[][2], const short moves, bool extend, bool select); void PE_deselect_all_visible(struct PTCacheEdit *edit); diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index cb781dc2447..e722173bcfa 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -613,7 +613,7 @@ typedef void (*ForPointFunc)(PEData *data, int point_index); typedef void (*ForKeyFunc)(PEData *data, int point_index, int key_index); typedef void (*ForKeyMatFunc)(PEData *data, float mat[4][4], float imat[4][4], int point_index, int key_index, PTCacheEditKey *key); -static void for_mouse_hit_keys(PEData *data, ForKeyFunc func, int nearest) +static void for_mouse_hit_keys(PEData *data, ForKeyFunc func, bool nearest) { ParticleEditSettings *pset = PE_settings(data->scene); PTCacheEdit *edit = data->edit; @@ -1665,11 +1665,11 @@ int PE_mouse_particles(bContext *C, const int mval[2], bool extend, bool deselec /* 1 = nearest only */ if (extend) - for_mouse_hit_keys(&data, extend_key_select, 1); + for_mouse_hit_keys(&data, extend_key_select, true); else if (deselect) - for_mouse_hit_keys(&data, deselect_key_select, 1); + for_mouse_hit_keys(&data, deselect_key_select, true); else - for_mouse_hit_keys(&data, toggle_key_select, 1); + for_mouse_hit_keys(&data, toggle_key_select, true); PE_update_selection(data.depsgraph, scene, ob, 1); WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, data.ob); @@ -1900,7 +1900,7 @@ static int select_linked_exec(bContext *C, wmOperator *op) data.rad = 75.0f; data.select = !RNA_boolean_get(op->ptr, "deselect"); - for_mouse_hit_keys(&data, select_keys, 1); /* nearest only */ + for_mouse_hit_keys(&data, select_keys, true); PE_update_selection(data.depsgraph, data.scene, data.ob, 1); WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, data.ob); @@ -1946,7 +1946,7 @@ void PE_deselect_all_visible(PTCacheEdit *edit) } } -int PE_border_select(bContext *C, rcti *rect, bool select, bool extend) +int PE_border_select(bContext *C, const rcti *rect, bool select, bool extend) { Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); @@ -1963,7 +1963,7 @@ int PE_border_select(bContext *C, rcti *rect, bool select, bool extend) data.rect = rect; data.select = select; - for_mouse_hit_keys(&data, select_key, 0); + for_mouse_hit_keys(&data, select_key, false); PE_update_selection(data.depsgraph, scene, ob, 1); WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, ob); @@ -1988,7 +1988,7 @@ int PE_circle_select(bContext *C, int selecting, const int mval[2], float rad) data.rad = rad; data.select = selecting; - for_mouse_hit_keys(&data, select_key, 0); + for_mouse_hit_keys(&data, select_key, false); PE_update_selection(data.depsgraph, scene, ob, 1); WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_SELECTED, ob); |