From 010c99deb271c629742e32f5e7922d357cafc9f3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 3 Dec 2009 18:35:37 +0000 Subject: Sculpt Branch: * Multithread parts of multires and subsurf. Only loops working on face grid data and do no memory allocation have been multithreaded, others would be more complicated. * Force some CCGSubsurf functions to be inlined, gives a small overall speedup in subsurf code. * Fix sculpting not working correct with transformed objects. * Fix a few cases of "spikes" on lower level multires levels. There's still cases where it happens, usually on boundary cornders. The problem is that in such cases the limit surfaces can be very different from the low res surface, so the tangent space is very different too.. * Fix crash deleting multires higher levels with level set to 0. * Fix crashes that happened sometimes when adding faces in editmode. --- source/blender/editors/sculpt_paint/sculpt.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 7644751d61e..b39a2912c02 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1726,12 +1726,17 @@ int sculpt_stroke_get_location(bContext *C, struct PaintStroke *stroke, float ou SculptSession *ss= vc->obact->sculpt; StrokeCache *cache= ss->cache; float ray_start[3], ray_normal[3]; + float obimat[4][4]; float mval[2] = {mouse[0] - vc->ar->winrct.xmin, mouse[1] - vc->ar->winrct.ymin}; SculptRaycastData srd; viewray(vc->ar, vc->v3d, mval, ray_start, ray_normal); + invert_m4_m4(obimat, ss->ob->obmat); + mul_m4_v3(obimat, ray_start); + mul_mat3_m4_v3(obimat, ray_normal); + srd.ss = vc->obact->sculpt; srd.ray_start = ray_start; srd.ray_normal = ray_normal; -- cgit v1.2.3