Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-06 04:08:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-06 04:39:51 +0300
commita90bcdf93d82bf5d9964b12bb20af696ca66654e (patch)
treee57a15e78d957955db370ad8a8591d024de57b8f /source/blender/makesrna/intern/rna_brush.c
parent29dfe9a61456dba8c8e4cdae0a90cfa3eef1cd2a (diff)
Tool System: use tool type enum to access brushes
Previously the brush names were used which had the limit that: - Brush names that were deleted wouldn't show up in the toolbar. - Naming collisions between user defined brushes and existing tools broke tool selection. Now brushes are created as needed when tools are selected. Note, vertex/weight paint combine tool and blend modes, this should be split out into a separate enum.
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 0bcb29fe860..ac41666a79f 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -124,14 +124,14 @@ const EnumPropertyItem rna_enum_brush_image_tool_items[] = {
{0, NULL, 0, NULL, NULL}
};
-#ifndef RNA_RUNTIME
-static EnumPropertyItem rna_enum_gpencil_brush_types_items[] = {
+const EnumPropertyItem rna_enum_brush_gpencil_types_items[] = {
{GPAINT_TOOL_DRAW, "DRAW", ICON_GP_STROKE, "Draw", "The brush is of type used for drawing strokes"},
{GPAINT_TOOL_FILL, "FILL", ICON_COLOR, "Fill", "The brush is of type used for filling areas"},
{GPAINT_TOOL_ERASE, "ERASE", ICON_PANEL_CLOSE, "Erase", "The brush is used for erasing strokes"},
{0, NULL, 0, NULL, NULL}
};
+#ifndef RNA_RUNTIME
static EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items[] = {
{ GP_BRUSH_ERASER_SOFT, "SOFT", 0, "Soft", "Use soft eraser" },
{ GP_BRUSH_ERASER_HARD, "HARD", 0, "Hard", "Use hard eraser" },
@@ -1360,7 +1360,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop = RNA_def_property(srna, "gpencil_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gpencil_tool");
- RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_types_items);
+ RNA_def_property_enum_items(prop, rna_enum_brush_gpencil_types_items);
RNA_def_property_ui_text(prop, "Type", "Category of the brush");
RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);