Blender V5.3
paint_weight.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_array_utils_c.hh"
#include "BLI_color_mix.hh"
#include "BLI_enumerable_thread_specific.hh"
#include "BLI_listbase.hh"
#include "BLI_math_base.hh"
#include "BLI_task.hh"
#include "BLI_vector.hh"
#include "DNA_brush_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "RNA_access.hh"
#include "BKE_attribute.hh"
#include "BKE_brush.hh"
#include "BKE_context.hh"
#include "BKE_deform.hh"
#include "BKE_editmesh.hh"
#include "BKE_global.hh"
#include "BKE_mesh.hh"
#include "BKE_object_deform.h"
#include "BKE_object_types.hh"
#include "BKE_paint.hh"
#include "BKE_report.hh"
#include "DEG_depsgraph.hh"
#include "WM_api.hh"
#include "WM_message.hh"
#include "WM_toolsystem.hh"
#include "WM_types.hh"
#include "ED_mesh.hh"
#include "ED_object.hh"
#include "ED_paint.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "IMB_imbuf.hh"
#include "ED_object_vgroup.hh"
#include "bmesh.hh"
#include "RNA_define.hh"
#include "../paint_intern.hh"
#include "mesh_brush_common.hh"
#include "mesh_paint.hh"
#include "sculpt_automask.hh"
#include "sculpt_intern.hh"
#include "vw_paint_intern.hh"

Go to the source code of this file.

Classes

struct  blender::WPaintAverageAccum
struct  blender::WeightPaintGroupData
struct  blender::WeightPaintInfo
struct  blender::WPaintData
struct  blender::WeightPaintStroke

Namespaces

namespace  blender
 BMesh Iterators.

Functions

static MDeformVert * blender::defweight_prev_init (MDeformVert *dvert_prev, MDeformVert *dvert_curr, int index)
static float blender::wpaint_blend (const VPaint &wp, float weight, const float alpha, float paintval, const float paint_factor, const bool do_flip)
static float blender::wpaint_clamp_monotonic (float oldval, float curval, float newval)
static float blender::wpaint_undo_lock_relative (float weight, float old_weight, float locked_weight, float free_weight, bool auto_normalize)
static void blender::do_weight_paint_normalize_all (MDeformVert *dvert, const int defbase_tot, const bool *vgroup_validmap)
static bool blender::do_weight_paint_normalize_all_locked (MDeformVert *dvert, const int defbase_tot, const bool *vgroup_validmap, const bool *lock_flags)
static void blender::do_weight_paint_normalize_all_locked_try_active (MDeformVert *dvert, const int defbase_tot, const bool *vgroup_validmap, const bool *lock_flags, const bool *lock_with_active)
static void blender::multipaint_clamp_change (MDeformVert *dvert, const int defbase_tot, const bool *defbase_sel, float *change_p)
static bool blender::multipaint_verify_change (MDeformVert *dvert, const int defbase_tot, float change, const bool *defbase_sel)
static void blender::multipaint_apply_change (MDeformVert *dvert, const int defbase_tot, float change, const bool *defbase_sel)
static void blender::do_weight_paint_vertex_single (const VPaint &wp, Object &ob, WPaintData &wpd, const WeightPaintInfo &wpi, const uint index, float alpha, float paintweight, float automasking_factor)
static void blender::do_weight_paint_vertex_multi (const VPaint &wp, Object &ob, WPaintData &wpd, const WeightPaintInfo &wpi, const uint index, float alpha, float paintweight, float additional_factor)
static void blender::do_weight_paint_vertex (const VPaint &wp, Object &ob, WPaintData &wpd, const WeightPaintInfo &wpi, const uint index, float final_alpha, float paintweight, float automasking_factor=1.0f)
static void blender::init_session_data (const VPaint &wpaint, Object &ob, WPaintData &wpd)
static float blender::wpaint_get_active_weight (const MDeformVert &dv, const WeightPaintInfo &wpi)
static void blender::precompute_weight_values (Object &ob, const Brush &brush, WPaintData &wpd, WeightPaintInfo &wpi, Mesh &mesh)
Weight paint brushes.
static void blender::parallel_nodes_loop_with_mirror_check (const Mesh &mesh, const IndexMask &node_mask, FunctionRef< void(IndexRange)> fn)
static void blender::filter_factors_with_selection (const Span< bool > select_vert, const Span< int > verts, const MutableSpan< float > factors)
static void blender::do_wpaint_brush_blur (const Depsgraph &depsgraph, Object &ob, const Brush &brush, VPaint &vp, WPaintData &wpd, const WeightPaintInfo &wpi, Mesh &mesh, const IndexMask &node_mask)
static void blender::do_wpaint_brush_smear (const Depsgraph &depsgraph, Object &ob, const Brush &brush, VPaint &vp, WPaintData &wpd, const WeightPaintInfo &wpi, Mesh &mesh, const IndexMask &node_mask)
static void blender::do_wpaint_brush_draw (const Depsgraph &depsgraph, Object &ob, const Brush &brush, VPaint &vp, WPaintData &wpd, const WeightPaintInfo &wpi, Mesh &mesh, const float strength, const IndexMask &node_mask)
static float blender::calculate_average_weight (const Depsgraph &depsgraph, Object &ob, const Mesh &mesh, const Brush &brush, const VPaint &vp, WeightPaintInfo &wpi, const IndexMask &node_mask)
static void blender::wpaint_paint_leaves (const Depsgraph &depsgraph, Object &ob, VPaint &vp, WPaintData &wpd, WeightPaintInfo &wpi, Mesh &mesh, const IndexMask &node_mask)
Enter Weight Paint Mode
void blender::ED_object_wpaintmode_enter_ex (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob)
void blender::ED_object_wpaintmode_enter (bContext *C, Depsgraph &depsgraph)
Exit Weight Paint Mode
void blender::ED_object_wpaintmode_exit_ex (Scene &scene, Object &ob)
void blender::ED_object_wpaintmode_exit (bContext *C)
Toggle Weight Paint Operator
bool blender::weight_paint_mode_poll (bContext *C)
bool blender::weight_paint_mode_region_view3d_poll (bContext *C)
static bool blender::weight_paint_poll_ex (bContext *C, bool check_tool)
bool blender::weight_paint_poll (bContext *C)
bool blender::weight_paint_poll_ignore_tool (bContext *C)
static wmOperatorStatus blender::wpaint_mode_toggle_exec (bContext *C, wmOperator *op)
void blender::PAINT_OT_weight_paint_toggle (wmOperatorType *ot)
Weight Paint Operator
static void blender::wpaint_do_paint (const Depsgraph &depsgraph, const Scene &scene, const Brush &brush, Object &ob, PaintModeData *mode_data)
static wmOperatorStatus blender::wpaint_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::wpaint_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::wpaint_modal (bContext *C, wmOperator *op, const wmEvent *event)
void blender::PAINT_OT_weight_paint (wmOperatorType *ot)

Detailed Description

Used for vertex color & weight paint and mode switching.

Note
This file is already big, use paint_vertex_color_ops.cc & paint_vertex_weight_ops.cc for general purpose operators.

Definition in file paint_weight.cc.