4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * Contributor(s): Campbell Barton
22 * ***** END GPL LICENSE BLOCK *****
27 #include "RNA_define.h"
28 #include "RNA_types.h"
30 #include "rna_internal.h"
32 #include "DNA_scene_types.h"
38 void RNA_def_vpaint(BlenderRNA *brna)
42 static EnumPropertyItem prop_mode_items[] = {
43 {0, "MIX", "Mix", "Use mix blending mode while painting."},
44 {1, "ADD", "Add", "Use add blending mode while painting."},
45 {2, "SUB", "Subtract", "Use subtract blending mode while painting."},
46 {3, "MUL", "Multiply", "Use multiply blending mode while painting."},
47 {4, "BLUR", "Blur", "Blur the color with surrounding values"},
48 {5, "LIGHTEN", "Lighten", "Use lighten blending mode while painting."},
49 {6, "DARKEN", "Darken", "Use darken blending mode while painting."},
50 {0, NULL, NULL, NULL}};
52 srna= RNA_def_struct(brna, "VPaint", NULL);
53 RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of the Vpaint tool.");
55 prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
56 RNA_def_property_enum_items(prop, prop_mode_items);
57 RNA_def_property_ui_text(prop, "Brush Mode", "The Mode in which color is painted.");
59 prop= RNA_def_property(srna, "all_faces", PROP_BOOLEAN, PROP_NONE);
60 RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_AREA);
61 RNA_def_property_ui_text(prop, "All Faces", "Paint on all faces inside brush.");
63 prop= RNA_def_property(srna, "vertex_dist", PROP_BOOLEAN, PROP_NONE);
64 RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_SOFT);
65 RNA_def_property_ui_text(prop, "Vertex Dist", "Use distances to vertices (instead of paint entire faces).");
67 prop= RNA_def_property(srna, "normals", PROP_BOOLEAN, PROP_NONE);
68 RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_NORMALS);
69 RNA_def_property_ui_text(prop, "Normals", "Applies the vertex normal before painting.");
71 prop= RNA_def_property(srna, "spray", PROP_BOOLEAN, PROP_NONE);
72 RNA_def_property_boolean_sdna(prop, NULL, "flag", VP_SPRAY);
73 RNA_def_property_ui_text(prop, "Spray", "Keep applying paint effect while holding mouse.");
75 prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
76 RNA_def_property_range(prop, 0.1f, 5.0f);
77 RNA_def_property_ui_text(prop, "Gamma", "Vpaint Gamma.");
79 prop= RNA_def_property(srna, "mul", PROP_FLOAT, PROP_NONE);
80 RNA_def_property_range(prop, 0.1f, 50.0f);
81 RNA_def_property_ui_text(prop, "Mul", "Vpaint Mul.");