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/makesrna/intern/rna_sculpt_paint.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/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index d9e991d15a3..09307674f5c 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -475,6 +475,17 @@ static void rna_def_paint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Symmetry Feathering", "Reduce the strength of the brush where it overlaps symmetrical daubs"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "cavity_curve", PROP_POINTER, PROP_NONE); + RNA_def_property_flag(prop, PROP_NEVER_NULL); + RNA_def_property_ui_text(prop, "Curve", "Editable cavity curve"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "use_cavity", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_USE_CAVITY_MASK); + RNA_def_property_ui_text(prop, "Cavity Mask", "Mask painting according to mesh geometry cavity"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + } static void rna_def_sculpt(BlenderRNA *brna) @@ -682,16 +693,6 @@ static void rna_def_image_paint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Stencil Layer", "Set the mask layer from the UV map buttons"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_ImaPaint_viewport_update"); - prop = RNA_def_property(srna, "use_cavity", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_CAVITY); - RNA_def_property_ui_text(prop, "Cavity Mask", "Mask painting according to mesh geometry cavity"); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - - prop = RNA_def_property(srna, "invert_cavity", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_CAVITY_INV); - RNA_def_property_ui_text(prop, "Invert Cavity", "Painting inside cavity instead of outside"); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - prop = RNA_def_property(srna, "invert_stencil", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_STENCIL_INV); RNA_def_property_ui_text(prop, "Invert", "Invert the stencil layer"); @@ -725,11 +726,6 @@ static void rna_def_image_paint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Dither", "Amount of dithering when painting on byte images"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - prop = RNA_def_property(srna, "cavity_mul", PROP_FLOAT, PROP_NONE); - RNA_def_property_range(prop, 0.0, 1.0); - RNA_def_property_ui_text(prop, "Cavity Factor", "Factor for cavity effect"); - RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); - prop = RNA_def_property(srna, "use_clone_layer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_CLONE); RNA_def_property_ui_text(prop, "Clone Map", |