Brush Operators¶
-
bpy.ops.brush.active_index_set(mode="", index=0)¶ Set active sculpt/paint brush from it’s number
Parameters: - mode (string, (optional, never None)) – Mode, Paint mode to set brush for
- index (int in [-inf, inf], (optional)) – Number, Brush number
File:
-
bpy.ops.brush.add()¶ Add brush by mode type
-
bpy.ops.brush.curve_preset(shape='SMOOTH')¶ Set brush shape
Parameters: shape (enum in ['SHARP', 'SMOOTH', 'MAX', 'LINE', 'ROUND', 'ROOT'], (optional)) – Mode
-
bpy.ops.brush.reset()¶ Return brush to defaults based on current tool
-
bpy.ops.brush.scale_size(scalar=1.0)¶ Change brush size by a scalar
Parameters: scalar (float in [0, 2], (optional)) – Scalar, Factor to scale brush size by
-
bpy.ops.brush.stencil_control(mode='TRANSLATION', texmode='PRIMARY')¶ Control the stencil brush
Parameters: - mode (enum in ['TRANSLATION', 'SCALE', 'ROTATION'], (optional)) – Tool
- texmode (enum in ['PRIMARY', 'SECONDARY'], (optional)) – Tool
-
bpy.ops.brush.stencil_fit_image_aspect(use_repeat=True, use_scale=True, mask=False)¶ When using an image texture, adjust the stencil size to fit the image aspect ratio
Parameters: - use_repeat (boolean, (optional)) – Use Repeat, Use repeat mapping values
- use_scale (boolean, (optional)) – Use Scale, Use texture scale values
- mask (boolean, (optional)) – Modify Mask Stencil, Modify either the primary or mask stencil
-
bpy.ops.brush.stencil_reset_transform(mask=False)¶ Reset the stencil transformation to the default
Parameters: mask (boolean, (optional)) – Modify Mask Stencil, Modify either the primary or mask stencil
-
bpy.ops.brush.uv_sculpt_tool_set(tool='PINCH')¶ Set the UV sculpt tool
Parameters: tool (enum in ['PINCH', 'RELAX', 'GRAB'], (optional)) – Tool
PINCHPinch, Pinch UVs.RELAXRelax, Relax UVs.GRABGrab, Grab UVs.