Paint/Sculpt:

More minor cleanups: fixed names and factored out a function that was
copy-pasted into paint stroke.
This commit is contained in:
2011-01-07 22:46:52 +00:00
parent ab41b9bbaf
commit 2d9c11f3a3
5 changed files with 38 additions and 63 deletions

View File

@@ -35,6 +35,23 @@
#include "paint_intern.h"
float paint_calc_object_space_radius(ViewContext *vc, float center[3],
float pixel_radius)
{
Object *ob = vc->obact;
float delta[3], scale, loc[3];
mul_v3_m4v3(loc, ob->obmat, center);
initgrabz(vc->rv3d, loc[0], loc[1], loc[2]);
window_to_3d_delta(vc->ar, delta, pixel_radius, 0);
scale= fabsf(mat4_to_scale(ob->obmat));
scale= (scale == 0.0f)? 1.0f: scale;
return len_v3(delta)/scale;
}
float paint_get_tex_pixel(Brush* br, float u, float v)
{
TexResult texres;