Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_brush.c
| Show First 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | const EnumPropertyItem rna_enum_brush_gpencil_weight_types_items[] = { | ||||
| {GPWEIGHT_TOOL_DRAW, | {GPWEIGHT_TOOL_DRAW, | ||||
| "WEIGHT", | "WEIGHT", | ||||
| ICON_GPBRUSH_WEIGHT, | ICON_GPBRUSH_WEIGHT, | ||||
| "Weight", | "Weight", | ||||
| "Weight Paint for Vertex Groups"}, | "Weight Paint for Vertex Groups"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| const EnumPropertyItem rna_enum_brush_heightmap_sculpt_types_items[] = { | |||||
| {HM_TOOL_WATER, "WATER", ICON_NONE, "water", "add/remove water on heightmap"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| #ifndef RNA_RUNTIME | #ifndef RNA_RUNTIME | ||||
| static EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items[] = { | static EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items[] = { | ||||
| {GP_BRUSH_ERASER_SOFT, | {GP_BRUSH_ERASER_SOFT, | ||||
| "SOFT", | "SOFT", | ||||
| 0, | 0, | ||||
| "Dissolve", | "Dissolve", | ||||
| "Erase strokes, fading their points strength and thickness"}, | "Erase strokes, fading their points strength and thickness"}, | ||||
| {GP_BRUSH_ERASER_HARD, "HARD", 0, "Point", "Erase stroke points"}, | {GP_BRUSH_ERASER_HARD, "HARD", 0, "Point", "Erase stroke points"}, | ||||
| ▲ Show 20 Lines • Show All 604 Lines • ▼ Show 20 Lines | case PAINT_MODE_SCULPT: | ||||
| return prop_pinch_magnify_items; | return prop_pinch_magnify_items; | ||||
| case SCULPT_TOOL_INFLATE: | case SCULPT_TOOL_INFLATE: | ||||
| return prop_inflate_deflate_items; | return prop_inflate_deflate_items; | ||||
| default: | default: | ||||
| return DummyRNA_DEFAULT_items; | return DummyRNA_DEFAULT_items; | ||||
| } | } | ||||
| case PAINT_MODE_SCULPT_HEIGHTMAP: | |||||
| case HM_TOOL_WATER: | |||||
| return prop_direction_items; | |||||
| case PAINT_MODE_TEXTURE_2D: | case PAINT_MODE_TEXTURE_2D: | ||||
| case PAINT_MODE_TEXTURE_3D: | case PAINT_MODE_TEXTURE_3D: | ||||
| switch (me->imagepaint_tool) { | switch (me->imagepaint_tool) { | ||||
| case PAINT_TOOL_SOFTEN: | case PAINT_TOOL_SOFTEN: | ||||
| return prop_soften_sharpen_items; | return prop_soften_sharpen_items; | ||||
| default: | default: | ||||
| ▲ Show 20 Lines • Show All 1,432 Lines • ▼ Show 20 Lines | static void rna_def_brush(BlenderRNA *brna) | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| prop = RNA_def_property(srna, "gpencil_weight_tool", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "gpencil_weight_tool", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "gpencil_weight_tool"); | RNA_def_property_enum_sdna(prop, NULL, "gpencil_weight_tool"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_brush_gpencil_weight_types_items); | RNA_def_property_enum_items(prop, rna_enum_brush_gpencil_weight_types_items); | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil Weight Paint Tool", ""); | RNA_def_property_ui_text(prop, "Grease Pencil Weight Paint Tool", ""); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| prop = RNA_def_property(srna, "heightmap_sculpt_tool", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "heightmap_sculpt_tool"); | |||||
| RNA_def_property_enum_items(prop, rna_enum_brush_heightmap_sculpt_types_items); | |||||
| RNA_def_property_ui_text(prop, "HeightMap Sculpt Tool", ""); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| /** End per mode tool properties. */ | /** End per mode tool properties. */ | ||||
| prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | ||||
| RNA_def_property_enum_items(prop, prop_direction_items); | RNA_def_property_enum_items(prop, prop_direction_items); | ||||
| RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Brush_direction_itemf"); | RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Brush_direction_itemf"); | ||||
| RNA_def_property_ui_text(prop, "Direction", ""); | RNA_def_property_ui_text(prop, "Direction", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| ▲ Show 20 Lines • Show All 1,248 Lines • Show Last 20 Lines | |||||