Sculpt Symmetrize: Initial commit
This commit is contained in:
parent
b240973412
commit
674bc2e4b4
|
@ -766,6 +766,14 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
|
|||
brush->sculpt_tool = SCULPT_TOOL_SCENE_PROJECT;
|
||||
}
|
||||
|
||||
brush_name = "Symmetryze";
|
||||
brush = BLI_findstring(&bmain->brushes, brush_name, offsetof(ID, name) + 2);
|
||||
if (!brush) {
|
||||
brush = BKE_brush_add(bmain, brush_name, OB_MODE_SCULPT);
|
||||
id_us_min(&brush->id);
|
||||
brush->sculpt_tool = SCULPT_TOOL_SYMMETRIZE;
|
||||
}
|
||||
|
||||
/* Use the same tool icon color in the brush cursor */
|
||||
for (brush = bmain->brushes.first; brush; brush = brush->id.next) {
|
||||
if (brush->ob_mode & OB_MODE_SCULPT) {
|
||||
|
|
|
@ -2390,6 +2390,7 @@ static float brush_strength(const Sculpt *sd,
|
|||
case SCULPT_TOOL_DRAW:
|
||||
case SCULPT_TOOL_DRAW_SHARP:
|
||||
case SCULPT_TOOL_LAYER:
|
||||
case SCULPT_TOOL_SYMMETRIZE:
|
||||
return alpha * flip * pressure * overlap * feather;
|
||||
case SCULPT_TOOL_DISPLACEMENT_ERASER:
|
||||
return alpha * pressure * overlap * feather;
|
||||
|
@ -3532,6 +3533,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
|
|||
mul_v3_v3(offset, ss->cache->scale);
|
||||
mul_v3_fl(offset, bstrength);
|
||||
|
||||
|
||||
/* XXX - this shouldn't be necessary, but sculpting crashes in blender2.8 otherwise
|
||||
* initialize before threads so they can do curve mapping. */
|
||||
BKE_curvemapping_init(brush->curve);
|
||||
|
@ -7222,6 +7224,8 @@ static const char *sculpt_tool_name(Sculpt *sd)
|
|||
return "Fairing Brush";
|
||||
case SCULPT_TOOL_SCENE_PROJECT:
|
||||
return "Scene Project";
|
||||
case SCULPT_TOOL_SYMMETRIZE:
|
||||
return "Symmetrize Brush";
|
||||
}
|
||||
|
||||
return "Sculpting";
|
||||
|
|
|
@ -476,6 +476,7 @@ typedef enum eBrushSculptTool {
|
|||
SCULPT_TOOL_DISPLACEMENT_SMEAR = 32,
|
||||
SCULPT_TOOL_FAIRING = 33,
|
||||
SCULPT_TOOL_SCENE_PROJECT = 34,
|
||||
SCULPT_TOOL_SYMMETRIZE = 35,
|
||||
} eBrushSculptTool;
|
||||
|
||||
/* Brush.uv_sculpt_tool */
|
||||
|
|
|
@ -140,6 +140,7 @@ const EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = {
|
|||
{SCULPT_TOOL_FAIRING, "FAIRING", ICON_BRUSH_MASK, "Fairing", ""},
|
||||
{SCULPT_TOOL_SCENE_PROJECT, "SCENE_PROJECT", ICON_BRUSH_MASK, "Scene Project", ""},
|
||||
{SCULPT_TOOL_DRAW_FACE_SETS, "DRAW_FACE_SETS", ICON_BRUSH_MASK, "Draw Face Sets", ""},
|
||||
{SCULPT_TOOL_SYMMETRIZE, "SYMMETRIZE", ICON_BRUSH_SCULPT_DRAW, "Symmetrize", ""},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
/* clang-format on */
|
||||
|
|
Loading…
Reference in New Issue