Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_brush.c
| Show First 20 Lines • Show All 263 Lines • ▼ Show 20 Lines | static EnumPropertyItem rna_enum_gpencil_brush_eraser_modes_items[] = { | ||||
| 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"}, | ||||
| {GP_BRUSH_ERASER_STROKE, "STROKE", 0, "Stroke", "Erase entire strokes"}, | {GP_BRUSH_ERASER_STROKE, "STROKE", 0, "Stroke", "Erase entire strokes"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static EnumPropertyItem rna_enum_gpencil_brush_caps_types_items[] = { | |||||
HooglyBoogly: This enum can be defined directly in the function that uses it, like `gppaint_mode_types_items` | |||||
| {GP_BRUSH_CAPS_ROUNDED, "ROUNDED", 0, "Rounded", ""}, | |||||
HooglyBooglyUnsubmitted Done Inline ActionsI'd suggest "Round" instead of "Rounded" here, it's just a bit simpler, and more similar to "Flat" HooglyBoogly: I'd suggest "Round" instead of "Rounded" here, it's just a bit simpler, and more similar to… | |||||
| {GP_BRUSH_CAPS_FLAT, "FLAT", 0, "Flat", ""}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| static EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items[] = { | static EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items[] = { | ||||
| {GP_FILL_DMODE_BOTH, | {GP_FILL_DMODE_BOTH, | ||||
| "BOTH", | "BOTH", | ||||
| 0, | 0, | ||||
| "All", | "All", | ||||
| "Use both visible strokes and edit lines as fill boundary limits"}, | "Use both visible strokes and edit lines as fill boundary limits"}, | ||||
| {GP_FILL_DMODE_STROKE, "STROKE", 0, "Strokes", "Use visible strokes as fill boundary limits"}, | {GP_FILL_DMODE_STROKE, "STROKE", 0, "Strokes", "Use visible strokes as fill boundary limits"}, | ||||
| {GP_FILL_DMODE_CONTROL, "CONTROL", 0, "Edit Lines", "Use edit lines as fill boundary limits"}, | {GP_FILL_DMODE_CONTROL, "CONTROL", 0, "Edit Lines", "Use edit lines as fill boundary limits"}, | ||||
| ▲ Show 20 Lines • Show All 1,465 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_options(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "eraser_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "eraser_mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "eraser_mode"); | RNA_def_property_enum_sdna(prop, NULL, "eraser_mode"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_eraser_modes_items); | RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_eraser_modes_items); | ||||
| RNA_def_property_ui_text(prop, "Mode", "Eraser Mode"); | RNA_def_property_ui_text(prop, "Mode", "Eraser Mode"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update( | RNA_def_property_update( | ||||
| prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_eraser_mode_update"); | prop, NC_GPENCIL | ND_DATA, "rna_BrushGpencilSettings_eraser_mode_update"); | ||||
| prop = RNA_def_property(srna, "caps_type", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "caps_type"); | |||||
| RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_caps_types_items); | |||||
| RNA_def_property_ui_text(prop, "Caps Type", "Stroke End Caps type"); | |||||
HooglyBooglyUnsubmitted Done Inline ActionsIn most cases only the first letter of the UI description should be capitalized. Additionally, the description is not useful here. We have to take care to imagine the perspective of someone who hadn't seen this before. HooglyBoogly: In most cases only the first letter of the UI description should be capitalized.
Additionally… | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
HooglyBooglyUnsubmitted Done Inline ActionsThis property is missing RNA_def_property_update HooglyBoogly: This property is missing `RNA_def_property_update` | |||||
antoniovAuthorUnsubmitted Done Inline ActionsDon't need update...it's only for new strokes antoniov: Don't need update...it's only for new strokes | |||||
| prop = RNA_def_property(srna, "fill_draw_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "fill_draw_mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "fill_draw_mode"); | RNA_def_property_enum_sdna(prop, NULL, "fill_draw_mode"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_gpencil_fill_draw_modes_items); | RNA_def_property_enum_items(prop, rna_enum_gpencil_fill_draw_modes_items); | ||||
| RNA_def_property_ui_text(prop, "Mode", "Mode to draw boundary limits"); | RNA_def_property_ui_text(prop, "Mode", "Mode to draw boundary limits"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| prop = RNA_def_property(srna, "fill_layer_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "fill_layer_mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "fill_layer_mode"); | RNA_def_property_enum_sdna(prop, NULL, "fill_layer_mode"); | ||||
| ▲ Show 20 Lines • Show All 1,811 Lines • Show Last 20 Lines | |||||
This enum can be defined directly in the function that uses it, like gppaint_mode_types_items