Rename 'clay tubes' to 'clay strips' and include it in the capabilities RNA.

This commit is contained in:
Nicholas Bishop
2012-03-18 11:44:00 +00:00
parent bb8bbc817e
commit c5860e6c5d
3 changed files with 17 additions and 16 deletions

View File

@@ -563,7 +563,7 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather)
switch(brush->sculpt_tool){
case SCULPT_TOOL_CLAY:
case SCULPT_TOOL_CLAY_TUBES:
case SCULPT_TOOL_CLAY_STRIPS:
case SCULPT_TOOL_DRAW:
case SCULPT_TOOL_LAYER:
return alpha * flip * pressure * overlap * feather;
@@ -2026,7 +2026,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
}
}
static void do_clay_tubes_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
{
SculptSession *ss = ob->sculpt;
Brush *brush = paint_brush(&sd->paint);
@@ -2370,8 +2370,8 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush)
case SCULPT_TOOL_CLAY:
do_clay_brush(sd, ob, nodes, totnode);
break;
case SCULPT_TOOL_CLAY_TUBES:
do_clay_tubes_brush(sd, ob, nodes, totnode);
case SCULPT_TOOL_CLAY_STRIPS:
do_clay_strips_brush(sd, ob, nodes, totnode);
break;
case SCULPT_TOOL_FILL:
do_fill_brush(sd, ob, nodes, totnode);
@@ -2763,8 +2763,8 @@ static const char *sculpt_tool_name(Sculpt *sd)
return "Flatten Brush"; break;
case SCULPT_TOOL_CLAY:
return "Clay Brush"; break;
case SCULPT_TOOL_CLAY_TUBES:
return "Clay Tubes Brush"; break;
case SCULPT_TOOL_CLAY_STRIPS:
return "Clay Strips Brush"; break;
case SCULPT_TOOL_FILL:
return "Fill Brush"; break;
case SCULPT_TOOL_SCRAPE:
@@ -2916,7 +2916,7 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio
if(ELEM8(brush->sculpt_tool,
SCULPT_TOOL_DRAW, SCULPT_TOOL_CREASE, SCULPT_TOOL_BLOB,
SCULPT_TOOL_LAYER, SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY,
SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_ROTATE))
SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_ROTATE))
if(!(brush->flag & BRUSH_ACCUMULATE))
cache->original = 1;
@@ -2935,7 +2935,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
if(ELEM5(tool,
SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE,
SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_SNAKE_HOOK,
SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_SNAKE_HOOK,
SCULPT_TOOL_THUMB)) {
float grab_location[3], imat[4][4], delta[3], loc[3];
@@ -2962,7 +2962,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
mul_mat3_m4_v3(imat, delta);
add_v3_v3(cache->grab_delta, delta);
break;
case SCULPT_TOOL_CLAY_TUBES:
case SCULPT_TOOL_CLAY_STRIPS:
case SCULPT_TOOL_NUDGE:
sub_v3_v3v3(cache->grab_delta, grab_location, cache->old_grab_location);
invert_m4_m4(imat, ob->obmat);

View File

@@ -159,7 +159,7 @@ typedef enum BrushSculptTool {
SCULPT_TOOL_CREASE = 16,
SCULPT_TOOL_BLOB = 17,
SCULPT_TOOL_CLAY_TUBES = 18
SCULPT_TOOL_CLAY_STRIPS = 18
} BrushSculptTool;
/* ImagePaintSettings.tool */

View File

@@ -151,8 +151,8 @@ static int rna_SculptCapabilities_has_pinch_factor_get(PointerRNA *ptr)
static int rna_SculptCapabilities_has_plane_offset_get(PointerRNA *ptr)
{
Brush *br = (Brush*)ptr->data;
return ELEM4(br->sculpt_tool, SCULPT_TOOL_CLAY, SCULPT_TOOL_FILL,
SCULPT_TOOL_FLATTEN, SCULPT_TOOL_SCRAPE);
return ELEM5(br->sculpt_tool, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS,
SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_SCRAPE);
}
static int rna_SculptCapabilities_has_random_texture_angle_get(PointerRNA *ptr)
@@ -175,10 +175,11 @@ static int rna_SculptCapabilities_has_sculpt_plane_get(PointerRNA *ptr)
static int rna_SculptCapabilities_has_secondary_color_get(PointerRNA *ptr)
{
Brush *br = (Brush*)ptr->data;
return ELEM9(br->sculpt_tool,
SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CREASE,
SCULPT_TOOL_DRAW, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN,
SCULPT_TOOL_INFLATE, SCULPT_TOOL_PINCH, SCULPT_TOOL_SCRAPE);
return ELEM10(br->sculpt_tool,
SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_STRIPS,
SCULPT_TOOL_CREASE, SCULPT_TOOL_DRAW, SCULPT_TOOL_FILL,
SCULPT_TOOL_FLATTEN, SCULPT_TOOL_INFLATE, SCULPT_TOOL_PINCH,
SCULPT_TOOL_SCRAPE);
}
static int rna_SculptCapabilities_has_smooth_stroke_get(PointerRNA *ptr)