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>2015-02-11 17:07:04 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-02-11 17:07:24 +0300
commitf7e131a6acd800a311e50b680e5be6d9824a1df7 (patch)
tree30cbe9ff93d0e59d806df735a83ba0f3d4df99a1 /source/blender/editors/sculpt_paint/paint_stroke.c
parentb7bac19acaa41567967a43ae8aa8756e23f27a83 (diff)
Cavity masking - add curve control to cavity mask and move relevant
structs to paint struct (might be useful for vertex paint too in the future) Cavity masking now has a curve control. The control will set the amount of masking for positive cavity ("pointness") or negative cavity ("cavity") with x axis being the amount of cavity and 0.0 = full cavity, 1.0 = full pointness, 0.5 = no cavity and the y axis being the amount of alpha.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index d9d0d8f5ef6..bfd429d0924 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -651,7 +651,8 @@ PaintStroke *paint_stroke_new(bContext *C,
PaintStroke *stroke = MEM_callocN(sizeof(PaintStroke), "PaintStroke");
ToolSettings *toolsettings = CTX_data_tool_settings(C);
UnifiedPaintSettings *ups = &toolsettings->unified_paint_settings;
- Brush *br = stroke->brush = BKE_paint_brush(BKE_paint_get_active_from_context(C));
+ Paint *p = BKE_paint_get_active_from_context(C);
+ Brush *br = stroke->brush = BKE_paint_brush(p);
float zoomx, zoomy;
view3d_set_viewcontext(C, &stroke->vc);
@@ -683,10 +684,11 @@ PaintStroke *paint_stroke_new(bContext *C,
zero_v3(ups->average_stroke_accum);
ups->average_stroke_counter = 0;
-
/* initialize here to avoid initialization conflict with threaded strokes */
curvemapping_initialize(br->curve);
-
+ if (p->flags & PAINT_USE_CAVITY_MASK)
+ curvemapping_initialize(p->cavity_curve);
+
BKE_paint_set_overlay_override(br->overlay_flags);
return stroke;