forked from bartvdbraak/blender
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.
This commit is contained in:
parent
1273a1133e
commit
1439ddccae
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user