Blender V5.0
clay_strips.cc File Reference

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::brushes::clay_strips_cc::LocalData

Namespaces

namespace  blender
namespace  blender::ed
namespace  blender::ed::sculpt_paint
namespace  blender::ed::sculpt_paint::brushes
namespace  blender::ed::sculpt_paint::brushes::clay_strips_cc
namespace  blender::ed::sculpt_paint::brushes::clay_strips

Functions

static void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_local_positions (const Span< float3 > vert_positions, const Span< int > verts, const float4x4 &mat, const MutableSpan< float2 > xy_positions, const MutableSpan< float > z_positions)
static void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_local_positions (const Span< float3 > positions, const float4x4 &mat, const MutableSpan< float2 > xy_positions, const MutableSpan< float > z_positions)
static void blender::ed::sculpt_paint::brushes::clay_strips_cc::apply_z_axis_factors (const Span< float > z_positions, const MutableSpan< float > factors)
static void blender::ed::sculpt_paint::brushes::clay_strips_cc::apply_plane_trim_factors (const Brush &brush, const Span< float > z_positions, const MutableSpan< float > factors)
static void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_faces (const Depsgraph &depsgraph, const Sculpt &sd, const Brush &brush, const float4x4 &mat, const float3 &offset, const Span< float3 > vert_normals, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, LocalData &tls, const PositionDeformData &position_data)
static void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_grids (const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Brush &brush, const float4x4 &mat, const float3 &offset, const bke::pbvh::GridsNode &node, LocalData &tls)
static void blender::ed::sculpt_paint::brushes::clay_strips_cc::calc_bmesh (const Depsgraph &depsgraph, const Sculpt &sd, Object &object, const Brush &brush, const float4x4 &mat, const float3 &offset, bke::pbvh::BMeshNode &node, LocalData &tls)
void blender::ed::sculpt_paint::brushes::do_clay_strips_brush (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const IndexMask &node_mask, const float3 &plane_normal, const float3 &plane_center)
static bool blender::ed::sculpt_paint::brushes::clay_strips::node_in_box (const float4x4 &mat, const Bounds< float3 > &bounds)
float4x4 blender::ed::sculpt_paint::brushes::clay_strips::calc_local_matrix (const Brush &brush, const StrokeCache &cache, const float3 &plane_normal, const float3 &plane_center, const bool flip)
CursorSampleResult blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask (const Depsgraph &depsgraph, Object &ob, const Brush &brush, IndexMaskMemory &memory)

Detailed Description

The Clay Strips brush displaces vertices toward the brush plane. The displacement occurs in the direction of the plane's normal. Only vertices located below the plane (in brush-local space) are affected.

The magnitude of the displacement is determined by the product of the following factors:

  • A falloff factor based on the XY distance from the center of the plane
  • A parabolic falloff factor based on the local Z distance from the plane
  • Additional standard modifiers such as masking, brush strength, texture masking, etc.

Definition in file clay_strips.cc.