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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-04 23:36:38 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-04 23:36:38 +0300
commit636fe9068094668dd4bfe28dd144b1217ec7e0c8 (patch)
treedbe4bd537579b794974cb1af527d1001dd40752b /source/blender/editors/sculpt_paint
parentb90d8ec0f454dfdd12f1284aabaff12b4cc93481 (diff)
Sculpt: updating normals now no longer uses the vert-face map, to save memory.
The weak point now is the thread-safe atomic access to normals from multiple threads, did not seem to be a bottleneck in my tests but I don't really trust it to be fast.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index e29f0d56ba2..c8bfbec4e8b 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -266,7 +266,7 @@ void sculpt_get_redraw_planes(float planes[4][4], ARegion *ar,
MEM_freeN(bb);
/* clear redraw flag from nodes */
- BLI_pbvh_update(ob->sculpt->tree, PBVH_UpdateRedraw, NULL, NULL);
+ BLI_pbvh_update(ob->sculpt->tree, PBVH_UpdateRedraw, NULL);
}
/*** Looping Over Nodes in a BVH Node ***/
@@ -624,6 +624,7 @@ static void do_draw_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int t
vd.co[2] + offset[2]*fade};
sculpt_clip(sd, ss, vd.co, val);
+ ss->mvert[vd.index].flag |= ME_VERT_PBVH_UPDATE;
}
BLI_pbvh_node_mark_update(nodes[n]);
@@ -697,6 +698,7 @@ static void do_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int
val[2] = vd.co[2]+(avg[2]-vd.co[2])*fade;
sculpt_clip(sd, ss, vd.co, val);
+ ss->mvert[vd.index].flag |= ME_VERT_PBVH_UPDATE;
}
BLI_pbvh_node_mark_update(nodes[n]);
@@ -723,6 +725,7 @@ static void do_pinch_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int
vd.co[2]+(vd.location[2]-vd.co[2])*fade};
sculpt_clip(sd, ss, vd.co, val);
+ ss->mvert[vd.index].flag |= ME_VERT_PBVH_UPDATE;
}
BLI_pbvh_node_mark_update(nodes[n]);
@@ -821,6 +824,7 @@ static void do_inflate_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, in
VecAddf(add, add, vd.co);
sculpt_clip(sd, ss, vd.co, add);
+ ss->mvert[vd.index].flag |= ME_VERT_PBVH_UPDATE;
}
BLI_pbvh_node_mark_update(nodes[n]);
@@ -944,6 +948,7 @@ static void do_flatten_clay_brush(Sculpt *sd, SculptSession *ss, PBVHNode **node
VecAddf(val, val, vd.co);
sculpt_clip(sd, ss, vd.co, val);
+ ss->mvert[vd.index].flag |= ME_VERT_PBVH_UPDATE;
}
}
@@ -1631,7 +1636,7 @@ static void sculpt_flush_update(bContext *C)
multires_mark_as_modified(ob);
}
- BLI_pbvh_update(ss->tree, PBVH_UpdateBB, NULL, NULL);
+ BLI_pbvh_update(ss->tree, PBVH_UpdateBB, NULL);
redraw = sculpt_get_redraw_rect(ar, CTX_wm_region_view3d(C), ob, &r);
if(redraw) {