Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_brush.c
| Show First 20 Lines • Show All 1,559 Lines • ▼ Show 20 Lines | static void rna_def_brush(BlenderRNA *brna) | ||||
| }; | }; | ||||
| static const EnumPropertyItem brush_size_unit_items[] = { | static const EnumPropertyItem brush_size_unit_items[] = { | ||||
| {0, "VIEW", 0, "View", "Measure brush size relative to the view"}, | {0, "VIEW", 0, "View", "Measure brush size relative to the view"}, | ||||
| {BRUSH_LOCK_SIZE, "SCENE", 0, "Scene", "Measure brush size relative to the scene"}, | {BRUSH_LOCK_SIZE, "SCENE", 0, "Scene", "Measure brush size relative to the scene"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem brush_curve_preset_items[] = { | |||||
| {BRUSH_CURVE_CUSTOM, "CUSTOM", 0, "Custom", ""}, | |||||
| {BRUSH_CURVE_SMOOTH, "SMOOTH", 0, "Smooth", ""}, | |||||
| {BRUSH_CURVE_SPHERE, "SPHERE", 0, "Sphere", ""}, | |||||
| {BRUSH_CURVE_ROOT, "ROOT", 0, "Root", ""}, | |||||
| {BRUSH_CURVE_SHARP, "SHARP", 0, "Sharp", ""}, | |||||
| {BRUSH_CURVE_LIN, "LIN", 0, "Linear", ""}, | |||||
| {BRUSH_CURVE_POW4, "POW4", 0, "Sharper", ""}, | |||||
| {BRUSH_CURVE_INVSQUARE, "INVSQUARE", 0, "Inverse square", ""}, | |||||
| {BRUSH_CURVE_CONSTANT, "CONSTANT", 0, "Constant", ""}, | |||||
brecht: Could we use the same icons as proportional editing here?
Without seeing the resulting curve… | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| srna = RNA_def_struct(brna, "Brush", "ID"); | srna = RNA_def_struct(brna, "Brush", "ID"); | ||||
| RNA_def_struct_ui_text( | RNA_def_struct_ui_text( | ||||
| srna, "Brush", "Brush data-block for storing brush settings for painting and sculpting"); | srna, "Brush", "Brush data-block for storing brush settings for painting and sculpting"); | ||||
| RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA); | RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA); | ||||
| /* enums */ | /* enums */ | ||||
| prop = RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, prop_blend_items); | RNA_def_property_enum_items(prop, prop_blend_items); | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | static void rna_def_brush(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Sculpt Plane", ""); | RNA_def_property_ui_text(prop, "Sculpt Plane", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "mask_tool", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "mask_tool", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, brush_mask_tool_items); | RNA_def_property_enum_items(prop, brush_mask_tool_items); | ||||
| RNA_def_property_ui_text(prop, "Mask Tool", ""); | RNA_def_property_ui_text(prop, "Mask Tool", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "curve_preset", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, brush_curve_preset_items); | |||||
| RNA_def_property_ui_text(prop, "Curve Preset", ""); | |||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | |||||
| /* number values */ | /* number values */ | ||||
| prop = RNA_def_property(srna, "size", PROP_INT, PROP_PIXEL); | prop = RNA_def_property(srna, "size", PROP_INT, PROP_PIXEL); | ||||
| RNA_def_property_int_funcs(prop, NULL, "rna_Brush_set_size", NULL); | RNA_def_property_int_funcs(prop, NULL, "rna_Brush_set_size", NULL); | ||||
| RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS * 10); | RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS * 10); | ||||
| RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, -1); | RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, -1); | ||||
| RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels"); | RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_size_update"); | RNA_def_property_update(prop, 0, "rna_Brush_size_update"); | ||||
| ▲ Show 20 Lines • Show All 688 Lines • Show Last 20 Lines | |||||
Could we use the same icons as proportional editing here?
Without seeing the resulting curve it's not immediately obvious what kind of shape you're selecting, the icons help with that.