BrushGpencilSettings(bpy_struct)#

base class — bpy_struct

class bpy.types.BrushGpencilSettings(bpy_struct)#

Settings for grease pencil brush

active_smooth_factor#

Amount of smoothing while drawing

Type:

float in [0, 1], default 0.0

angle#

Direction of the stroke at which brush gives maximal thickness (0° for horizontal)

Type:

float in [-1.5708, 1.5708], default 0.0

angle_factor#

Reduce brush thickness by this factor when stroke is perpendicular to ‘Angle’ direction

Type:

float in [0, 1], default 0.0

aspect#
Type:

mathutils.Vector of 2 items in [0.01, 1], default (1.0, 1.0)

brush_draw_mode#

Preselected mode when using this brush

  • ACTIVE Active – Use current mode.

  • MATERIAL Material – Use always material mode.

  • VERTEXCOLOR Vertex Color – Use always Vertex Color mode.

Type:

enum in [‘ACTIVE’, ‘MATERIAL’, ‘VERTEXCOLOR’], default ‘ACTIVE’

caps_type#

The shape of the start and end of the stroke

Type:

enum in [‘ROUND’, ‘FLAT’], default ‘ROUND’

curve_jitter#

Curve used for the jitter effect

Type:

CurveMapping, (readonly)

curve_random_hue#

Curve used for modulating effect

Type:

CurveMapping, (readonly)

curve_random_pressure#

Curve used for modulating effect

Type:

CurveMapping, (readonly)

curve_random_saturation#

Curve used for modulating effect

Type:

CurveMapping, (readonly)

curve_random_strength#

Curve used for modulating effect

Type:

CurveMapping, (readonly)

curve_random_uv#

Curve used for modulating effect

Type:

CurveMapping, (readonly)

curve_random_value#

Curve used for modulating effect

Type:

CurveMapping, (readonly)

curve_sensitivity#

Curve used for the sensitivity

Type:

CurveMapping, (readonly)

curve_strength#

Curve used for the strength

Type:

CurveMapping, (readonly)

dilate#

Number of pixels to expand or contract fill area

Type:

int in [-40, 40], default 1

eraser_mode#

Eraser Mode

  • SOFT Dissolve – Erase strokes, fading their points strength and thickness.

  • HARD Point – Erase stroke points.

  • STROKE Stroke – Erase entire strokes.

Type:

enum in [‘SOFT’, ‘HARD’, ‘STROKE’], default ‘SOFT’

eraser_strength_factor#

Amount of erasing for strength

Type:

float in [0, 100], default 0.0

eraser_thickness_factor#

Amount of erasing for thickness

Type:

float in [0, 100], default 0.0

extend_stroke_factor#

Strokes end extension for closing gaps, use zero to disable

Type:

float in [0, 10], default 0.0

fill_direction#

Direction of the fill

  • NORMAL Normal – Fill internal area.

  • INVERT Inverted – Fill inverted area.

Type:

enum in [‘NORMAL’, ‘INVERT’], default ‘NORMAL’

fill_draw_mode#

Mode to draw boundary limits

  • BOTH All – Use both visible strokes and edit lines as fill boundary limits.

  • STROKE Strokes – Use visible strokes as fill boundary limits.

  • CONTROL Edit Lines – Use edit lines as fill boundary limits.

Type:

enum in [‘BOTH’, ‘STROKE’, ‘CONTROL’], default ‘BOTH’

fill_extend_mode#

Types of stroke extensions used for closing gaps

  • EXTEND Extend – Extend strokes in straight lines.

  • RADIUS Radius – Connect endpoints that are close together.

Type:

enum in [‘EXTEND’, ‘RADIUS’], default ‘EXTEND’

fill_factor#

Factor for fill boundary accuracy, higher values are more accurate but slower

Type:

float in [0.05, 8], default 0.0

fill_layer_mode#

Layers used as boundaries

  • VISIBLE Visible – Visible layers.

  • ACTIVE Active – Only active layer.

  • ABOVE Layer Above – Layer above active.

  • BELOW Layer Below – Layer below active.

  • ALL_ABOVE All Above – All layers above active.

  • ALL_BELOW All Below – All layers below active.

Type:

enum in [‘VISIBLE’, ‘ACTIVE’, ‘ABOVE’, ‘BELOW’, ‘ALL_ABOVE’, ‘ALL_BELOW’], default ‘VISIBLE’

fill_simplify_level#

Number of simplify steps (large values reduce fill accuracy)

Type:

int in [0, 10], default 0

fill_threshold#

Threshold to consider color transparent for filling

Type:

float in [0, 1], default 0.0

gpencil_paint_icon#
Type:

enum in [‘PENCIL’, ‘PEN’, ‘INK’, ‘INKNOISE’, ‘BLOCK’, ‘MARKER’, ‘AIRBRUSH’, ‘CHISEL’, ‘FILL’, ‘SOFT’, ‘HARD’, ‘STROKE’], default ‘PENCIL’

gpencil_sculpt_icon#
Type:

enum in [‘SMOOTH’, ‘THICKNESS’, ‘STRENGTH’, ‘RANDOMIZE’, ‘GRAB’, ‘PUSH’, ‘TWIST’, ‘PINCH’, ‘CLONE’], default ‘SMOOTH’

gpencil_vertex_icon#
Type:

enum in [‘DRAW’, ‘BLUR’, ‘AVERAGE’, ‘SMEAR’, ‘REPLACE’], default ‘DRAW’

gpencil_weight_icon#
Type:

enum in [‘DRAW’, ‘BLUR’, ‘AVERAGE’, ‘SMEAR’], default ‘DRAW’

hardness#

Gradient from the center of Dot and Box strokes (set to 1 for a solid stroke)

Type:

float in [0.001, 1], default 1.0

input_samples#

Generate intermediate points for very fast mouse movements. Set to 0 to disable

Type:

int in [0, 10], default 0

material#

Material used for strokes drawn using this brush

Type:

Material

material_alt#

Material used for secondary uses for this brush

Type:

Material

outline_thickness_factor#

Thickness of the outline stroke relative to current brush thickness

Type:

float in [0, 1], default 0.0

pen_jitter#

Jitter factor for new strokes

Type:

float in [0, 1], default 0.0

pen_smooth_factor#

Amount of smoothing to apply after finish newly created strokes, to reduce jitter/noise

Type:

float in [0, 2], default 0.0

pen_smooth_steps#

Number of times to smooth newly created strokes

Type:

int in [0, 100], default 0

pen_strength#

Color strength for new strokes (affect alpha factor of color)

Type:

float in [0, 1], default 0.0

pen_subdivision_steps#

Number of times to subdivide newly created strokes, for less jagged strokes

Type:

int in [0, 3], default 0

pin_draw_mode#

Pin the mode to the brush

Type:

boolean, default False

random_hue_factor#

Random factor to modify original hue

Type:

float in [0, 1], default 0.0

random_pressure#

Randomness factor for pressure in new strokes

Type:

float in [0, 1], default 0.0

random_saturation_factor#

Random factor to modify original saturation

Type:

float in [0, 1], default 0.0

random_strength#

Randomness factor strength in new strokes

Type:

float in [0, 1], default 0.0

random_value_factor#

Random factor to modify original value

Type:

float in [0, 1], default 0.0

show_fill#

Show transparent lines to use as boundary for filling

Type:

boolean, default True

show_fill_boundary#

Show help lines for filling to see boundaries

Type:

boolean, default True

show_fill_extend#

Show help lines for stroke extension

Type:

boolean, default True

show_lasso#

Do not display fill color while drawing the stroke

Type:

boolean, default False

simplify_factor#

Factor of Simplify using adaptive algorithm

Type:

float in [0, 100], default 0.0

use_active_layer_only#

Only edit the active layer of the object

Type:

boolean, default False

use_collide_strokes#

Check if extend lines collide with strokes

Type:

boolean, default False

use_default_eraser#

Use this brush when enable eraser with fast switch key

Type:

boolean, default True

use_edit_position#

The brush affects the position of the point

Type:

boolean, default False

use_edit_strength#

The brush affects the color strength of the point

Type:

boolean, default False

use_edit_thickness#

The brush affects the thickness of the point

Type:

boolean, default False

use_edit_uv#

The brush affects the UV rotation of the point

Type:

boolean, default False

use_fill_limit#

Fill only visible areas in viewport

Type:

boolean, default True

use_jitter_pressure#

Use tablet pressure for jitter

Type:

boolean, default False

use_keep_caps_eraser#

Keep the caps as they are and don’t flatten them when erasing

Type:

boolean, default False

use_material_pin#

Keep material assigned to brush

Type:

boolean, default False

use_occlude_eraser#

Erase only strokes visible and not occluded

Type:

boolean, default False

use_pressure#

Use tablet pressure

Type:

boolean, default False

use_random_press_hue#

Use pressure to modulate randomness

Type:

boolean, default False

use_random_press_radius#

Use pressure to modulate randomness

Type:

boolean, default False

use_random_press_sat#

Use pressure to modulate randomness

Type:

boolean, default False

use_random_press_strength#

Use pressure to modulate randomness

Type:

boolean, default False

use_random_press_uv#

Use pressure to modulate randomness

Type:

boolean, default False

use_random_press_val#

Use pressure to modulate randomness

Type:

boolean, default False

use_settings_outline#

Convert stroke to perimeter

Type:

boolean, default False

use_settings_postprocess#

Additional post processing options for new strokes

Type:

boolean, default False

use_settings_random#

Random brush settings

Type:

boolean, default False

use_settings_stabilizer#

Draw lines with a delay to allow smooth strokes. Press Shift key to override while drawing

Type:

boolean, default True

use_strength_pressure#

Use tablet pressure for color strength

Type:

boolean, default False

use_stroke_random_hue#

Use randomness at stroke level

Type:

boolean, default False

use_stroke_random_radius#

Use randomness at stroke level

Type:

boolean, default False

use_stroke_random_sat#

Use randomness at stroke level

Type:

boolean, default False

use_stroke_random_strength#

Use randomness at stroke level

Type:

boolean, default False

use_stroke_random_uv#

Use randomness at stroke level

Type:

boolean, default False

use_stroke_random_val#

Use randomness at stroke level

Type:

boolean, default False

use_trim#

Trim intersecting stroke ends

Type:

boolean, default False

uv_random#

Random factor for auto-generated UV rotation

Type:

float in [0, 1], default 0.0

vertex_color_factor#

Factor used to mix vertex color to get final color

Type:

float in [0, 1], default 0.0

vertex_mode#

Defines how vertex color affect to the strokes

  • STROKE Stroke – Vertex Color affects to Stroke only.

  • FILL Fill – Vertex Color affects to Fill only.

  • BOTH Stroke & Fill – Vertex Color affects to Stroke and Fill.

Type:

enum in [‘STROKE’, ‘FILL’, ‘BOTH’], default ‘STROKE’

classmethod bl_rna_get_subclass(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties#

Inherited Functions#

References#