user: Show practical ways to work with Brush Settings in a Blender add-on or script – include code.

assistant: [image reference removed]

Material
:   Data-block selector for the [material](../../../materials/index.xhtml).

Radius
:   The radius of the brush in pixels.

    `F` allows you to change the brush size interactively by dragging the pointer or
    by typing a number then confirm.

    (Size Pressure)
    :   Adjusts the radius based on the stylus pressure when using a [Graphics Tablet](../../../../getting_started/configuration/hardware.xhtml#hardware-tablet).
        The gradient of the pressure can be customized using
        the [curve widget](../../../../interface/controls/templates/curve.xhtml).

Strength
:   Control the stroke transparency (alpha).
    From fully transparent (0.0) to fully opaque (1.0).

    You can change the brush strength interactively by pressing `Shift`-`F`
    in the 3D Viewport and then moving the pointer and then `LMB`.
    You can also enter the size numerically.

    (Strength Pressure)
    :   Adjusts the strength based on the stylus pressure when using a [Graphics Tablet](../../../../getting_started/configuration/hardware.xhtml#hardware-tablet).
        The gradient of the pressure can be customized using
        the [curve widget](../../../../interface/controls/templates/curve.xhtml).

Caps Type
:   The shape of the start and end of the stroke.

    Round:
    :   Strokes start and stop with a curved shape.

    Flat:
    :   Strokes start and stop with a straight cutoff.

### Advanced

Spacing
:   Controls the minimum spacing between points in the stroke as a percentage of
    the brush size.

    A lower spacing is useful when doing fast movements. Normally this would generate
    less samples and lead to a larger spacing between points. When the spacing percentage
    is lowered, more points are generated to ensure the minimum spacing.

    When drawing slowly, the point density is usually already high. In this case the
    spacing setting doesn’t add new points. It only ensures a minimum spacing and won’t
    remove points.

Active Smooth
:   The number of smoothing iterations to apply to the stroke while drawing.

Angle
:   Direction of the input device that gives the maximum thickness to the stroke (0° for horizontal).

Factor
:   Amount of thickness reduction when the stroke is perpendicular to the *Angle* value.

Hardness
:   Amount of transparency (alpha) to apply from the border of the point to the center.
    Works only when the brush is using stroke materials of *Dot* or *Box* style.

Aspect X, Y
:   Controls the width and height of the alpha gradient.

### Stroke

#### Post-Processing

Post-processing methods that are executed on the strokes
when you finished drawing, right after releasing the `LMB` or `Pen` tip.
You can toggle the use of post-processing using the checkbox in the section panel header.

Smooth
:   Strength of smoothing process on the points location along the stroke.

Iterations
:   The number of smoothing iterations to apply to the stroke.

Subdivision Steps
:   Number of subdivisions to apply to newly created strokes.

Simplify
:   Reduces final points numbers in the stroke with an adaptive algorithm.

Trim Strokes End
:   Automatically trim intersection strokes ends.

Outline
:   Activate the conversion of the newly created stroke to its outline.

    Material
    :   Material used for outline stroke.

    Thickness
    :   Thickness used for outline stroke.

#### Randomize

Adds randomness to the position of the points along the stroke.
You can toggle the use of Randomize using the checkbox in the section panel header.

Radius
:   The amount of randomness to apply using the pressure of the input device.

Strength
:   The amount of randomness to apply to the stroke strength value (alpha).

UV
:   The amount of randomness to apply to the UV rotation.

Hue, Saturation, Value
:   Randomizes the hue, saturation, and value of the stroke’s [Color](../tool_settings/color.xhtml#grease-pencil-draw-color).

Jitter
:   The amount of jittering to add to the stroke.

Common Options

Stroke Random
:   Use randomness only at stroke level.

Use Pressure
:   Uses the stylus pressure to control how strong the effect is.
    The gradient of the pressure can be customized using
    the [curve widget](../../../../interface/controls/templates/curve.xhtml).

#### Stabilize Stroke

*Stabilize Stroke* helps to reduce jitter of the strokes while drawing by
delaying and correcting the location of points.
You can toggle the use of *Stabilize Stroke* using the checkbox in the section panel header.

Radius
:   Minimum distance from the last point before the stroke continues.

Factor
:   A smooth factor, where higher values result in smoother strokes but the drawing sensation
    feels like as if you were pulling the stroke.

### Cursor

The cursor can be disabled by toggling the checkbox in the *Cursor* header.

Show Fill Color while Drawing
:   Shows the brush linked material color in the viewport.