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_expand(invert=True, use_cursor=True, update_pivot=True, smooth_iterations=2, mask_speed=5, use_normals=True, keep_previous_mask=False, edge_sensitivity=300)

Expands a mask from the initial active vertex under the cursor

Parameters:
  • invert (boolean, (optional)) – Invert, Invert the new mask
  • use_cursor (boolean, (optional)) – Use Cursor, Expand the mask to the cursor position
  • update_pivot (boolean, (optional)) – Update Pivot Position, Set the pivot position to the mask border after creating the mask
  • smooth_iterations (int in [0, 10], (optional)) – Smooth iterations
  • mask_speed (int in [1, 10], (optional)) – Mask speed
  • use_normals (boolean, (optional)) – Use Normals, Generate the mask using the normals and curvature of the model
  • keep_previous_mask (boolean, (optional)) – Keep Previous Mask, Generate the new mask on top of the current one
  • edge_sensitivity (int in [0, 2000], (optional)) – Edge Detection Sensitivity, Sensitivity for expanding the mask across sculpted sharp edges when using normals to generate the mask
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.set_pivot_position(mode='UNMASKED')

Sets the sculpt transform pivot position

Parameters:mode (enum in ['ORIGIN', 'UNMASKED', 'BORDER', 'ACTIVE', 'SURFACE'], (optional)) –

Mode

  • ORIGIN Origin, Sets the pivot to the origin of the sculpt.
  • UNMASKED Unmasked, Sets the pivot position to the average position of the unmasked vertices.
  • BORDER Mask border, Sets the pivot position to the center of the border of the mask.
  • ACTIVE Active vertex, Sets the pivot position to the active vertex position.
  • SURFACE Surface, Sets the pivot position to the surface under the cursor.
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.