Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_brush.c
| Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
| EnumPropertyItem rna_enum_brush_vertex_tool_items[] = { | EnumPropertyItem rna_enum_brush_vertex_tool_items[] = { | ||||
| {PAINT_BLEND_MIX, "MIX", ICON_BRUSH_MIX, "Mix", "Use mix blending mode while painting"}, | {PAINT_BLEND_MIX, "MIX", ICON_BRUSH_MIX, "Mix", "Use mix blending mode while painting"}, | ||||
| {PAINT_BLEND_ADD, "ADD", ICON_BRUSH_ADD, "Add", "Use add blending mode while painting"}, | {PAINT_BLEND_ADD, "ADD", ICON_BRUSH_ADD, "Add", "Use add blending mode while painting"}, | ||||
| {PAINT_BLEND_SUB, "SUB", ICON_BRUSH_SUBTRACT, "Subtract", "Use subtract blending mode while painting"}, | {PAINT_BLEND_SUB, "SUB", ICON_BRUSH_SUBTRACT, "Subtract", "Use subtract blending mode while painting"}, | ||||
| {PAINT_BLEND_MUL, "MUL", ICON_BRUSH_MULTIPLY, "Multiply", "Use multiply blending mode while painting"}, | {PAINT_BLEND_MUL, "MUL", ICON_BRUSH_MULTIPLY, "Multiply", "Use multiply blending mode while painting"}, | ||||
| {PAINT_BLEND_BLUR, "BLUR", ICON_BRUSH_BLUR, "Blur", "Blur the color with surrounding values"}, | {PAINT_BLEND_BLUR, "BLUR", ICON_BRUSH_BLUR, "Blur", "Blur the color with surrounding values"}, | ||||
| {PAINT_BLEND_LIGHTEN, "LIGHTEN", ICON_BRUSH_LIGHTEN, "Lighten", "Use lighten blending mode while painting"}, | {PAINT_BLEND_LIGHTEN, "LIGHTEN", ICON_BRUSH_LIGHTEN, "Lighten", "Use lighten blending mode while painting"}, | ||||
| {PAINT_BLEND_DARKEN, "DARKEN", ICON_BRUSH_DARKEN, "Darken", "Use darken blending mode while painting"}, | {PAINT_BLEND_DARKEN, "DARKEN", ICON_BRUSH_DARKEN, "Darken", "Use darken blending mode while painting"}, | ||||
| {PAINT_BLEND_AVERAGE, "AVERAGE", ICON_BRUSH_BLUR, "Average", "Use average blending mode while painting" }, | {PAINT_BLEND_AVERAGE, "AVERAGE", ICON_BRUSH_BLUR, "Average", "Use average blending mode while painting"}, | ||||
| {PAINT_BLEND_SMEAR, "SMEAR", ICON_BRUSH_BLUR, "Smear", "Use smear blending mode while painting" }, | {PAINT_BLEND_SMEAR, "SMEAR", ICON_BRUSH_BLUR, "Smear", "Use smear blending mode while painting"}, | ||||
| {PAINT_BLEND_COLORDODGE, "COLORDODGE", ICON_BRUSH_BLUR, "Color Dodge", "Use color dodge blending mode while painting" }, | |||||
| {PAINT_BLEND_DIFFERENCE, "DIFFERENCE", ICON_BRUSH_BLUR, "Difference", "Use difference blending mode while painting"}, | |||||
| {PAINT_BLEND_SCREEN, "SCREEN", ICON_BRUSH_BLUR, "Screen", "Use screen blending mode while painting"}, | |||||
| {PAINT_BLEND_HARDLIGHT, "HARDLIGHT", ICON_BRUSH_BLUR, "Hardlight", "Use hardlight blending mode while painting"}, | |||||
| {PAINT_BLEND_OVERLAY, "OVERLAY", ICON_BRUSH_BLUR, "Overlay", "Use overlay blending mode while painting"}, | |||||
| {PAINT_BLEND_SOFTLIGHT, "SOFTLIGHT", ICON_BRUSH_BLUR, "Softlight", "Use softlight blending mode while painting"}, | |||||
| {PAINT_BLEND_EXCLUSION, "EXCLUSION", ICON_BRUSH_BLUR, "Exclusion", "Use exclusion blending mode while painting"}, | |||||
| {PAINT_BLEND_LUMINOCITY, "LUMINOCITY", ICON_BRUSH_BLUR, "Luminocity", "Use luminocity blending mode while painting"}, | |||||
| {PAINT_BLEND_SATURATION, "SATURATION", ICON_BRUSH_BLUR, "Saturation", "Use saturation blending mode while painting"}, | |||||
| {PAINT_BLEND_HUE, "HUE", ICON_BRUSH_BLUR, "Hue", "Use hue blending mode while painting"}, | |||||
| {PAINT_BLEND_ALPHA_SUB, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting"}, | |||||
| {PAINT_BLEND_ALPHA_ADD, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting"}, | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| EnumPropertyItem rna_enum_brush_image_tool_items[] = { | EnumPropertyItem rna_enum_brush_image_tool_items[] = { | ||||
| {PAINT_TOOL_DRAW, "DRAW", ICON_BRUSH_TEXDRAW, "Draw", ""}, | {PAINT_TOOL_DRAW, "DRAW", ICON_BRUSH_TEXDRAW, "Draw", ""}, | ||||
| {PAINT_TOOL_SOFTEN, "SOFTEN", ICON_BRUSH_SOFTEN, "Soften", ""}, | {PAINT_TOOL_SOFTEN, "SOFTEN", ICON_BRUSH_SOFTEN, "Soften", ""}, | ||||
| {PAINT_TOOL_SMEAR, "SMEAR", ICON_BRUSH_SMEAR, "Smear", ""}, | {PAINT_TOOL_SMEAR, "SMEAR", ICON_BRUSH_SMEAR, "Smear", ""}, | ||||
| {PAINT_TOOL_CLONE, "CLONE", ICON_BRUSH_CLONE, "Clone", ""}, | {PAINT_TOOL_CLONE, "CLONE", ICON_BRUSH_CLONE, "Clone", ""}, | ||||
| ▲ Show 20 Lines • Show All 994 Lines • ▼ Show 20 Lines | static void rna_def_brush(BlenderRNA *brna) | ||||
| RNA_def_property_ui_range(prop, 1, 50, 1, -1); | RNA_def_property_ui_range(prop, 1, 50, 1, -1); | ||||
| RNA_def_property_ui_text(prop, "Kernel Radius", "Radius of kernel used for soften and sharpen in pixels"); | RNA_def_property_ui_text(prop, "Kernel Radius", "Radius of kernel used for soften and sharpen in pixels"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "blur_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "blur_mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, brush_blur_mode_items); | RNA_def_property_enum_items(prop, brush_blur_mode_items); | ||||
| RNA_def_property_ui_text(prop, "Blur Mode", ""); | RNA_def_property_ui_text(prop, "Blur Mode", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| /* flag */ | /* flag */ | ||||
| prop = RNA_def_property(srna, "use_airbrush", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_airbrush", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_AIRBRUSH); | RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_AIRBRUSH); | ||||
| RNA_def_property_ui_text(prop, "Airbrush", "Keep applying paint effect while holding mouse (spray)"); | RNA_def_property_ui_text(prop, "Airbrush", "Keep applying paint effect while holding mouse (spray)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "use_original_normal", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_original_normal", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ORIGINAL_NORMAL); | RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ORIGINAL_NORMAL); | ||||
| ▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | static void rna_def_brush(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Edge-to-edge", "Drag anchor brush from edge-to-edge"); | RNA_def_property_ui_text(prop, "Edge-to-edge", "Drag anchor brush from edge-to-edge"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "use_restore_mesh", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_restore_mesh", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_DRAG_DOT); | RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_DRAG_DOT); | ||||
| RNA_def_property_ui_text(prop, "Restore Mesh", "Allow a single dot to be carefully positioned"); | RNA_def_property_ui_text(prop, "Restore Mesh", "Allow a single dot to be carefully positioned"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| /* only for projection paint, TODO, other paint modes */ | /* only for projection paint & vertex paint, TODO, other paint modes */ | ||||
| prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BRUSH_LOCK_ALPHA); | RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BRUSH_LOCK_ALPHA); | ||||
| RNA_def_property_ui_text(prop, "Alpha", "When this is disabled, lock alpha while painting"); | RNA_def_property_ui_text(prop, "Alpha", "When this is disabled, lock alpha while painting"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | RNA_def_property_flag(prop, PROP_NEVER_NULL); | ||||
| RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve"); | RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve"); | ||||
| ▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines | |||||