Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_brush.c
| Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | static EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items[] = { | ||||
| "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"}, | ||||
| {0, NULL, 0, NULL, NULL}}; | {0, NULL, 0, NULL, NULL}}; | ||||
| static EnumPropertyItem rna_enum_gpencil_fill_extend_modes_items[] = { | |||||
| {GP_FILL_EMODE_RADIUS, "RADIUS", 0, "Radius", "Connect endpoints that are close together"}, | |||||
| {GP_FILL_EMODE_EXTEND, "EXTEND", 0, "Extend", "Extend strokes in straight lines"}, | |||||
| {0, NULL, 0, NULL, NULL}}; | |||||
| static EnumPropertyItem rna_enum_gpencil_fill_layers_modes_items[] = { | static EnumPropertyItem rna_enum_gpencil_fill_layers_modes_items[] = { | ||||
| {GP_FILL_GPLMODE_VISIBLE, "VISIBLE", 0, "Visible", "Visible layers"}, | {GP_FILL_GPLMODE_VISIBLE, "VISIBLE", 0, "Visible", "Visible layers"}, | ||||
| {GP_FILL_GPLMODE_ACTIVE, "ACTIVE", 0, "Active", "Only active layer"}, | {GP_FILL_GPLMODE_ACTIVE, "ACTIVE", 0, "Active", "Only active layer"}, | ||||
| {GP_FILL_GPLMODE_ABOVE, "ABOVE", 0, "Layer Above", "Layer above active"}, | {GP_FILL_GPLMODE_ABOVE, "ABOVE", 0, "Layer Above", "Layer above active"}, | ||||
| {GP_FILL_GPLMODE_BELOW, "BELOW", 0, "Layer Below", "Layer below active"}, | {GP_FILL_GPLMODE_BELOW, "BELOW", 0, "Layer Below", "Layer below active"}, | ||||
| {GP_FILL_GPLMODE_ALL_ABOVE, "ALL_ABOVE", 0, "All Above", "All layers above active"}, | {GP_FILL_GPLMODE_ALL_ABOVE, "ALL_ABOVE", 0, "All Above", "All layers above active"}, | ||||
| {GP_FILL_GPLMODE_ALL_BELOW, "ALL_BELOW", 0, "All Below", "All layers below active"}, | {GP_FILL_GPLMODE_ALL_BELOW, "ALL_BELOW", 0, "All Below", "All layers below active"}, | ||||
| {0, NULL, 0, NULL, NULL}}; | {0, NULL, 0, NULL, NULL}}; | ||||
| ▲ Show 20 Lines • Show All 1,184 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_options(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "fill_threshold"); | RNA_def_property_float_sdna(prop, NULL, "fill_threshold"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Threshold", "Threshold to consider color transparent for filling"); | prop, "Threshold", "Threshold to consider color transparent for filling"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* fill leak size */ | |||||
| prop = RNA_def_property(srna, "fill_leak", PROP_INT, PROP_PIXEL); | |||||
| RNA_def_property_int_sdna(prop, NULL, "fill_leak"); | |||||
| RNA_def_property_range(prop, 0, 100); | |||||
| RNA_def_property_ui_text(prop, "Leak Size", "Size in pixels to consider the leak closed"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* fill factor size */ | /* fill factor size */ | ||||
| prop = RNA_def_property(srna, "fill_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "fill_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "fill_factor"); | RNA_def_property_float_sdna(prop, NULL, "fill_factor"); | ||||
| RNA_def_property_range(prop, GPENCIL_MIN_FILL_FAC, GPENCIL_MAX_FILL_FAC); | RNA_def_property_range(prop, GPENCIL_MIN_FILL_FAC, GPENCIL_MAX_FILL_FAC); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, | prop, | ||||
| "Precision", | "Precision", | ||||
| "Factor for fill boundary accuracy, higher values are more accurate but slower"); | "Factor for fill boundary accuracy, higher values are more accurate but slower"); | ||||
| ▲ Show 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_options(BlenderRNA *brna) | ||||
| RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | ||||
| /* Factor to extend stroke extremes in Fill tool. */ | /* Factor to extend stroke extremes in Fill tool. */ | ||||
| prop = RNA_def_property(srna, "extend_stroke_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "extend_stroke_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "fill_extend_fac"); | RNA_def_property_float_sdna(prop, NULL, "fill_extend_fac"); | ||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | RNA_def_property_range(prop, 0.0f, 10.0f); | ||||
| RNA_def_property_float_default(prop, 0.0f); | RNA_def_property_float_default(prop, 0.0f); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Stroke Extension", "Strokes end extension for closing gaps, use zero to disable"); | prop, "Closure Size", "Strokes end extension for closing gaps, use zero to disable"); | ||||
| RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | |||||
| prop = RNA_def_property(srna, "fill_extend_mode", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "fill_extend_mode"); | |||||
| RNA_def_property_enum_items(prop, rna_enum_gpencil_fill_extend_modes_items); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Closure Mode", "Types of stroke extensions used for closing gaps"); | |||||
| RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | ||||
| /* Number of pixels to dilate fill area. Negative values contract the filled area. */ | /* Number of pixels to dilate fill area. Negative values contract the filled area. */ | ||||
| prop = RNA_def_property(srna, "dilate", PROP_INT, PROP_PIXEL); | prop = RNA_def_property(srna, "dilate", PROP_INT, PROP_PIXEL); | ||||
| RNA_def_property_int_sdna(prop, NULL, "dilate_pixels"); | RNA_def_property_int_sdna(prop, NULL, "dilate_pixels"); | ||||
| RNA_def_property_range(prop, -40, 40); | RNA_def_property_range(prop, -40, 40); | ||||
| RNA_def_property_int_default(prop, 1); | RNA_def_property_int_default(prop, 1); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| ▲ Show 20 Lines • Show All 2,095 Lines • Show Last 20 Lines | |||||