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 <ideasman42@gmail.com>2010-11-03 04:56:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-03 04:56:02 +0300
commit6b767b8018cbf5ca5657cad842271d8d6327ddd0 (patch)
tree0ccc6e91534c8cca4016866c387793a4668e3b74 /source/blender/editors/physics/particle_edit.c
parentb9c3bfa053fb3e86ad00a5f551a96f715e4a6818 (diff)
fix [#24499] Consistency Issue with LassoSelect/ExtendOption
Added extend option to lasso. also... - selecting bones wasn't checking their layer of if they were hidden in a number of places. - fixed memory leak. small unrealed changes - added PBONE_VISIBLE macro - renamed functions used for paint selectoin from *_tface to paintface_*. sine they no longer have anything todo with tface's. - removed scanfill include from BLI_blenlib.h, this is only used in very few places and quite specific. Noticed lasso select is broken for metaballs and face mask mode but this has been the case for a while, will look into it next.
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r--source/blender/editors/physics/particle_edit.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index fed4b8d9722..e654b868622 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -1513,6 +1513,17 @@ void PARTICLE_OT_select_linked(wmOperatorType *ot)
}
/************************ border select operator ************************/
+void PE_deselect_all_visible(PTCacheEdit *edit)
+{
+ POINT_P; KEY_K;
+
+ LOOP_VISIBLE_POINTS {
+ LOOP_SELECTED_KEYS {
+ key->flag &= ~PEK_SELECT;
+ point->flag |= PEP_EDIT_RECALC;
+ }
+ }
+}
int PE_border_select(bContext *C, rcti *rect, int select, int extend)
{
@@ -1524,16 +1535,8 @@ int PE_border_select(bContext *C, rcti *rect, int select, int extend)
if(!PE_start_edit(edit))
return OPERATOR_CANCELLED;
- if (extend == 0 && select) {
- POINT_P; KEY_K;
-
- LOOP_VISIBLE_POINTS {
- LOOP_SELECTED_KEYS {
- key->flag &= ~PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC;
- }
- }
- }
+ if (extend == 0 && select)
+ PE_deselect_all_visible(edit);
PE_set_view3d_data(C, &data);
data.rect= rect;
@@ -1574,7 +1577,7 @@ int PE_circle_select(bContext *C, int selecting, short *mval, float rad)
/************************ lasso select operator ************************/
-int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select)
+int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, short select)
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
@@ -1590,6 +1593,9 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select)
if(!PE_start_edit(edit))
return OPERATOR_CANCELLED;
+ if (extend == 0 && select)
+ PE_deselect_all_visible(edit);
+
unit_m4(mat);
LOOP_VISIBLE_POINTS {