style cleanup: mainly sculpt/whitespace

This commit is contained in:
2012-05-11 08:05:47 +00:00
parent dabc22826d
commit ce17c35240
25 changed files with 1249 additions and 1199 deletions

View File

@@ -245,7 +245,7 @@ static int can_pbvh_draw(Object *ob, DerivedMesh *dm)
return cddm->mvert == me->mvert || ob->sculpt->kb;
}
static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
static PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
{
CDDerivedMesh *cddm = (CDDerivedMesh *) dm;

View File

@@ -251,8 +251,8 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
/* apply backface */
const float dot = dot_v3v3(dir, hit_tmp.no);
if (((options & MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE) && dot <= 0.0f) ||
((options & MOD_SHRINKWRAP_CULL_TARGET_BACKFACE) && dot >= 0.0f)
) {
((options & MOD_SHRINKWRAP_CULL_TARGET_BACKFACE) && dot >= 0.0f))
{
return FALSE; /* Ignore hit */
}
}

View File

@@ -244,7 +244,8 @@ static void update_node_vb(PBVH *bvh, PBVHNode *node)
if (node->flag & PBVH_Leaf) {
PBVHVertexIter vd;
BLI_pbvh_vertex_iter_begin(bvh, node, vd, PBVH_ITER_ALL) {
BLI_pbvh_vertex_iter_begin(bvh, node, vd, PBVH_ITER_ALL)
{
BB_expand(&vb, vd.co);
}
BLI_pbvh_vertex_iter_end;

View File

@@ -926,7 +926,8 @@ static int modifier_apply_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev
static EnumPropertyItem modifier_apply_as_items[] = {
{MODIFIER_APPLY_DATA, "DATA", 0, "Object Data", "Apply modifier to the object's data"},
{MODIFIER_APPLY_SHAPE, "SHAPE", 0, "New Shape", "Apply deform-only modifier to a new shape on this object"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
void OBJECT_OT_modifier_apply(wmOperatorType *ot)
{

View File

@@ -368,14 +368,16 @@ void PAINT_OT_hide_show(struct wmOperatorType *ot)
static EnumPropertyItem action_items[] = {
{PARTIALVIS_HIDE, "HIDE", 0, "Hide", "Hide vertices"},
{PARTIALVIS_SHOW, "SHOW", 0, "Show", "Show vertices"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem area_items[] = {
{PARTIALVIS_OUTSIDE, "OUTSIDE", 0, "Outside", "Hide or show vertices outside the selection"},
{PARTIALVIS_INSIDE, "INSIDE", 0, "Inside", "Hide or show vertices inside the selection"},
{PARTIALVIS_ALL, "ALL", 0, "All", "Hide or show all vertices"},
{PARTIALVIS_MASKED, "MASKED", 0, "Masked", "Hide or show vertices that are masked (minimum mask value of 0.5)"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
/* identifiers */
ot->name = "Hide/Show";

View File

@@ -247,7 +247,8 @@ static Brush *brush_tool_toggle(Main *bmain, Brush *brush_orig, const int tool,
return br;
}
else if (brush_orig->toggle_brush &&
BLI_findindex(bmain->brush.first, brush_orig->toggle_brush) != -1) {
BLI_findindex(bmain->brush.first, brush_orig->toggle_brush) != -1)
{
/* if current brush is using the desired tool, try to toggle
back to the previously selected brush (if it was set, and
if it still exists) */

View File

@@ -124,7 +124,7 @@ int ED_sculpt_minmax(bContext *C, float *min, float *max)
/* Sculpt mode handles multires differently from regular meshes, but only if
* it's the last modifier on the stack and it is not on the first level */
struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
{
Mesh *me = (Mesh *)ob->data;
ModifierData *md;
@@ -291,7 +291,8 @@ static void paint_mesh_restore_co(Sculpt *sd, SculptSession *ss)
if (unode) {
PBVHVertexIter vd;
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (unode->type == SCULPT_UNDO_COORDS) {
copy_v3_v3(vd.co, unode->co[vd.i]);
if (vd.no) copy_v3_v3_short(vd.no, unode->no[vd.i]);
@@ -901,7 +902,8 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod
sculpt_brush_test_init(ss, &test);
if (ss->cache->original) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_fast(&test, unode->co[vd.i])) {
float fno[3];
@@ -912,7 +914,8 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod
BLI_pbvh_vertex_iter_end;
}
else {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_fast(&test, vd.co)) {
if (vd.no) {
float fno[3];
@@ -1072,7 +1075,8 @@ static void do_mesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node,
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, vd.co)) {
const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist,
ss->cache->view_normal, vd.no, vd.fno,
@@ -1316,7 +1320,8 @@ static void do_mask_brush_draw(Sculpt *sd, Object *ob, PBVHNode **nodes, int tot
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, vd.co)) {
float fade = tex_strength(ss, brush, vd.co, test.dist,
ss->cache->view_normal, vd.no, vd.fno, 0);
@@ -1373,7 +1378,8 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, vd.co)) {
/* offset vertex */
float fade = tex_strength(ss, brush, vd.co, test.dist,
@@ -1429,7 +1435,8 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, vd.co)) {
/* offset vertex */
const float fade = tex_strength(ss, brush, vd.co, test.dist,
@@ -1471,7 +1478,8 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, vd.co)) {
float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist,
ss->cache->view_normal, vd.no,
@@ -1576,7 +1584,8 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, vd.co)) {
const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist,
an, vd.no, vd.fno, *vd.mask);
@@ -1626,7 +1635,8 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, vd.co)) {
const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist,
an, vd.no, vd.fno, *vd.mask);
@@ -1675,7 +1685,8 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, origco[vd.i])) {
const float fade = bstrength * tex_strength(ss, brush, origco[vd.i], test.dist,
an, origno[vd.i], NULL, *vd.mask);
@@ -1729,7 +1740,8 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, origco[vd.i])) {
const float fade = bstrength * tex_strength(ss, brush, origco[vd.i], test.dist,
an, origno[vd.i], NULL, *vd.mask);
@@ -1782,7 +1794,8 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, origco[vd.i])) {
const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist,
area_normal, vd.no, vd.fno, *vd.mask);
@@ -1834,7 +1847,8 @@ static void do_inflate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test(&test, vd.co)) {
const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist,
ss->cache->view_normal, vd.no, vd.fno, *vd.mask);
@@ -1877,7 +1891,8 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
sculpt_brush_test_init(ss, &test);
if (ss->cache->original) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_fast(&test, unode->co[vd.i])) {
add_v3_v3(private_fc, unode->co[vd.i]);
private_count++;
@@ -1886,7 +1901,8 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
BLI_pbvh_vertex_iter_end;
}
else {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_fast(&test, vd.co)) {
add_v3_v3(private_fc, vd.co);
private_count++;
@@ -1942,7 +1958,8 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
sculpt_brush_test_init(ss, &test);
if (ss->cache->original) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_fast(&test, unode->co[vd.i])) {
/* for area normal */
float fno[3];
@@ -1958,7 +1975,8 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob,
BLI_pbvh_vertex_iter_end;
}
else {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_fast(&test, vd.co)) {
/* for area normal */
if (vd.no) {
@@ -2162,7 +2180,8 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_sq(&test, vd.co)) {
float intr[3];
float val[3];
@@ -2233,7 +2252,8 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_sq(&test, vd.co)) {
if (plane_point_side_flip(vd.co, an, fc, flip)) {
float intr[3];
@@ -2334,7 +2354,8 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_cube(&test, vd.co, mat)) {
if (plane_point_side_flip(vd.co, sn, fc, flip)) {
float intr[3];
@@ -2397,7 +2418,8 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_sq(&test, vd.co)) {
if (plane_point_side(vd.co, an, fc)) {
float intr[3];
@@ -2460,7 +2482,8 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
sculpt_brush_test_init(ss, &test);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
if (sculpt_brush_test_sq(&test, vd.co)) {
if (!plane_point_side(vd.co, an, fc)) {
float intr[3];
@@ -2685,7 +2708,8 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob)
BLI_pbvh_node_get_proxies(nodes[n], &proxies, &proxy_count);
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
float val[3];
int p;
@@ -2755,7 +2779,8 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob)
for (n = 0; n < totnode; n++) {
PBVHVertexIter vd;
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE)
{
sculpt_flush_pbvhvert_deform(ob, &vd);
if (vertCos) {

View File

@@ -484,7 +484,8 @@ static void sculpt_undo_store_coords(Object *ob, SculptUndoNode *unode)
SculptSession *ss = ob->sculpt;
PBVHVertexIter vd;
BLI_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL)
{
copy_v3_v3(unode->co[vd.i], vd.co);
if (vd.no) copy_v3_v3_short(unode->no[vd.i], vd.no);
else normal_float_to_short_v3(unode->no[vd.i], vd.fno);
@@ -522,7 +523,8 @@ static void sculpt_undo_store_mask(Object *ob, SculptUndoNode *unode)
SculptSession *ss = ob->sculpt;
PBVHVertexIter vd;
BLI_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL) {
BLI_pbvh_vertex_iter_begin(ss->pbvh, unode->node, vd, PBVH_ITER_ALL)
{
unode->mask[vd.i] = *vd.mask;
}
BLI_pbvh_vertex_iter_end;

View File

@@ -1210,7 +1210,8 @@ void UV_OT_unwrap(wmOperatorType *ot)
static EnumPropertyItem method_items[] = {
{0, "ANGLE_BASED", 0, "Angle Based", ""},
{1, "CONFORMAL", 0, "Conformal", ""},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
/* identifiers */
ot->name = "Unwrap";

View File

@@ -46,7 +46,8 @@
static EnumPropertyItem prop_direction_items[] = {
{0, "ADD", 0, "Add", "Add effect of brush"},
{BRUSH_DIR_IN, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""},
@@ -67,7 +68,8 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
{SCULPT_TOOL_SMOOTH, "SMOOTH", ICON_BRUSH_SMOOTH, "Smooth", ""},
{SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", ICON_BRUSH_SNAKE_HOOK, "Snake Hook", ""},
{SCULPT_TOOL_THUMB, "THUMB", ICON_BRUSH_THUMB, "Thumb", ""},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
EnumPropertyItem brush_vertex_tool_items[] = {
@@ -78,14 +80,16 @@ EnumPropertyItem brush_vertex_tool_items[] = {
{PAINT_BLEND_BLUR, "BLUR", ICON_BRUSH_BLUR, "Blur", "Blur the color with surrounding values"},
{PAINT_BLEND_LIGHTEN, "LIGHTEN", ICON_BRUSH_LIGHTEN, "Lighten", "Use lighten blending mode while painting"},
{PAINT_BLEND_DARKEN, "DARKEN", ICON_BRUSH_DARKEN, "Darken", "Use darken blending mode while painting"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
EnumPropertyItem brush_image_tool_items[] = {
{PAINT_TOOL_DRAW, "DRAW", ICON_BRUSH_TEXDRAW, "Draw", ""},
{PAINT_TOOL_SOFTEN, "SOFTEN", ICON_BRUSH_SOFTEN, "Soften", ""},
{PAINT_TOOL_SMEAR, "SMEAR", ICON_BRUSH_SMEAR, "Smear", ""},
{PAINT_TOOL_CLONE, "CLONE", ICON_BRUSH_CLONE, "Clone", ""},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
#ifdef RNA_RUNTIME
@@ -308,32 +312,38 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *UNUSED(C), PointerR
PropertyRNA *UNUSED(prop), int *UNUSED(free))
{
static EnumPropertyItem prop_default_items[] = {
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem prop_flatten_contrast_items[] = {
{0, "FLATTEN", 0, "Flatten", "Add effect of brush"},
{BRUSH_DIR_IN, "CONTRAST", 0, "Contrast", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem prop_fill_deepen_items[] = {
{0, "FILL", 0, "Fill", "Add effect of brush"},
{BRUSH_DIR_IN, "DEEPEN", 0, "Deepen", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem prop_scrape_peaks_items[] = {
{0, "SCRAPE", 0, "Scrape", "Add effect of brush"},
{BRUSH_DIR_IN, "PEAKS", 0, "Peaks", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem prop_pinch_magnify_items[] = {
{0, "PINCH", 0, "Pinch", "Add effect of brush"},
{BRUSH_DIR_IN, "MAGNIFY", 0, "Magnify", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem prop_inflate_deflate_items[] = {
{0, "INFLATE", 0, "Inflate", "Add effect of brush"},
{BRUSH_DIR_IN, "DEFLATE", 0, "Deflate", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
Brush *me = (Brush *)(ptr->data);
@@ -386,7 +396,8 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
{MTEX_MAP_MODE_FIXED, "FIXED", 0, "Fixed", ""},
{MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
{MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "BrushTextureSlot", "TextureSlot");
RNA_def_struct_sdna(srna, "MTex");
@@ -458,7 +469,8 @@ static void rna_def_brush(BlenderRNA *brna)
{IMB_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use darken blending mode while painting"},
{IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting"},
{IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem brush_stroke_method_items[] = {
{0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
@@ -466,18 +478,21 @@ static void rna_def_brush(BlenderRNA *brna)
{BRUSH_SPACE, "SPACE", 0, "Space", "Limit brush application to the distance specified by spacing"},
{BRUSH_ANCHORED, "ANCHORED", 0, "Anchored", "Keep the brush anchored to the initial location"},
{BRUSH_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", "Keep applying paint effect while holding mouse (spray)"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem texture_angle_source_items[] = {
{0, "USER", 0, "User", "Rotate the brush texture by given angle"},
{BRUSH_RAKE, "RAKE", 0, "Rake", "Rotate the brush texture to match the stroke direction"},
{BRUSH_RANDOM_ROTATION, "RANDOM", 0, "Random", "Rotate the brush texture at random"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem texture_angle_source_no_random_items[] = {
{0, "USER", 0, "User", "Rotate the brush texture by given angle"},
{BRUSH_RAKE, "RAKE", 0, "Rake", "Rotate the brush texture to match the stroke direction"},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem brush_sculpt_plane_items[] = {
{SCULPT_DISP_DIR_AREA, "AREA", 0, "Area Plane", ""},
@@ -485,12 +500,14 @@ static void rna_def_brush(BlenderRNA *brna)
{SCULPT_DISP_DIR_X, "X", 0, "X Plane", ""},
{SCULPT_DISP_DIR_Y, "Y", 0, "Y Plane", ""},
{SCULPT_DISP_DIR_Z, "Z", 0, "Z Plane", ""},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem brush_mask_tool_items[] = {
{BRUSH_MASK_DRAW, "DRAW", 0, "Draw", ""},
{BRUSH_MASK_SMOOTH, "SMOOTH", 0, "Smooth", ""},
{0, NULL, 0, NULL, NULL}};
{0, NULL, 0, NULL, NULL}
};
srna = RNA_def_struct(brna, "Brush", "ID");
RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting");