Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2013-09-14 04:35:41 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-09-14 04:35:41 +0400
commit9f87d9963eb8c5320c07429c1590beff54658440 (patch)
tree04edccfe959e293e5fe3ae81b9646dc09c291708 /source/blender
parent157656593206647499d0dedb66b2a483a5900a3b (diff)
fix weird issue after last commit where grab brush would not work and
also warnings fix and description fix.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/brush.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c8
-rw-r--r--source/blender/makesrna/intern/rna_brush.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 0c79b8860d9..7864216f39e 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -1051,5 +1051,5 @@ struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary)
bool BKE_sculpt_brush_frontface_only(struct Brush *br)
{
- return br->sculpt_tool != SCULPT_TOOL_CLAY_STRIPS;
+ return br->sculpt_tool == SCULPT_TOOL_CLAY_STRIPS;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 03e5e6672bf..a7d851d7a67 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -951,7 +951,7 @@ static float tex_strength(SculptSession *ss, Brush *br,
const float fno[3],
const float mask)
{
- const StrokeCache *cache = ss->cache;
+ StrokeCache *cache = ss->cache;
const Scene *scene = cache->vc->scene;
MTex *mtex = &br->mtex;
float avg = 1;
@@ -1289,13 +1289,13 @@ static void update_brush_local_mat(Sculpt *sd, Object *ob)
/* Test whether the StrokeCache.sculpt_normal needs update in
* do_brush_action() */
-static int brush_needs_sculpt_normal(const Brush *brush)
+static int brush_needs_sculpt_normal(const Brush *brush, SculptSession *ss)
{
return ((ELEM(brush->sculpt_tool,
SCULPT_TOOL_GRAB,
SCULPT_TOOL_SNAKE_HOOK) &&
((brush->normal_weight > 0) ||
- (brush->flag & BRUSH_FRONTFACE))) ||
+ ss->cache->frontface)) ||
ELEM7(brush->sculpt_tool,
SCULPT_TOOL_BLOB,
@@ -3139,7 +3139,7 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush)
BKE_pbvh_node_mark_update(nodes[n]);
}
- if (brush_needs_sculpt_normal(brush))
+ if (brush_needs_sculpt_normal(brush, ss))
update_sculpt_normal(sd, ob, nodes, totnode);
if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_AREA)
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 820a4605052..78a1e7aa368 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -240,7 +240,7 @@ static int rna_SculptToolCapabilities_has_strength_get(PointerRNA *ptr)
static int rna_SculptToolCapabilities_has_frontface_get(PointerRNA *ptr)
{
Brush *br = (Brush *)ptr->data;
- return BKE_sculpt_brush_frontface_only(br);
+ return !BKE_sculpt_brush_frontface_only(br);
}
static int rna_BrushCapabilities_has_texture_angle_get(PointerRNA *ptr)
@@ -562,7 +562,7 @@ static void rna_def_sculpt_capabilities(BlenderRNA *brna)
SCULPT_TOOL_CAPABILITY(has_smooth_stroke, "Has Smooth Stroke");
SCULPT_TOOL_CAPABILITY(has_space_attenuation, "Has Space Attenuation");
SCULPT_TOOL_CAPABILITY(has_strength, "Has Strength");
- SCULPT_TOOL_CAPABILITY(has_frontface, "Has Strength");
+ SCULPT_TOOL_CAPABILITY(has_frontface, "Has Front Facing");
#undef SCULPT_CAPABILITY
}