Blender V5.3
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
 BMesh Iterators.
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::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, 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)
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.