user: How do I use Bpy.Types.Brush in Blender? Include parameters, examples, warnings and best practices.

assistant: re propagated through the cloth Type : float in [0.01, 1], default 0.01 cloth_deform_type ¶ Deformation type that is used in the brush Type : enum in [ 'DRAG' , 'PUSH' , 'PINCH_POINT' , 'PINCH_PERPENDICULAR' , 'INFLATE' , 'GRAB' , 'EXPAND' , 'SNAKE_HOOK' ], default 'DRAG' cloth_force_falloff_type ¶ Shape used in the brush to apply force to the cloth Type : enum in [ 'RADIAL' , 'PLANE' ], default 'RADIAL' cloth_mass ¶ Mass of each simulation particle Type : float in [0.01, 2], default 1.0 cloth_sim_falloff ¶ Area to apply deformation falloff to the effects of the simulation Type : float in [0, 1], default 0.75 cloth_sim_limit ¶ Factor added relative to the size of the radius to limit the cloth simulation effects Type : float in [0.1, 10], default 2.5 cloth_simulation_area_type ¶ Part of the mesh that is going to be simulated when the stroke is active LOCAL Local – Simulates only a specific area around the brush limited by a fixed radius. GLOBAL Global – Simulates the entire mesh. DYNAMIC Dynamic – The active simulation area moves with the brush. Type : enum in [ 'LOCAL' , 'GLOBAL' , 'DYNAMIC' ], default 'LOCAL' color ¶ Type : mathutils.Color of 3 items in [0, inf], default (1.0, 1.0, 1.0) color_type ¶ Use single color or gradient when painting COLOR Color – Paint with a single color. GRADIENT Gradient – Paint with a gradient. Type : enum in [ 'COLOR' , 'GRADIENT' ], default 'COLOR' crease_pinch_factor ¶ How much the crease brush pinches Type : float in [0, 1], default 0.5 cursor_color_add ¶ Color of cursor when adding Type : float array of 4 items in [0, inf], default (1.0, 0.39, 0.39, 0.9) cursor_color_subtract ¶ Color of cursor when subtracting Type : float array of 4 items in [0, inf], default (0.39, 0.39, 1.0, 0.9) cursor_overlay_alpha ¶ Type : int in [0, 100], default 33 curve_distance_falloff ¶ Editable falloff curve Type : CurveMapping , (readonly, never None) curve_distance_falloff_preset ¶ Type : enum in Brush Curve Preset Items , default 'CUSTOM' curve_jitter ¶ Curve used to map pressure to brush jitter Type : CurveMapping , (readonly) curve_random_hue ¶ Curve used for modulating effect Type : CurveMapping , (readonly) curve_random_saturation ¶ Curve used for modulating effect Type : CurveMapping , (readonly) curve_random_value ¶ Curve used for modulating effect Type : CurveMapping , (readonly) curve_size ¶ Curve used to map pressure to brush size Type : CurveMapping , (readonly) curve_strength ¶ Curve used to map pressure to brush strength Type : CurveMapping , (readonly) curves_sculpt_brush_type ¶ Type : enum in Brush Curves Sculpt Brush Type Items , default 'COMB' curves_sculpt_settings ¶ Type : BrushCurvesSculptSettings , (readonly) dash_ratio ¶ Ratio of samples in a cycle that the brush is enabled Type : float in [0, 1], default 1.0 dash_samples ¶ Length of a dash cycle measured in stroke samples Type : int in [1, 10000], default 20 deform_target ¶ How the deformation of the brush will affect the object GEOMETRY Geometry – Brush deformation displaces the vertices of the mesh. CLOTH_SIM Cloth Simulation – Brush deforms the mesh by deforming the constraints of a cloth simulation. Type : enum in [ 'GEOMETRY' , 'CLOTH_SIM' ], default 'GEOMETRY' density ¶ Amount of random elements that are going to be affected by the brush Type : float in [0, 1], default 0.0 direction ¶ ADD Add – Add effect of brush. SUBTRACT Subtract – Subtract effect of brush. Type : enum in [ 'ADD' , 'SUBTRACT' ], default 'ADD' disconnected_distance_max ¶ Maximum distance to search for disconnected loose parts in the mesh Type : float in [0, 10], default 0.1 elastic_deform_type ¶ Deformation type that is used in the brush Type : enum in [ 'GRAB' , 'GRAB_BISCALE' , 'GRAB_TRISCALE' , 'SCALE' , 'TWIST' ], default 'GRAB' elastic_deform_volume_preservation ¶ Poisson ratio for elastic deformation. Higher values preserve volume more, but also lead to more bulging. Type : float in [0, 0.9], default 0.0 falloff_angle ¶ Paint most on faces pointing towards the view according to this angle Type : float in [0, 1.5708], default 0.0 falloff_shape ¶ Use projected or spherical falloff SPHERE Sphere – Apply brush influence in a Sphere, outwards from the center. PROJECTED Projected – Apply brush influence in a 2D circle, projected from the view. Type : enum in [ 'SPHERE' , 'PROJECTED' ], default 'SPHERE' fill_threshold ¶ Threshold above which filling is not propagated Type : float in [0, 100], default 0.2 flow ¶ Amount of paint that is applied per stroke sample Type : float in [0, 1], default 0.0 gpencil_brush_type ¶ Type : enum in Brush Gpencil Types Items , default 'DRAW' gpencil_sculpt_brush_type ¶ Type : enum in Brush Gpencil Sculpt Types Items , default 'SMOOTH' gpencil_settings ¶ Type : BrushGpencilSettings , (readonly) gpencil_vertex_brush_type ¶ Type : enum in Brush Gpencil Vertex Types Items , default 'DRAW' gpencil_weight_brush_type ¶ Type : enum in Brush Gpencil Weight Types Items , default 'WEIGHT' grad_spacing ¶ Spacing before brush gradient goes full circle Type : int in [1, 10000], default 0 gradient ¶ Type : ColorRamp , (readonly) gradient_fill_mode ¶ Type : enum in [ 'LINEAR' , 'RADIAL' ], default 'LINEAR' gradient_stroke_mode ¶ Type : enum in [ 'PRESSURE' , 'SPACING_REPEAT' , 'SPACING_CLAMP' ], default 'PRESSURE' hardness ¶ How close the brush falloff starts from the edge of the brush Type : float in [0, 1], default 0.0 has_unsaved_changes ¶ Indicates that there are any user visible changes since the brush has been imported or read from the file Type : boolean, default False, (readonly) height ¶ Affectable height of brush (i.e. the layer height for the layer tool) Type : float in [0, 1], default 0.5 hue_jitter ¶ Color jitter effect on hue Type : float in [0, 1], default 0.0 image_brush_type ¶ Type : enum in Brush Image Brush Type Items , default 'DRAW' image_paint_capabilities ¶ Type : BrushCapabilitiesImagePaint , (readonly, never None) input_samples ¶ Number of input samples to average together to smooth the brush stroke Type : int in [1, 64], default 1 invert_density_pressure ¶ Invert the modulation of pressure in density Type : boolean, default False invert_flow_pressure ¶ Invert the modulation of pressure in flow Type : boolean, default False invert_hardness_pressure ¶ Invert the modulation of pressure in hardness Type : boolean, default False invert_to_scrape_fill ¶ Use Scrape or Fill brush when inverting this brush instead of inverting its displacement direction Type : boolean, default False invert_wet_mix_pressure ¶ Invert the modulation of pressure in wet mix Type : boolean, default False invert_wet_persistence_pressure ¶ Invert the modulation of pressure in wet persistence Type : boolean, default False jitter ¶ Jitter the position of the brush while painting Type : float in [0, 1000], default 0.0 jitter_absolute ¶ Jitter the position of the brush in pixels while painting Type : int in [0, 1000000], default 0 jitter_unit ¶ Jitter in screen space or relative to brush size VIEW View – Jittering happens in screen space, in pixels. BRUSH Brush – Jittering happens relative to the brush size. Type : enum in [ 'VIEW' , 'BRUSH' ], default 'VIEW' mask_overlay_alpha ¶ Type : int in [0, 100], default 33 mask_stencil_dimension ¶ Dimensions of mask stencil in viewport Type : mathutils.Vector of 2 items in [-inf, inf], default (256.0, 256.0) mask_stencil_pos ¶ Position of mask stencil in viewport Type : mathutils.Vector of 2 items in [-inf, inf], default (256.0, 256.0) mask_texture ¶ Type : Texture mask_texture_slot ¶ Type : BrushTextureSlot , (readonly) mask_tool ¶ Type : enum in [ 'DRAW' , 'SMOOTH' ], default 'DRAW' multiplane_scrape_angle ¶ Angle between the planes of the crease Type : float in [0, 160], default 0.0 normal_radius_factor ¶ Ratio between the brush radius and the radius that is going to be used to sample the normal Type : float in [0, 2], default 0.5 normal_weight ¶ How much grab will pull vertices out of surface during a grab Type : float in [0, 1], default 0.0 paint_curve ¶ Active paint curve Type : PaintCurve plane_depth ¶ The maximum distance below the plane for affected vertices. Increasing the depth affects vertices farther below the plane. Type : float in [0, 1], default 0.0 plane_height ¶ The maximum distance above the plane for affected vertices. Increasing the height affects vertices farther above the plane. Type : float in [0, 1], default 1.0 plane_inversion_mode ¶ Inversion Mode INVERT_DISPLACEMENT Invert Displacement – Displace the vertices away from the plane.. SWAP_DEPTH_AND_HEIGHT Swap Height and Depth – Swap the roles of Height and Depth.. Type : enum in [ 'INVERT_DISPLACEMENT' , 'SWAP_DEPTH_AND_HEIGHT' ], default 'INVERT_DISPLACEMENT' plane_offset ¶ Adjust plane on which the brush acts towards or away from the object surface Type : float in [-2, 2], default 0.0 plane_trim ¶ If a vertex is further away from offset plane than this, then it is not affected Type : float in [0, 1], default 0.5 pose_deform_type ¶ Deformation type that is used in the brush Type : enum in [ 'ROTATE_TWIST' , 'SCALE_TRANSLATE' , 'SQUASH_STRETCH' ], default 'ROTATE_TWIST' pose_ik_segments ¶ Number of segments of the inverse kinematics chain that will deform the mesh Type : int in [1, 20], default 1 pose_offset ¶ Offset of the pose origin in relation to the brush radius Type : float in [0, 2], default 0.0 pose_origin_type ¶ Method to set the rotation origins for the segments of the brush TOPOLOGY Topology – Sets the rotation origin automatically using the topology and shape of the mesh as a guide. FACE_SETS Face Sets – Creates a pose segment per face sets, starting from the active face set. FACE_SETS_FK Face Sets FK – Simulates an FK deformation using the Face Set under the cursor as control. Type : enum in [ 'TOPOLOGY' , 'FACE_SETS' , 'FACE_SETS_FK' ], default 'TOPOLOGY' pose_smooth_iterations ¶ Smooth iterations applied after calculating the pose factor of each vertex Type : int in [0, 100], default 4 rake_factor ¶ How much grab will follow cursor rotation Type : float in [0, 10], default 0.0 rate ¶ Interval between paints for Airbrush Type : float in [0.0001, 10000], default 0.1 saturation_jitter ¶ Color jitter effect on saturation Type : float in [0, 1], default 0.0 sculpt_brush_type ¶ Type : enum in Brush Sculpt Brush Type Items , default 'DRAW' sculpt_capabilities ¶ Type : BrushCapabilitiesSculpt , (readonly, never None) sculpt_plane ¶ Type : enum in [ 'AREA' , 'VIEW' , 'X' , 'Y' , 'Z' ], default 'AREA' secondary_color ¶ Type : mathutils.Color of 3 items in [0, inf], default (0.0, 0.0, 0.0) sharp_threshold ¶ Threshold below which, no sharpening is done Type : float in [0, 100], default 0.0 show_multiplane_scrape_planes_preview ¶ Preview the scrape planes in the cursor during the stroke Type : boolean, default False size ¶ Diameter of the brush in pixels Type : int in [1, 10000], default 70 slide_deform_type ¶ Deformation type that is used in the brush Type : enum in [ 'DRAG' , 'PINCH' , 'EXPAND' ], default 'DRAG' smear_deform_type ¶ Deformation type that is used in the brush Type : enum in [ 'DRAG' , 'PINCH' , 'EXPAND' ], default 'DRAG' smooth_deform_type ¶ Deformation type that is used in the brush LAPLACIAN Laplacian – Smooths the surface and the volume. SURFACE Surface – Smooths the surface of the mesh, preserving the volume. Type : enum in [ 'LAPLACIAN' , 'SURFACE' ], default 'LAPLACIAN' smooth_stroke_factor ¶ Higher values give a smoother stroke Type : float in [0.5, 0.99], default 0.9 smooth_stroke_radius ¶ Minimum distance from last point before stroke continues Type : int in [10, 200], default 75 snake_hook_deform_type ¶ Deformation type that is used in the brush FALLOFF Radius Falloff – Applies the brush falloff in the tip of the brush. ELASTIC Elastic – Modifies the entire mesh using elastic deform. Type : enum in [ 'FALLOFF' , 'ELASTIC' ], default 'FALLOFF' spacing ¶ Spacing between brush daubs as a percentage of brush diameter Type : int in [1, 1000], default 10 stabilize_normal ¶ Stabilize the orientation of the brush plane. Type : float in [0, 1], default 0.0 stabilize_plane ¶ Stabilize the center of the brush plane. Type : float in [0, 1], default 0.0 stencil_dimension ¶ Dimensions of stencil in viewport Type : mathutils.Vector of 2 items in [-inf, inf], default (256.0, 256.0) stencil_pos ¶ Position of stencil in viewport Type : mathutils.Vector of 2 items in [-inf, inf], default (256.0, 256.0) strength ¶ How powerful the effect of the brush is when applied Type : float in [0, 10], default 1.0 stroke_method ¶ DOTS Dots – Apply paint on each mouse move step. DRAG_DOT Drag Dot – Allows a single dot to be carefully positioned. SPACE Space – Limit brush application to the distance specified by spacing. AIRBRUSH Airbrush – Keep applying paint effect while holding mouse (spray). ANCHORED Anchored – Keep the brush anchored to the initial location. LINE Line – Draw a line with dabs separated according to spacing. CURVE Curve – Define the stroke curve with a Bézier curve (dabs are separated according to spacing). Type : enum in [ 'DOTS' , 'DRAG_DOT' , 'SPACE' , 'AIRBRUSH' , 'ANCHORED' , 'LINE' , 'CURVE' ], default 'DOTS' surface_smooth_current_vertex ¶ How much the position of each individual vertex influences the final result Type : float in [0, 1], default 0.0 surface_smooth_iterations ¶ Number of smoothing iterations per brush step Type : int in [1, 10], default 0 surface_smooth_shape_preservation ¶ How much of the original shape is preserved when smoothing Type : float in [0, 1], default 0.0 texture ¶ Type : Texture texture_overlay_alpha ¶ Type : int in [0, 100], default 33 texture_sample_bias ¶ Value added to texture samples Type : float in [-1, 1], default 0.0 texture_slot ¶ Type : BrushTextureSlot , (readonly) tilt_strength_factor ¶ How much the tilt of the pen will affect the brush. Negative values indicate inverting the tilt directions. Type : float in [-1, 1], default 0.0 tip_roundness ¶ Roundness of the brush tip Type : float in [0, 1], default 1.0 tip_scale_x ¶ Scale of the brush tip in the X axis Type : float in [0.0001, 1], default 1.0 topology_rake_factor ¶ Automatically align edges to the brush direction to generate cleaner topology and define sharp features. Best used on low-poly meshes as it has a performance impact. Type : float in [0, 1], default 0.0 unprojected_size ¶ Diameter of brush in Blender units Type : float in [0.001, inf], default 0.1 use_accumulate ¶ Accumulate stroke daubs on top of each other Type : boolean, default False use_adaptive_space ¶ Space daubs according to surface orientation instead of screen space Type : boolean, default False use_airbrush ¶ Keep applying paint effect while holding mouse (spray) Type : boolean, default False use_alpha ¶ When this is disabled, lock alpha while painting Type : boolean, default True use_anchor ¶ Keep the brush anchored to the initial location Type : boolean, default False use_automasking_boundary_edges ¶ Do not affect non manifold boundary edges Type : boolean, default False use_automasking_boundary_face_sets ¶ Do not affect vertices that belong to a Face Set boundary Type : boolean, default False use_automasking_cavity ¶ Do not affect vertices on peaks, based on the surface curvature Type : boolean, default False use_automasking_cavity_inverted ¶ Do not affect vertices within crevices, based on the surface curvature Type : boolean, default False use_automasking_custom_cavity_curve ¶ Use custom curve Type : boolean, default False use_automasking_face_sets ¶ Affect only vertices that share Face Sets with the active vertex Type : boolean, default False use_automasking_start_normal ¶ Affect only vertices with a similar normal to where the stroke starts Type : boolean, default False use_automasking_topology ¶ Affect only vertices connected to the active vertex under the brush Type : boolean, default False use_automasking_view_normal ¶ Affect only vertices with a normal that faces the viewer Type : boolean, default False use_automasking_view_occlusion ¶ Only affect vertices that are not occluded by other faces (slower performance) Type : boolean, default False use_cloth_collision ¶ Collide with objects during the simulation Type : boolean, default False use_cloth_pin_simulation_boundary ¶ Lock the position of the vertices in the simulation falloff area to avoid artifacts and create a softer transition with unaffected areas Type : boolean, default False use_color_as_displacement ¶ Handle each pixel color as individual vector for displacement (area plane mapping only) Type : boolean, default False use_color_jitter ¶ Jitter brush color Type : boolean, default False use_connected_only ¶ Affect only topologically connected elements Type : boolean, default False use_cursor_overlay ¶ Show cursor in viewport Type : boolean, default False use_cursor_overlay_override ¶ Don’t show overlay during a stroke Type : boolean, default False use_curve ¶ Define the stroke curve with a Bézier curve. Dabs are separated according to spacing. Type : boolean, default False use_density_pressure ¶ Use pressure to modulate density Type : boolean, default False use_edge_to_edge ¶ Drag anchor brush from edge-to-edge Type : boolean, default False use_flow_pressure ¶ Use pressure to modulate flow Type : boolean, default False use_frontface ¶ Brush only affects vertices that face the viewer Type : boolean, default False use_frontface_falloff ¶ Blend brush influence by how much they face the front Type : boolean, default False use_grab_active_vertex ¶ Apply the maximum grab strength to the active vertex instead of the cursor location Type : boolean, default False use_grab_silhouette ¶ Grabs trying to automask the silhouette of the object Type : boolean, default False use_hardness_pressure ¶ Use pressure to modulate hardness Type : boolean, default False use_inverse_smooth_pressure ¶ Lighter pressure causes more smoothing to be applied Type : boolean, default False use_line ¶ Draw a line with dabs separated according to spac