Reorganized brush palette into three columns. Changed brush View slider to the range [0-10], since there's really no need to it to values like 93%, 90% is close enough.
This commit is contained in:
@@ -4280,7 +4280,21 @@ void sculptmode_draw_interface_textures(uiBlock *block, unsigned short cx, unsig
|
||||
uiBut *but;
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefBut(block,LABEL,B_NOP,"Texture",cx,cy,200,20,0,0,0,0,0,"");
|
||||
uiDefBut(block,LABEL,B_NOP,"Common",cx,cy,80,20,0,0,0,0,0,"");
|
||||
cy-= 20;
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButC(block,TOG,B_NOP, "Fade", cx,cy,80,19, &sd->texfade, 0,0,0,0,"Smooth the edges of the texture");
|
||||
cy-= 20;
|
||||
uiDefButS(block,NUM,B_NOP, "Space", cx,cy,80,19, &sd->spacing, 0,500,20,0,"Non-zero inserts N pixels between dots");
|
||||
cy-= 20;
|
||||
if(sd->brush_type == DRAW_BRUSH)
|
||||
uiDefButC(block,NUM,B_NOP, "View", cx,cy,80,19, &sculptmode_brush()->view, 0,10,20,0,"Pulls brush direction towards view");
|
||||
|
||||
cy= orig_y;
|
||||
cx+= 85;
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefBut(block,LABEL,B_NOP,"Texture",cx,cy,80,20,0,0,0,0,0,"");
|
||||
cy-= 20;
|
||||
|
||||
/* TEX CHANNELS */
|
||||
@@ -4330,12 +4344,6 @@ void sculptmode_draw_interface_textures(uiBlock *block, unsigned short cx, unsig
|
||||
|
||||
uiDefButS(block,NUM,B_NOP, "Scale", cx,cy,115,19, &sd->texscale,1,1000,0,0,"Scaling factor for texture axis");
|
||||
cy-= 20;
|
||||
|
||||
uiDefButC(block,TOG,B_NOP, "Fade", cx,cy,50,19, &sd->texfade, 0,0,0,0,"Smooth the edges of the texture");
|
||||
uiDefButS(block,NUM,B_NOP, "Space", cx+50,cy,65,19, &sd->spacing, 0,500,20,0,"Non-zero inserts N pixels between dots");
|
||||
cy-= 20;
|
||||
if(sd->brush_type == DRAW_BRUSH)
|
||||
uiDefButC(block,NUM,B_NOP, "View", cx+50,cy,65,19, &sculptmode_brush()->view, 0,100,20,0,"Pulls brush direction towards view");
|
||||
}
|
||||
else {
|
||||
uiDefButS(block,TOG,B_SCULPT_TEXBROWSE, "Add New" ,cx, cy, 115, 19, &G.buts->texnr,-1,32767,0,0, "Adds a new texture");
|
||||
@@ -4344,14 +4352,6 @@ void sculptmode_draw_interface_textures(uiBlock *block, unsigned short cx, unsig
|
||||
|
||||
MEM_freeN(strp);
|
||||
}
|
||||
else {
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButC(block,TOG,B_NOP, "Fade", cx,cy,50,19, &sd->texfade, 0,0,0,0,"Smooth the edges of the texture");
|
||||
uiDefButS(block,NUM,B_NOP, "Space", cx+50,cy,65,19, &sd->spacing, 0,500,20,0,"Non-zero inserts N pixels between dots");
|
||||
cy-= 20;
|
||||
if(sd->brush_type == DRAW_BRUSH)
|
||||
uiDefButC(block,NUM,B_NOP, "View", cx+50,cy,65,19, &sculptmode_brush()->view, 0,100,20,0,"Pulls brush direction towards view");
|
||||
}
|
||||
|
||||
uiBlockEndAlign(block);
|
||||
}
|
||||
|
||||
@@ -800,11 +800,12 @@ void sculpt_clip(const EditData *e, float *co, const float val[3])
|
||||
|
||||
/* Currently only for the draw brush; finds average normal for all active
|
||||
vertices */
|
||||
vec3f calc_area_normal(const vec3f *outdir, const int view, const ListBase* active_verts)
|
||||
vec3f calc_area_normal(const vec3f *outdir, const ListBase* active_verts)
|
||||
{
|
||||
Mesh *me= get_mesh(OBACT);
|
||||
vec3f area_normal= {0,0,0};
|
||||
ActiveData *node= active_verts->first;
|
||||
const int view= sculpt_data()->brush_type==DRAW_BRUSH ? sculptmode_brush()->view : 0;
|
||||
|
||||
while(node){
|
||||
area_normal.x+= me->mvert[node->Index].no[0];
|
||||
@@ -814,9 +815,9 @@ vec3f calc_area_normal(const vec3f *outdir, const int view, const ListBase* acti
|
||||
}
|
||||
Normalise(&area_normal.x);
|
||||
if(outdir) {
|
||||
area_normal.x= outdir->x * view + area_normal.x * (100-view);
|
||||
area_normal.y= outdir->y * view + area_normal.y * (100-view);
|
||||
area_normal.z= outdir->z * view + area_normal.z * (100-view);
|
||||
area_normal.x= outdir->x * view + area_normal.x * (10-view);
|
||||
area_normal.y= outdir->y * view + area_normal.y * (10-view);
|
||||
area_normal.z= outdir->z * view + area_normal.z * (10-view);
|
||||
}
|
||||
Normalise(&area_normal.x);
|
||||
return area_normal;
|
||||
@@ -824,7 +825,7 @@ vec3f calc_area_normal(const vec3f *outdir, const int view, const ListBase* acti
|
||||
void do_draw_brush(const EditData *e, const ListBase* active_verts)
|
||||
{
|
||||
Mesh *me= get_mesh(OBACT);
|
||||
const vec3f area_normal= calc_area_normal(&e->out, sculptmode_brush()->view, active_verts);
|
||||
const vec3f area_normal= calc_area_normal(&e->out, active_verts);
|
||||
ActiveData *node= active_verts->first;
|
||||
|
||||
while(node){
|
||||
@@ -937,7 +938,7 @@ void do_grab_brush(EditData *e)
|
||||
void do_layer_brush(EditData *e, const ListBase *active_verts)
|
||||
{
|
||||
Mesh *me= get_mesh(OBACT);
|
||||
vec3f area_normal= calc_area_normal(NULL, 0, active_verts);
|
||||
vec3f area_normal= calc_area_normal(NULL, active_verts);
|
||||
ActiveData *node= active_verts->first;
|
||||
const float bstr= brush_strength(e);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user