diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-10 22:22:25 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-10 22:23:43 +0300 |
commit | a3b7f83cb54a9bafe3ed2156d7cda3a1b758792b (patch) | |
tree | 62372a0d1349e4f01f2ca4a7fe13aea2032cddc3 /source/blender/makesrna | |
parent | 13ad69c68e25346c6530e87d69eafded4d62dadc (diff) |
Cavity mask support for texture painting.
Title says it all, options can be found in the options panel,
A slider controls the amount of cavity masking that is applied while
it's also possible to invert the mask and paint outside or inside
cavities.
Again we might greatly benefit from caching of the cavity result, but
that should only affect startup time for the stroke.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 0a282eeb7ac..d9e991d15a3 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -681,7 +681,17 @@ static void rna_def_image_paint(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", IMAGEPAINT_PROJECT_LAYER_STENCIL); 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"); @@ -715,6 +725,11 @@ 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", |