diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-11 17:07:04 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-11 17:07:24 +0300 |
commit | f7e131a6acd800a311e50b680e5be6d9824a1df7 (patch) | |
tree | 30cbe9ff93d0e59d806df735a83ba0f3d4df99a1 /source/blender/blenloader/intern/writefile.c | |
parent | b7bac19acaa41567967a43ae8aa8756e23f27a83 (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/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index e671e102f0b..6031400684c 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2316,6 +2316,12 @@ static void write_view_settings(WriteData *wd, ColorManagedViewSettings *view_se } } +static void write_paint(WriteData *wd, Paint *p) +{ + if (p->cavity_curve) + write_curvemapping(wd, p->cavity_curve); +} + static void write_scenes(WriteData *wd, ListBase *scebase) { Scene *sce; @@ -2351,18 +2357,22 @@ static void write_scenes(WriteData *wd, ListBase *scebase) writestruct(wd, DATA, "ToolSettings", 1, tos); if (tos->vpaint) { writestruct(wd, DATA, "VPaint", 1, tos->vpaint); + write_paint (wd, &tos->vpaint->paint); } if (tos->wpaint) { writestruct(wd, DATA, "VPaint", 1, tos->wpaint); + write_paint (wd, &tos->wpaint->paint); } if (tos->sculpt) { writestruct(wd, DATA, "Sculpt", 1, tos->sculpt); + write_paint (wd, &tos->sculpt->paint); } if (tos->uvsculpt) { writestruct(wd, DATA, "UvSculpt", 1, tos->uvsculpt); + write_paint (wd, &tos->uvsculpt->paint); } - // write_paint(wd, &tos->imapaint.paint); + write_paint(wd, &tos->imapaint.paint); ed= sce->ed; if (ed) { @@ -3069,7 +3079,7 @@ static void write_brushes(WriteData *wd, ListBase *idbase) if (brush->curve) write_curvemapping(wd, brush->curve); - if (brush->curve) + if (brush->gradient) writestruct(wd, DATA, "ColorBand", 1, brush->gradient); } } |