GPencil: Fix unreported small offset when use Stroke mode
When using the Stroke mode, the reprojection function add a small offset of 0.5 to +X and +Y. Now this effect is removed subtracting this value before doing the conversion.
This commit is contained in:
parent
e54a206e15
commit
f418eddf8e
Notes:
blender-bot
2023-02-14 04:24:05 +01:00
Referenced by issue #76134, cant open any older project in this 2.83a version even 2.82a projects Referenced by issue #76070, Anti-Aliasing possibly making viewport buggy
|
@ -445,7 +445,10 @@ static void gp_stroke_convertcoords(tGPsdata *p, const float mval[2], float out[
|
|||
}
|
||||
|
||||
int mval_i[2];
|
||||
round_v2i_v2fl(mval_i, mval);
|
||||
float rmval[2];
|
||||
rmval[0] = mval[0] - 0.5f;
|
||||
rmval[1] = mval[1] - 0.5f;
|
||||
round_v2i_v2fl(mval_i, rmval);
|
||||
|
||||
if (gpencil_project_check(p) &&
|
||||
(ED_view3d_autodist_simple(p->region, mval_i, out, 0, depth))) {
|
||||
|
|
Loading…
Reference in New Issue