diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-26 14:51:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-26 14:51:28 +0300 |
commit | 8f6ce8c2d30cf10675ac1f068876cd5a6a108572 (patch) | |
tree | cdf256abd7a469cbcd73f38282b3d7775a346062 /source/blender/editors | |
parent | 38111eb224f08c7e5afddd6b4b429a61fa0106bc (diff) |
bugfix [#20401] Hair Combing with "Limit Selection to Visible" does not comb all particles
Limit selection was totally broken (border select, circle select etc) because the depth function was using the view matrix multiplied by the object matrix.
I couldnt find any case where this was needed, but take care when using data->mats.modelview from particle mode edit tools.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 44e4f938e61..c2ead76ff3e 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -374,7 +374,8 @@ static void PE_set_view3d_data(bContext *C, PEData *data) PE_set_data(C, data); view3d_set_viewcontext(C, &data->vc); - view3d_get_transformation(data->vc.ar, data->vc.rv3d, data->ob, &data->mats); + /* note, the object argument means the modelview matrix does not account for the objects matrix, use viewmat rather then (obmat * viewmat) */ + view3d_get_transformation(data->vc.ar, data->vc.rv3d, NULL, &data->mats); if((data->vc.v3d->drawtype>OB_WIRE) && (data->vc.v3d->flag & V3D_ZBUF_SELECT)) view3d_validate_backbuf(&data->vc); @@ -407,7 +408,8 @@ static int key_test_depth(PEData *data, float co[3]) x+= (short)data->vc.ar->winrct.xmin; y+= (short)data->vc.ar->winrct.ymin; - view3d_validate_backbuf(&data->vc); + /* PE_set_view3d_data calls this. no need to call here */ + /* view3d_validate_backbuf(&data->vc); */ glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); if((float)uz - 0.0001 > depth) |