Blender V5.0
blender::ed::sculpt_paint::vwpaint Namespace Reference

Classes

struct  NormalAnglePrecalc

Functions

Shared vertex/weight paint code.
void view_angle_limits_init (NormalAnglePrecalc *a, float angle, bool do_mask_normal)
float view_angle_limits_apply_falloff (const NormalAnglePrecalc *a, float angle_cos, float *mask_p)
bool test_brush_angle_falloff (const Brush &brush, const NormalAnglePrecalc &normal_angle_precalc, float angle_cos, float *brush_strength)
bool use_normal (const VPaint &vp)
bool brush_use_accumulate_ex (const Brush &brush, eObjectMode ob_mode)
bool brush_use_accumulate (const VPaint &vp)
void get_brush_alpha_data (const SculptSession &ss, const Paint &paint, const Brush &brush, float *r_brush_size_pressure, float *r_brush_alpha_value, float *r_brush_alpha_pressure)
void init_stroke (Depsgraph &depsgraph, Object &ob)
void init_session_data (const ToolSettings &ts, Object &ob)
void init_session (Main &bmain, Depsgraph &depsgraph, Scene &scene, Paint &paint, Object &ob, eObjectMode object_mode)
IndexMask pbvh_gather_generic (const Depsgraph &depsgraph, const Object &ob, const VPaint &wp, const Brush &brush, IndexMaskMemory &memory)
void mode_enter_generic (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob, eObjectMode mode_flag)
void mode_exit_generic (Object &ob, eObjectMode mode_flag)
bool mode_toggle_poll_test (bContext *C)
void smooth_brush_toggle_off (Paint *paint, StrokeCache *cache)
void smooth_brush_toggle_on (const bContext *C, Paint *paint, StrokeCache *cache)
void update_cache_variants (bContext *C, VPaint &vp, Object &ob, PointerRNA *ptr)
void update_cache_invariants (bContext *C, VPaint &vp, SculptSession &ss, wmOperator *op, const float mval[2])
void last_stroke_update (const float location[3], Paint &paint)

Function Documentation

◆ brush_use_accumulate()

bool blender::ed::sculpt_paint::vwpaint::brush_use_accumulate ( const VPaint & vp)

◆ brush_use_accumulate_ex()

bool blender::ed::sculpt_paint::vwpaint::brush_use_accumulate_ex ( const Brush & brush,
eObjectMode ob_mode )

◆ get_brush_alpha_data()

◆ init_session()

void blender::ed::sculpt_paint::vwpaint::init_session ( Main & bmain,
Depsgraph & depsgraph,
Scene & scene,
Paint & paint,
Object & ob,
eObjectMode object_mode )

◆ init_session_data()

◆ init_stroke()

void blender::ed::sculpt_paint::vwpaint::init_stroke ( Depsgraph & depsgraph,
Object & ob )

◆ last_stroke_update()

void blender::ed::sculpt_paint::vwpaint::last_stroke_update ( const float location[3],
Paint & paint )

◆ mode_enter_generic()

◆ mode_exit_generic()

◆ mode_toggle_poll_test()

bool blender::ed::sculpt_paint::vwpaint::mode_toggle_poll_test ( bContext * C)

◆ pbvh_gather_generic()

◆ smooth_brush_toggle_off()

◆ smooth_brush_toggle_on()

◆ test_brush_angle_falloff()

bool blender::ed::sculpt_paint::vwpaint::test_brush_angle_falloff ( const Brush & brush,
const NormalAnglePrecalc & normal_angle_precalc,
float angle_cos,
float * brush_strength )

◆ update_cache_invariants()

void blender::ed::sculpt_paint::vwpaint::update_cache_invariants ( bContext * C,
VPaint & vp,
SculptSession & ss,
wmOperator * op,
const float mval[2] )

Initialize the stroke cache invariants from operator properties.

Definition at line 431 of file paint_vertex.cc.

References blender::ed::sculpt_paint::StrokeCache::accum, blender::ed::sculpt_paint::StrokeCache::alt_smooth, BKE_brush_alpha_get(), BKE_brush_color_jitter_get_settings(), BKE_paint_brush(), blender::ed::sculpt_paint::StrokeCache::brush, BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH, blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, copy_m3_m4(), copy_v2_v2(), CTX_data_active_object(), wmOperator::customdata, blender::bke::PaintRuntime::draw_inverted, ED_view3d_ob_project_mat_get(), blender::ed::sculpt_paint::StrokeCache::first_time, blender::ed::sculpt_paint::StrokeCache::initial_hsv_jitter, blender::ed::sculpt_paint::StrokeCache::initial_mouse, blender::ed::sculpt_paint::StrokeCache::invert, invert_m4_m4(), blender::ed::sculpt_paint::StrokeCache::is_last_valid, blender::ed::sculpt_paint::StrokeCache::mouse, mul_m3_v3(), normalize_v3_v3(), blender::ed::sculpt_paint::StrokeCache::paint, VPaint::paint, blender::ed::sculpt_paint::paint_stroke_view_context(), blender::ed::sculpt_paint::StrokeCache::projection_mat, wmOperator::ptr, RNA_enum_get(), Object::runtime, Paint::runtime, ViewContext::rv3d, seed_hsv_jitter(), smooth_brush_toggle_on(), blender::ed::sculpt_paint::StrokeCache::vc, blender::ed::sculpt_paint::StrokeCache::view_normal, blender::ed::sculpt_paint::StrokeCache::view_normal_symm, RegionView3D::viewinv, and zero_v2().

Referenced by vpaint_stroke_test_start(), and wpaint_stroke_test_start().

◆ update_cache_variants()

◆ use_normal()

◆ view_angle_limits_apply_falloff()

float blender::ed::sculpt_paint::vwpaint::view_angle_limits_apply_falloff ( const NormalAnglePrecalc * a,
float angle_cos,
float * mask_p )

◆ view_angle_limits_init()