diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-13 08:04:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-13 08:04:53 +0400 |
commit | 6cc8f734c0f17554e2aea4c2ea88e097e3a4199c (patch) | |
tree | d9b7fab2d64a02b59a674c35116cf502904ff7c0 /source/blender/editors/physics | |
parent | e636893b1b362840dca779c33b6dca87be5dd0bd (diff) | |
parent | b73fe01295636aea92bf3076874b5e3cbcba9057 (diff) |
svn merge -r36603:36651 https://svn.blender.org/svnroot/bf-blender/trunk/blender \nwith some manual edits
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index ee39e0fff26..15986fad3d8 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -338,7 +338,7 @@ typedef struct PEData { DerivedMesh *dm; PTCacheEdit *edit; - const short *mval; + const int *mval; rcti *rect; float rad; float dist; @@ -439,9 +439,9 @@ static int key_test_depth(PEData *data, float co[3]) static int key_inside_circle(PEData *data, float rad, float co[3], float *distance) { float dx, dy, dist; - short sco[2]; + int sco[2]; - project_short(data->vc.ar, co, sco); + project_int(data->vc.ar, co, sco); if(sco[0] == IS_CLIPPED) return 0; @@ -465,9 +465,9 @@ static int key_inside_circle(PEData *data, float rad, float co[3], float *distan static int key_inside_rect(PEData *data, float co[3]) { - short sco[2]; + int sco[2]; - project_short(data->vc.ar, co,sco); + project_int(data->vc.ar, co,sco); if(sco[0] == IS_CLIPPED) return 0; @@ -1369,7 +1369,7 @@ void PARTICLE_OT_select_all(wmOperatorType *ot) /************************ pick select operator ************************/ -int PE_mouse_particles(bContext *C, const short mval[2], int extend) +int PE_mouse_particles(bContext *C, const int mval[2], int extend) { PEData data; Scene *scene= CTX_data_scene(C); @@ -1484,7 +1484,7 @@ void PARTICLE_OT_select_tips(wmOperatorType *ot) static int select_linked_exec(bContext *C, wmOperator *op) { PEData data; - short mval[2]; + int mval[2]; int location[2]; RNA_int_get_array(op->ptr, "location", location); @@ -1574,7 +1574,7 @@ int PE_border_select(bContext *C, rcti *rect, int select, int extend) /************************ circle select operator ************************/ -int PE_circle_select(bContext *C, int selecting, const short mval[2], float rad) +int PE_circle_select(bContext *C, int selecting, const int mval[2], float rad) { Scene *scene= CTX_data_scene(C); Object *ob= CTX_data_active_object(C); @@ -1599,7 +1599,7 @@ int PE_circle_select(bContext *C, int selecting, const short mval[2], float rad) /************************ lasso select operator ************************/ -int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, short select) +int PE_lasso_select(bContext *C, int mcords[][2], short moves, short extend, short select) { Scene *scene= CTX_data_scene(C); Object *ob= CTX_data_active_object(C); @@ -1610,7 +1610,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, s ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys); POINT_P; KEY_K; float co[3], mat[4][4]= MAT4_UNITY; - short vertco[2]; + int vertco[2]; PEData data; @@ -1631,7 +1631,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, s LOOP_KEYS { VECCOPY(co, key->co); mul_m4_v3(mat, co); - project_short(ar, co, vertco); + project_int(ar, co, vertco); if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) { if(select && !(key->flag & PEK_SELECT)) { key->flag |= PEK_SELECT; @@ -1649,7 +1649,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short extend, s VECCOPY(co, key->co); mul_m4_v3(mat, co); - project_short(ar, co,vertco); + project_int(ar, co,vertco); if((vertco[0] != IS_CLIPPED) && lasso_inside(mcords,moves,vertco[0],vertco[1]) && key_test_depth(&data, co)) { if(select && !(key->flag & PEK_SELECT)) { key->flag |= PEK_SELECT; @@ -2772,7 +2772,7 @@ static void brush_cut(PEData *data, int pa_index) float rad2, cut_time= 1.0; float x0, x1, v0, v1, o0, o1, xo0, xo1, d, dv; int k, cut, keys= (int)pow(2.0, (double)pset->draw_step); - short vertco[2]; + int vertco[2]; /* blunt scissors */ if(BLI_frand() > data->cutfac) return; @@ -2785,7 +2785,7 @@ static void brush_cut(PEData *data, int pa_index) cut=0; - project_short_noclip(ar, key->co, vertco); + project_int_noclip(ar, key->co, vertco); x0= (float)vertco[0]; x1= (float)vertco[1]; @@ -2803,7 +2803,7 @@ static void brush_cut(PEData *data, int pa_index) else { /* calculate path time closest to root that was inside the circle */ for(k=1, key++; k<=keys; k++, key++) { - project_short_noclip(ar, key->co, vertco); + project_int_noclip(ar, key->co, vertco); if(key_test_depth(data, key->co) == 0) { x0= (float)vertco[0]; @@ -3467,7 +3467,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) ParticleBrushData *brush= &pset->brush[pset->brushtype]; ARegion *ar= CTX_wm_region(C); float vec[3], mousef[2]; - short mval[2], mvalo[2]; + int mval[2], mvalo[2]; int flip, mouse[2], dx, dy, removed= 0, added=0, selected= 0; int lock_root = pset->flag & PE_LOCK_FIRST; |