diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-23 18:26:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-01-11 18:00:23 +0300 |
commit | b98e6743dcaf8ec513bbbadc0015cb8729a72a18 (patch) | |
tree | 6eca66c816ff25cbe91b31a7a370ed0efcef723c /source/blender/makesrna/intern/rna_sculpt_paint.c | |
parent | 9177bb33f68f66609b29e1e53a90552cae8026b3 (diff) |
Texture Paint: Add filtering option for texture paint overlay
The overlay should now use the texture interpolation setting in material
mode.
In image mode, there is now a new button to let the user choose the texture
filter. The option is located in the Texture Slots popover and only shows
in Image mode.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 581b0e94aad..f9f21c4c76a 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -872,6 +872,14 @@ static void rna_def_image_paint(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; + static const EnumPropertyItem paint_interp_items[] = { + {IMAGEPAINT_INTERP_LINEAR, "LINEAR", 0, + "Linear", "Linear interpolation"}, + {IMAGEPAINT_INTERP_CLOSEST, "CLOSEST", 0, + "Closest", "No interpolation (sample closest texel)"}, + {0, NULL, 0, NULL, NULL} + }; + srna = RNA_def_struct(brna, "ImagePaint", "Paint"); RNA_def_struct_sdna(srna, "ImagePaintSettings"); RNA_def_struct_path_func(srna, "rna_ImagePaintSettings_path"); @@ -964,6 +972,13 @@ static void rna_def_image_paint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Mode", "Mode of operation for projection painting"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_ImaPaint_mode_update"); + prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "interp"); + RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); + RNA_def_property_enum_items(prop, paint_interp_items); + RNA_def_property_ui_text(prop, "Interpolation", "Texture filtering type"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_ImaPaint_mode_update"); + /* Missing data */ prop = RNA_def_property(srna, "missing_uvs", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "missing_data", IMAGEPAINT_MISSING_UVS); |