Sculpt Operators

bpy.ops.sculpt.brush_stroke(stroke=None, mode='NORMAL', ignore_background_click=False)

Sculpt a stroke into the geometry

Parameters:
  • stroke (bpy_prop_collection of OperatorStrokeElement, (optional)) – Stroke
  • mode (enum in ['NORMAL', 'INVERT', 'SMOOTH'], (optional)) –

    Stroke Mode, Action taken when a paint stroke is made

    • NORMAL Regular, Apply brush normally.
    • INVERT Invert, Invert action of brush for duration of stroke.
    • SMOOTH Smooth, Switch brush to smooth mode for duration of stroke.
  • ignore_background_click (boolean, (optional)) – Ignore Background Click, Clicks on the background do not start the stroke
bpy.ops.sculpt.detail_flood_fill()

Flood fill the mesh with the selected detail setting

bpy.ops.sculpt.dirty_mask(dirty_only=False)

Generates a mask based on the geometry cavity and pointiness

Parameters:dirty_only (boolean, (optional)) – Dirty Only, Don’t calculate cleans for convex areas
bpy.ops.sculpt.dynamic_topology_toggle()

Dynamic topology alters the mesh topology while sculpting

bpy.ops.sculpt.mask_filter(filter_type='SMOOTH', iterations=1, auto_iteration_count=False)

Applies a filter to modify the current mask

Parameters:
  • filter_type (enum in ['SMOOTH', 'SHARPEN', 'GROW', 'SHRINK', 'CONTRAST_INCREASE', 'CONTRAST_DECREASE'], (optional)) –

    Type, Filter that is going to be applied to the mask

    • SMOOTH Smooth Mask, Smooth mask.
    • SHARPEN Sharpen Mask, Sharpen mask.
    • GROW Grow Mask, Grow mask.
    • SHRINK Shrink Mask, Shrink mask.
    • CONTRAST_INCREASE Increase contrast, Increase the contrast of the paint mask.
    • CONTRAST_DECREASE Decrease contrast, Decrease the contrast of the paint mask.
  • iterations (int in [1, 100], (optional)) – Iterations, Number of times that the filter is going to be applied
  • auto_iteration_count (boolean, (optional)) – Auto Iteration Count, Use a automatic number of iterations based on the number of vertices of the sculpt
bpy.ops.sculpt.mesh_filter(type='INFLATE', strength=1.0, deform_axis={'X', 'Y', 'Z'})

Applies a filter to modify the current mesh

Parameters:
  • type (enum in ['SMOOTH', 'SCALE', 'INFLATE', 'SPHERE', 'RANDOM'], (optional)) –

    Filter type, Operation that is going to be applied to the mesh

    • SMOOTH Smooth, Smooth mesh.
    • SCALE Scale, Scale mesh.
    • INFLATE Inflate, Inflate mesh.
    • SPHERE Sphere, Morph into sphere.
    • RANDOM Random, Randomize vertex positions.
  • strength (float in [-10, 10], (optional)) – Strength, Filter Strength
  • deform_axis (enum set in {'X', 'Y', 'Z'}, (optional)) –

    Deform axis, Apply the deformation in the selected axis

    • X X, Deform in the X axis.
    • Y Y, Deform in the Y axis.
    • Z Z, Deform in the Z axis.
bpy.ops.sculpt.optimize()

Recalculate the sculpt BVH to improve performance

bpy.ops.sculpt.sample_detail_size(location=(0, 0))

Sample the mesh detail on clicked point

Parameters:location (int array of 2 items in [0, 32767], (optional)) – Location, Screen Coordinates of sampling
bpy.ops.sculpt.sculptmode_toggle()

Toggle sculpt mode in 3D view

bpy.ops.sculpt.set_detail_size()

Set the mesh detail (either relative or constant one, depending on current dyntopo mode)

bpy.ops.sculpt.set_persistent_base()

Reset the copy of the mesh that is being sculpted on

bpy.ops.sculpt.symmetrize()

Symmetrize the topology modifications

bpy.ops.sculpt.uv_sculpt_stroke(mode='NORMAL')

Sculpt UVs using a brush

Parameters:mode (enum in ['NORMAL', 'INVERT', 'RELAX'], (optional)) –

Mode, Stroke Mode

  • NORMAL Regular, Apply brush normally.
  • INVERT Invert, Invert action of brush for duration of stroke.
  • RELAX Relax, Switch brush to relax mode for duration of stroke.