[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29036] branches/soc-2010-jwilkins/source/ blender/editors/sculpt_paint/sculpt.c: Fixed crash with sculpt draw tool and multires.
Jason Wilkins
Jason.A.Wilkins at gmail.com
Thu May 27 23:43:15 CEST 2010
Revision: 29036
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29036
Author: jwilkins
Date: 2010-05-27 23:43:15 +0200 (Thu, 27 May 2010)
Log Message:
-----------
Fixed crash with sculpt draw tool and multires.
Modified Paths:
--------------
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-05-27 21:12:09 UTC (rev 29035)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-05-27 21:43:15 UTC (rev 29036)
@@ -825,35 +825,21 @@
float nout[3] = {0.0f, 0.0f, 0.0f};
float nout_flip[3] = {0.0f, 0.0f, 0.0f};
- // XXX push instead of get for thread safety in draw
- // brush .. lame, but also not harmful really
- //unode= sculpt_undo_push_node(ss, nodes[n]);
sculpt_brush_test_init(ss, &test);
- if(ss->cache->original) {
- BLI_pbvh_vertex_iter_begin(bvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test_fast(&test, vd.co)) {
+ BLI_pbvh_vertex_iter_begin(bvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
+ if(sculpt_brush_test_fast(&test, vd.co)) {
+ if(vd.no) {
normal_short_to_float_v3(fno, vd.no);
add_norm_if(out_dir, nout, nout_flip, fno);
}
+ else
+ add_norm_if(out_dir, nout, nout_flip, vd.fno);
}
- BLI_pbvh_vertex_iter_end;
}
- else {
- BLI_pbvh_vertex_iter_begin(bvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
- if(sculpt_brush_test_fast(&test, vd.co)) {
- if(vd.no) {
- normal_short_to_float_v3(fno, vd.no);
- add_norm_if(out_dir, nout, nout_flip, fno);
- }
- else
- add_norm_if(out_dir, nout, nout_flip, vd.fno);
- }
- }
- BLI_pbvh_vertex_iter_end;
- }
+ BLI_pbvh_vertex_iter_end;
- #pragma omp critical
+ //#pragma omp critical
{
/* we sum per node and add together later for threads */
add_v3_v3(out, nout);
More information about the Bf-blender-cvs
mailing list