diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-08-26 20:38:23 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-08-26 20:38:23 +0400 |
commit | 1439ddccae91898812b3a040b35dedcb639894e5 (patch) | |
tree | cb8df272a5b0b360295dce73dfc28e76c904b485 /source/blender/editors | |
parent | 1273a1133e13d5703d8ece8ac88ec2fa00cb2cf5 (diff) |
Fix #28301: Sculpting a object with rotational have desface
Patch from Juha Maki-Kanto
- initgrabz was called with local space coord.
- Brush radiu was multiplying by 2.0 for grab and snake brushes.
Not sure why this was needed. Made some tests and didn't notice
any regressions without this multiplication.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index be985342ea8..2ee49f71a78 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2979,7 +2979,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE, SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB)) { - float grab_location[3], imat[4][4], delta[3]; + float grab_location[3], imat[4][4], delta[3], loc[3]; if(cache->first_time) { copy_v3_v3(cache->orig_grab_location, @@ -2989,10 +2989,8 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) add_v3_v3(cache->true_location, cache->grab_delta); /* compute 3d coordinate at same z from original location + mouse */ - initgrabz(cache->vc->rv3d, - cache->orig_grab_location[0], - cache->orig_grab_location[1], - cache->orig_grab_location[2]); + mul_v3_m4v3(loc, ob->obmat, cache->orig_grab_location); + initgrabz(cache->vc->rv3d, loc[0], loc[1], loc[2]); ED_view3d_win_to_delta(cache->vc->ar, cache->mouse, grab_location); @@ -3088,9 +3086,6 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, st else { cache->initial_radius= brush_unprojected_radius(brush); } - - if (ELEM(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK)) - cache->initial_radius *= 2.0f; } if(brush_use_size_pressure(brush)) { |