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"}, | |||||
| {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 995 Lines • ▼ Show 20 Lines | static void rna_def_brush(BlenderRNA *brna) | ||||
| 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"); | ||||
| prop = RNA_def_property(srna, "alpha_vpaint", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_range(prop, 0, 255); | |||||
| RNA_def_property_int_sdna(prop, NULL, "alpha_paint"); | |||||
| RNA_def_property_range(prop, 0, 255); | |||||
| RNA_def_property_ui_text(prop, "Alpha", "Alpha value"); | |||||
| 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 103 Lines • ▼ Show 20 Lines | static void rna_def_brush(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "use_space_attenuation", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_space_attenuation", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE_ATTEN); | RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE_ATTEN); | ||||
| RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true); | RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true); | ||||
| RNA_def_property_ui_text(prop, "Use Automatic Strength Adjustment", | RNA_def_property_ui_text(prop, "Use Automatic Strength Adjustment", | ||||
| "Automatically adjust strength to give consistent results for different spacings"); | "Automatically adjust strength to give consistent results for different spacings"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "use_alpha_vpaint", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_VPAINT); | |||||
| RNA_def_property_ui_text(prop, "Alpha", "Gives transparany"); | |||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | |||||
| /* adaptive space is not implemented yet */ | /* adaptive space is not implemented yet */ | ||||
| prop = RNA_def_property(srna, "use_adaptive_space", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_adaptive_space", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ADAPTIVE_SPACE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ADAPTIVE_SPACE); | ||||
| RNA_def_property_ui_text(prop, "Adaptive Spacing", | RNA_def_property_ui_text(prop, "Adaptive Spacing", | ||||
| "Space daubs according to surface orientation instead of screen space"); | "Space daubs according to surface orientation instead of screen space"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines | |||||