Vector displacement for the sculpting draw brush #104481
|
@ -1147,7 +1147,6 @@ def brush_texture_settings(layout, brush, sculpt):
|
|||
col.prop(brush, "use_color_as_displacement", text="Vector Displacement")
|
||||
|
||||
|
||||
Jeroen-Bakker marked this conversation as resolved
|
||||
|
||||
def brush_mask_texture_settings(layout, brush):
|
||||
mask_tex_slot = brush.mask_texture_slot
|
||||
|
||||
|
|
|
@ -2713,6 +2713,10 @@ void SCULPT_brush_strength_color(struct SculptSession *ss,
|
|||
void SCULPT_calc_vertex_displacement(SculptSession *ss, const struct Brush *brush, float rgba[4], float out_offset[3])
|
||||
{
|
||||
mul_v3_fl(rgba, ss->cache->bstrength);
|
||||
if(ss->cache->bstrength < 0) {
|
||||
rgba[0] *= -1;
|
||||
rgba[1] *= -1;
|
||||
}
|
||||
|
||||
rgba[0] *= 1.0f / (brush->mtex.size[0] == 0.0f ? 1.0f : brush->mtex.size[0] * brush->mtex.size[0]);
|
||||
rgba[1] *= 1.0f / (brush->mtex.size[1] == 0.0f ? 1.0f : brush->mtex.size[1] * brush->mtex.size[1]);
|
||||
|
|
Loading…
Reference in New Issue
Python has some rules about the number of lines between statements. Here it is max 1.