Revision: 26294
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26294
Author:   campbellbarton
Date:     2010-01-26 12:51:28 +0100 (Tue, 26 Jan 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/physics/particle_edit.c

Modified: trunk/blender/source/blender/editors/physics/particle_edit.c
===================================================================
--- trunk/blender/source/blender/editors/physics/particle_edit.c        
2010-01-26 11:36:48 UTC (rev 26293)
+++ trunk/blender/source/blender/editors/physics/particle_edit.c        
2010-01-26 11:51:28 UTC (rev 26294)
@@ -374,7 +374,8 @@
        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 @@
        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)


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to