|
Blender V4.3
|
#include "MEM_guardedalloc.h"#include "BLI_array_utils.h"#include "BLI_color.hh"#include "BLI_color_mix.hh"#include "BLI_enumerable_thread_specific.hh"#include "BLI_listbase.h"#include "BLI_math_base.hh"#include "BLI_rect.h"#include "BLI_string.h"#include "BLI_task.h"#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_lib_id.hh"#include "BKE_mesh.hh"#include "BKE_mesh_mapping.hh"#include "BKE_object.hh"#include "BKE_object_deform.h"#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_image.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 "BKE_ccg.hh"#include "bmesh.hh"#include "mesh_brush_common.hh"#include "paint_intern.hh"#include "sculpt_automask.hh"#include "sculpt_intern.hh"Go to the source code of this file.
Classes | |
| struct | WPaintAverageAccum |
| struct | WeightPaintGroupData |
| struct | WPaintData |
| struct | WeightPaintInfo |
Functions | |
| static MDeformVert * | defweight_prev_init (MDeformVert *dvert_prev, MDeformVert *dvert_curr, int index) |
| static float | wpaint_blend (const VPaint &wp, float weight, const float alpha, float paintval, const float, const bool do_flip) |
| static float | wpaint_clamp_monotonic (float oldval, float curval, float newval) |
| static float | wpaint_undo_lock_relative (float weight, float old_weight, float locked_weight, float free_weight, bool auto_normalize) |
| static void | do_weight_paint_normalize_all (MDeformVert *dvert, const int defbase_tot, const bool *vgroup_validmap) |
| static bool | do_weight_paint_normalize_all_locked (MDeformVert *dvert, const int defbase_tot, const bool *vgroup_validmap, const bool *lock_flags) |
| static void | 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 | multipaint_clamp_change (MDeformVert *dvert, const int defbase_tot, const bool *defbase_sel, float *change_p) |
| static bool | multipaint_verify_change (MDeformVert *dvert, const int defbase_tot, float change, const bool *defbase_sel) |
| static void | multipaint_apply_change (MDeformVert *dvert, const int defbase_tot, float change, const bool *defbase_sel) |
| static void | do_weight_paint_vertex_single (const VPaint &wp, Object &ob, const WeightPaintInfo &wpi, const uint index, float alpha, float paintweight) |
| static void | do_weight_paint_vertex_multi (const VPaint &wp, Object &ob, const WeightPaintInfo &wpi, const uint index, float alpha, float paintweight) |
| static void | do_weight_paint_vertex (const VPaint &wp, Object &ob, const WeightPaintInfo &wpi, const uint index, float alpha, float paintweight) |
| static bool | wpaint_stroke_test_start (bContext *C, wmOperator *op, const float mouse[2]) |
| static float | wpaint_get_active_weight (const MDeformVert &dv, const WeightPaintInfo &wpi) |
| static void | precompute_weight_values (Object &ob, const Brush &brush, WPaintData &wpd, WeightPaintInfo &wpi, Mesh &mesh) |
Weight paint brushes. | |
| static void | parallel_nodes_loop_with_mirror_check (const Mesh &mesh, const IndexMask &node_mask, FunctionRef< void(IndexRange)> fn) |
| static void | filter_factors_with_selection (const Span< bool > select_vert, const Span< int > verts, const MutableSpan< float > factors) |
| static void | do_wpaint_brush_blur (const Depsgraph &depsgraph, const Scene &scene, Object &ob, const Brush &brush, VPaint &vp, WPaintData &wpd, const WeightPaintInfo &wpi, Mesh &mesh, const IndexMask &node_mask) |
| static void | do_wpaint_brush_smear (const Depsgraph &depsgraph, const Scene &scene, Object &ob, const Brush &brush, VPaint &vp, WPaintData &wpd, const WeightPaintInfo &wpi, Mesh &mesh, const IndexMask &node_mask) |
| static void | do_wpaint_brush_draw (const Depsgraph &depsgraph, const Scene &scene, Object &ob, const Brush &brush, VPaint &vp, WPaintData &wpd, const WeightPaintInfo &wpi, Mesh &mesh, const float strength, const IndexMask &node_mask) |
| static float | 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 | wpaint_paint_leaves (bContext *C, Object &ob, VPaint &vp, WPaintData &wpd, WeightPaintInfo &wpi, Mesh &mesh, const IndexMask &node_mask) |
Enter Weight Paint Mode | |
| void | ED_object_wpaintmode_enter_ex (Main &bmain, Depsgraph &depsgraph, Scene &scene, Object &ob) |
| void | ED_object_wpaintmode_enter (bContext *C, Depsgraph &depsgraph) |
Exit Weight Paint Mode | |
| void | ED_object_wpaintmode_exit_ex (Object &ob) |
| void | ED_object_wpaintmode_exit (bContext *C) |
Toggle Weight Paint Operator | |
| bool | weight_paint_mode_poll (bContext *C) |
| bool | weight_paint_mode_region_view3d_poll (bContext *C) |
| static bool | weight_paint_poll_ex (bContext *C, bool check_tool) |
| bool | weight_paint_poll (bContext *C) |
| bool | weight_paint_poll_ignore_tool (bContext *C) |
| static int | wpaint_mode_toggle_exec (bContext *C, wmOperator *op) |
| void | PAINT_OT_weight_paint_toggle (wmOperatorType *ot) |
Weight Paint Operator | |
| static void | wpaint_do_paint (bContext *C, Object &ob, VPaint &wp, WPaintData &wpd, WeightPaintInfo &wpi, Mesh &mesh, Brush &brush, const ePaintSymmetryFlags symm, const int axis, const int i, const float angle) |
| static void | wpaint_do_radial_symmetry (bContext *C, Object &ob, VPaint &wp, WPaintData &wpd, WeightPaintInfo &wpi, Mesh &mesh, Brush &brush, const ePaintSymmetryFlags symm, const int axis) |
| static void | wpaint_do_symmetrical_brush_actions (bContext *C, Object &ob, VPaint &wp, WPaintData &wpd, WeightPaintInfo &wpi) |
| static void | wpaint_stroke_update_step (bContext *C, wmOperator *, PaintStroke *stroke, PointerRNA *itemptr) |
| static void | wpaint_stroke_done (const bContext *C, PaintStroke *) |
| static int | wpaint_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| static int | wpaint_exec (bContext *C, wmOperator *op) |
| static void | wpaint_cancel (bContext *C, wmOperator *op) |
| static int | wpaint_modal (bContext *C, wmOperator *op, const wmEvent *event) |
| void | PAINT_OT_weight_paint (wmOperatorType *ot) |
Used for vertex color & weight paint and mode switching.
paint_vertex_color_ops.cc & paint_vertex_weight_ops.cc for general purpose operators. Definition in file paint_weight.cc.
|
static |
Definition at line 1420 of file paint_weight.cc.
References SculptSession::cache, depsgraph, blender::ed::sculpt_paint::LocalData::distances, blender::ed::sculpt_paint::LocalData::factors, Brush::falloff_shape, blender::index_mask::IndexMask::index_range(), ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, blender::bke::pbvh::Tree::nodes(), blender::threading::parallel_reduce(), blender::bke::object::pbvh_get(), Object::sculpt, SCULPT_brush_frontface_normal_from_falloff_shape(), blender::ed::sculpt_paint::vwpaint::use_normal(), blender::bke::pbvh::vert_normals_eval(), and blender::bke::pbvh::vert_positions_eval().
Referenced by wpaint_paint_leaves().
|
static |
Definition at line 181 of file paint_weight.cc.
References BKE_defvert_copy(), and MDeformVert::flag.
Referenced by do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().
|
static |
Definition at line 276 of file paint_weight.cc.
References MDeformWeight::def_nr, MDeformVert::dw, sum(), MDeformVert::totweight, and MDeformWeight::weight.
Referenced by do_weight_paint_normalize_all_locked().
|
static |
A version of do_weight_paint_normalize_all that includes locked weights but only changes unlocked weights.
Definition at line 320 of file paint_weight.cc.
References CLAMP, MDeformWeight::def_nr, do_weight_paint_normalize_all(), MDeformVert::dw, sum(), MDeformVert::totweight, VERTEX_WEIGHT_LOCK_EPSILON, and MDeformWeight::weight.
Referenced by do_weight_paint_normalize_all_locked_try_active().
|
static |
Locks prevented the first pass from full completion, so remove restriction on active group; e.g:
Definition at line 406 of file paint_weight.cc.
References do_weight_paint_normalize_all_locked().
Referenced by do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().
|
static |
Definition at line 849 of file paint_weight.cc.
References WeightPaintInfo::do_multipaint, do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().
Referenced by do_wpaint_brush_blur(), do_wpaint_brush_draw(), and do_wpaint_brush_smear().
|
static |
Definition at line 726 of file paint_weight.cc.
References WeightPaintInfo::active, BKE_defvert_calc_lock_relative_weight(), BKE_defvert_lock_relative_weight(), BKE_defvert_multipaint_collective_weight(), BKE_defvert_total_selected_weight(), WeightPaintInfo::brush_alpha_value, blender::ed::sculpt_paint::vwpaint::brush_use_accumulate(), CLAMP, blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::MutableSpan< T >::data(), Object::data, WeightPaintInfo::defbase_sel, WeightPaintInfo::defbase_tot, WeightPaintInfo::defbase_tot_sel, defweight_prev_init(), WeightPaintInfo::do_auto_normalize, WeightPaintInfo::do_flip, WeightPaintInfo::do_lock_relative, do_weight_paint_normalize_all_locked_try_active(), WeightPaintInfo::dvert, SculptSession::dvert_prev, ELEM, WeightPaintInfo::is_normalized, WeightPaintGroupData::lock, WeightPaintInfo::lock_flags, ME_EDIT_MIRROR_TOPO, ME_USING_MIRROR_X_VERTEX_GROUPS, mesh_get_x_mirror_vert(), SculptSession::mode, multipaint_apply_change(), multipaint_clamp_change(), multipaint_verify_change(), Object::sculpt, WeightPaintInfo::vgroup_locked, WeightPaintInfo::vgroup_unlocked, WeightPaintInfo::vgroup_validmap, SculptSession::wpaint, wpaint_blend(), wpaint_clamp_monotonic(), and wpaint_undo_lock_relative().
Referenced by do_weight_paint_vertex().
|
static |
Definition at line 521 of file paint_weight.cc.
References WeightPaintInfo::active, BKE_defvert_calc_lock_relative_weight(), BKE_defvert_ensure_index(), BKE_defvert_find_index(), BKE_defvert_find_weight(), BKE_defvert_lock_relative_weight(), BKE_defvert_total_selected_weight(), WeightPaintInfo::brush_alpha_value, blender::ed::sculpt_paint::vwpaint::brush_use_accumulate(), CLAMP, blender::Array< T, InlineBufferCapacity, Allocator >::data(), blender::MutableSpan< T >::data(), Object::data, WeightPaintInfo::defbase_tot, defweight_prev_init(), WeightPaintInfo::do_auto_normalize, WeightPaintInfo::do_flip, WeightPaintInfo::do_lock_relative, do_weight_paint_normalize_all_locked_try_active(), WeightPaintInfo::dvert, SculptSession::dvert_prev, MDeformVert::dw, VPaint::flag, WeightPaintGroupData::index, int, WeightPaintGroupData::lock, WeightPaintInfo::lock_flags, ME_EDIT_MIRROR_TOPO, ME_USING_MIRROR_X_VERTEX_GROUPS, mesh_get_x_mirror_vert(), WeightPaintInfo::mirror, SculptSession::mode, Object::sculpt, MDeformVert::totweight, VERTEX_WEIGHT_LOCK_EPSILON, WeightPaintInfo::vgroup_locked, WeightPaintInfo::vgroup_unlocked, WeightPaintInfo::vgroup_validmap, VP_FLAG_VGROUP_RESTRICT, MDeformWeight::weight, SculptSession::wpaint, wpaint_blend(), wpaint_clamp_monotonic(), and wpaint_undo_lock_relative().
Referenced by do_weight_paint_vertex().
|
static |
Definition at line 1094 of file paint_weight.cc.
References SculptSession::alpha_weight, BRUSH_ACCUMULATE, brush_strength(), SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), blender::ed::sculpt_paint::calc_brush_strength_factors(), depsgraph, blender::ed::sculpt_paint::LocalData::distances, do_weight_paint_vertex(), dot_v3v3(), blender::ed::sculpt_paint::LocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::filter_distances_with_radius(), filter_factors_with_selection(), Brush::flag, blender::ed::sculpt_paint::vwpaint::get_brush_alpha_data(), blender::threading::EnumerableThreadSpecific< T >::local(), ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, SculptSession::mode, blender::bke::pbvh::Tree::nodes(), WPaintData::normal_angle_precalc, parallel_nodes_loop_with_mirror_check(), blender::bke::object::pbvh_get(), WPaintData::precomputed_weight, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), Object::sculpt, SCULPT_brush_frontface_normal_from_falloff_shape(), blender::index_mask::IndexMask::slice(), blender::Span< T >::slice(), blender::ed::sculpt_paint::vwpaint::test_brush_angle_falloff(), blender::ed::sculpt_paint::vwpaint::use_normal(), blender::bke::pbvh::vert_normals_eval(), blender::bke::pbvh::vert_positions_eval(), verts, and SculptSession::wpaint.
Referenced by wpaint_paint_leaves().
|
static |
Definition at line 1328 of file paint_weight.cc.
References SculptSession::alpha_weight, BRUSH_ACCUMULATE, brush_strength(), SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), blender::ed::sculpt_paint::calc_brush_strength_factors(), depsgraph, blender::ed::sculpt_paint::LocalData::distances, do_weight_paint_vertex(), dot_v3v3(), blender::ed::sculpt_paint::LocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::filter_distances_with_radius(), filter_factors_with_selection(), Brush::flag, blender::ed::sculpt_paint::vwpaint::get_brush_alpha_data(), blender::threading::EnumerableThreadSpecific< T >::local(), ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, SculptSession::mode, blender::bke::pbvh::Tree::nodes(), WPaintData::normal_angle_precalc, parallel_nodes_loop_with_mirror_check(), blender::bke::object::pbvh_get(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), Object::sculpt, SCULPT_brush_frontface_normal_from_falloff_shape(), blender::index_mask::IndexMask::slice(), blender::ed::sculpt_paint::vwpaint::test_brush_angle_falloff(), blender::ed::sculpt_paint::vwpaint::use_normal(), blender::bke::pbvh::vert_normals_eval(), blender::bke::pbvh::vert_positions_eval(), verts, and SculptSession::wpaint.
Referenced by wpaint_paint_leaves().
|
static |
Definition at line 1202 of file paint_weight.cc.
References brush_strength(), blender::ed::sculpt_paint::StrokeCache::bstrength, SculptSession::cache, blender::ed::sculpt_paint::calc_brush_distances(), blender::ed::sculpt_paint::calc_brush_strength_factors(), depsgraph, blender::ed::sculpt_paint::LocalData::distances, do_weight_paint_vertex(), dot_v3v3(), blender::ed::sculpt_paint::LocalData::factors, Brush::falloff_shape, blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::filter_distances_with_radius(), filter_factors_with_selection(), blender::ed::sculpt_paint::vwpaint::get_brush_alpha_data(), blender::ed::sculpt_paint::StrokeCache::is_last_valid, blender::ed::sculpt_paint::StrokeCache::last_location_symm, blender::threading::EnumerableThreadSpecific< T >::local(), blender::ed::sculpt_paint::StrokeCache::location_symm, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, blender::bke::pbvh::Tree::nodes(), WPaintData::normal_angle_precalc, normalize_v3(), parallel_nodes_loop_with_mirror_check(), blender::bke::object::pbvh_get(), WPaintData::precomputed_weight, project_plane_v3_v3v3(), blender::ed::sculpt_paint::StrokeCache::radius, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), Object::sculpt, SCULPT_brush_frontface_normal_from_falloff_shape(), blender::index_mask::IndexMask::slice(), blender::Span< T >::slice(), sub_v3_v3v3(), blender::ed::sculpt_paint::vwpaint::test_brush_angle_falloff(), blender::ed::sculpt_paint::vwpaint::use_normal(), blender::bke::pbvh::vert_normals_eval(), blender::bke::pbvh::vert_positions_eval(), verts, and blender::ed::sculpt_paint::StrokeCache::view_normal_symm.
Referenced by wpaint_paint_leaves().
| void ED_object_wpaintmode_enter | ( | bContext * | C, |
| Depsgraph & | depsgraph ) |
Definition at line 1557 of file paint_weight.cc.
References CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), depsgraph, and ED_object_wpaintmode_enter_ex().
| void ED_object_wpaintmode_enter_ex | ( | Main & | bmain, |
| Depsgraph & | depsgraph, | ||
| Scene & | scene, | ||
| Object & | ob ) |
Definition at line 1553 of file paint_weight.cc.
References depsgraph, blender::ed::sculpt_paint::vwpaint::mode_enter_generic(), and OB_MODE_WEIGHT_PAINT.
Referenced by ED_editors_init(), ED_object_wpaintmode_enter(), and wpaint_mode_toggle_exec().
| void ED_object_wpaintmode_exit | ( | bContext * | C | ) |
Definition at line 1574 of file paint_weight.cc.
References CTX_data_active_object(), and ED_object_wpaintmode_exit_ex().
| void ED_object_wpaintmode_exit_ex | ( | Object & | ob | ) |
Definition at line 1570 of file paint_weight.cc.
References blender::ed::sculpt_paint::vwpaint::mode_exit_generic(), and OB_MODE_WEIGHT_PAINT.
Referenced by blender::ed::object::ed_object_mode_generic_exit_ex(), ED_object_wpaintmode_exit(), and wpaint_mode_toggle_exec().
|
static |
Definition at line 1081 of file paint_weight.cc.
References BLI_assert, blender::MutableSpan< T >::size(), and verts.
Referenced by do_wpaint_brush_blur(), do_wpaint_brush_draw(), and do_wpaint_brush_smear().
|
static |
Definition at line 503 of file paint_weight.cc.
References CLAMP, MDeformWeight::def_nr, MDeformVert::dw, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by do_weight_paint_vertex_multi().
|
static |
Definition at line 450 of file paint_weight.cc.
References MDeformWeight::def_nr, MDeformVert::dw, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by do_weight_paint_vertex_multi().
|
static |
Definition at line 475 of file paint_weight.cc.
References MDeformWeight::def_nr, MDeformVert::dw, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by do_weight_paint_vertex_multi().
| void PAINT_OT_weight_paint | ( | wmOperatorType * | ot | ) |
Definition at line 1979 of file paint_weight.cc.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_UNDO, ot, paint_stroke_operator_properties(), wmOperatorType::poll, weight_paint_poll(), wpaint_cancel(), wpaint_exec(), wpaint_invoke(), and wpaint_modal().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_weight_paint_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 1677 of file paint_weight.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, blender::ed::sculpt_paint::vwpaint::mode_toggle_poll_test(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and wpaint_mode_toggle_exec().
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 1067 of file paint_weight.cc.
References blender::index_mask::IndexMask::index_range(), ME_USING_MIRROR_X_VERTEX_GROUPS, and blender::threading::parallel_for().
Referenced by do_wpaint_brush_blur(), do_wpaint_brush_draw(), and do_wpaint_brush_smear().
|
static |
Definition at line 1043 of file paint_weight.cc.
References blender::ed::sculpt_paint::vwpaint::brush_use_accumulate_ex(), Object::mode, blender::threading::parallel_for(), and WPaintData::precomputed_weight_ready.
Referenced by wpaint_stroke_update_step().
| bool weight_paint_mode_poll | ( | bContext * | C | ) |
Definition at line 1585 of file paint_weight.cc.
References CTX_data_active_object(), Object::data, Object::mode, and OB_MODE_WEIGHT_PAINT.
Referenced by ED_keymap_paint(), PAINT_OT_weight_sample(), PAINT_OT_weight_set(), and weight_paint_mode_region_view3d_poll().
| bool weight_paint_mode_region_view3d_poll | ( | bContext * | C | ) |
Definition at line 1592 of file paint_weight.cc.
References ED_operator_region_view3d_active(), and weight_paint_mode_poll().
Referenced by PAINT_OT_weight_sample_group().
| bool weight_paint_poll | ( | bContext * | C | ) |
Definition at line 1616 of file paint_weight.cc.
References weight_paint_poll_ex().
Referenced by blender::ed::sculpt_paint::vwpaint::mode_enter_generic(), and PAINT_OT_weight_paint().
|
static |
Definition at line 1597 of file paint_weight.cc.
References BKE_paint_brush(), CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_area(), CTX_wm_region(), ELEM, Object::mode, OB_MODE_WEIGHT_PAINT, RGN_TYPE_HUD, RGN_TYPE_WINDOW, SPACE_VIEW3D, and WM_toolsystem_active_tool_is_brush().
Referenced by weight_paint_poll(), and weight_paint_poll_ignore_tool().
| bool weight_paint_poll_ignore_tool | ( | bContext * | C | ) |
Definition at line 1621 of file paint_weight.cc.
References weight_paint_poll_ex().
Referenced by PAINT_OT_weight_gradient().
|
static |
Definition at line 194 of file paint_weight.cc.
References BKE_paint_brush_for_read(), blend, Brush::blend, CLAMP, ED_wpaint_blend_tool(), IMB_BLEND_ADD, IMB_BLEND_DARKEN, IMB_BLEND_LIGHTEN, IMB_BLEND_MIX, IMB_BLEND_SUB, and VPaint::paint.
Referenced by do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().
|
static |
Definition at line 1965 of file paint_weight.cc.
References SculptSession::cache, CTX_data_active_object(), wmOperator::customdata, blender::ed::sculpt_paint::paint_stroke_cancel(), and Object::sculpt.
Referenced by PAINT_OT_weight_paint().
Definition at line 233 of file paint_weight.cc.
Referenced by do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().
|
static |
Definition at line 1694 of file paint_weight.cc.
References SculptSession::cache, CTX_data_depsgraph_pointer(), depsgraph, blender::ed::sculpt_paint::vwpaint::pbvh_gather_generic(), blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, Object::sculpt, SCULPT_cache_calc_brushdata_symm(), and wpaint_paint_leaves().
Referenced by wpaint_do_radial_symmetry(), and wpaint_do_symmetrical_brush_actions().
|
static |
Definition at line 1717 of file paint_weight.cc.
References M_PI, VPaint::radial_symm, and wpaint_do_paint().
Referenced by wpaint_do_symmetrical_brush_actions().
|
static |
Definition at line 1735 of file paint_weight.cc.
References BKE_paint_brush(), SculptSession::cache, copy_v3_v3(), Object::data, ELEM, blender::ed::sculpt_paint::StrokeCache::is_last_valid, blender::ed::sculpt_paint::StrokeCache::last_location, blender::ed::sculpt_paint::StrokeCache::location, ME_EDIT_MIRROR_VERTEX_GROUPS, blender::ed::sculpt_paint::StrokeCache::mirror_symmetry_pass, VPaint::paint, blender::ed::sculpt_paint::StrokeCache::radial_symmetry_pass, Object::sculpt, SCULPT_cache_calc_brushdata_symm(), SCULPT_mesh_symmetry_xyz_get(), blender::ed::sculpt_paint::StrokeCache::symmetry, wpaint_do_paint(), and wpaint_do_radial_symmetry().
Referenced by wpaint_stroke_update_step().
|
static |
Definition at line 1949 of file paint_weight.cc.
References wmOperator::customdata, OPERATOR_FINISHED, blender::ed::sculpt_paint::paint_stroke_exec(), blender::ed::sculpt_paint::paint_stroke_new(), SCULPT_stroke_get_location(), wpaint_stroke_done(), wpaint_stroke_test_start(), and wpaint_stroke_update_step().
Referenced by PAINT_OT_weight_paint().
|
static |
Definition at line 1022 of file paint_weight.cc.
References WeightPaintInfo::active, BKE_defvert_find_weight(), BKE_defvert_lock_relative_weight(), BKE_defvert_multipaint_collective_weight(), CLAMP, WeightPaintInfo::defbase_sel, WeightPaintInfo::defbase_tot, WeightPaintInfo::defbase_tot_sel, WeightPaintInfo::do_lock_relative, WeightPaintInfo::do_multipaint, WeightPaintGroupData::index, WeightPaintInfo::is_normalized, WeightPaintInfo::vgroup_locked, and WeightPaintInfo::vgroup_unlocked.
|
static |
Definition at line 1924 of file paint_weight.cc.
References BLI_assert, wmOperator::customdata, wmOperatorType::modal, OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, blender::ed::sculpt_paint::paint_stroke_free(), blender::ed::sculpt_paint::paint_stroke_new(), SCULPT_stroke_get_location(), wmEvent::type, wmOperator::type, WM_event_add_modal_handler(), wpaint_stroke_done(), wpaint_stroke_test_start(), and wpaint_stroke_update_step().
Referenced by PAINT_OT_weight_paint().
|
static |
Definition at line 1974 of file paint_weight.cc.
References wmOperator::customdata, and blender::ed::sculpt_paint::paint_stroke_modal().
Referenced by PAINT_OT_weight_paint().
|
static |
Definition at line 1629 of file paint_weight.cc.
References BKE_mesh_from_object(), BKE_paint_brushes_validate(), CTX_data_active_object(), CTX_data_depsgraph_on_load(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_message_bus(), DEG_id_tag_update(), depsgraph, ED_object_wpaintmode_enter_ex(), ED_object_wpaintmode_exit_ex(), Object::id, Object::mode, blender::ed::object::mode_compat_set(), NC_SCENE, ND_MODE, OB_MODE_WEIGHT_PAINT, OPERATOR_CANCELLED, OPERATOR_FINISHED, VPaint::paint, blender::ed::object::posemode_set_for_weight_paint(), wmOperator::reports, WM_event_add_notifier(), WM_msg_publish_rna_prop, WM_toolsystem_update_from_context_view3d(), and ToolSettings::wpaint.
Referenced by PAINT_OT_weight_paint_toggle().
|
static |
Definition at line 1500 of file paint_weight.cc.
References BKE_brush_weight_get(), blender::ed::sculpt_paint::StrokeCache::brush, SculptSession::cache, calculate_average_weight(), CTX_data_depsgraph_pointer(), CTX_data_scene(), depsgraph, do_wpaint_brush_blur(), do_wpaint_brush_draw(), do_wpaint_brush_smear(), Object::sculpt, Brush::weight_brush_type, WPAINT_BRUSH_TYPE_AVERAGE, WPAINT_BRUSH_TYPE_BLUR, WPAINT_BRUSH_TYPE_DRAW, and WPAINT_BRUSH_TYPE_SMEAR.
Referenced by wpaint_do_paint().
|
static |
Definition at line 1893 of file paint_weight.cc.
References blender::ed::sculpt_paint::StrokeCache::alt_smooth, BKE_object_defgroup_active_index_get(), SculptSession::cache, CTX_data_active_object(), CTX_data_tool_settings(), Object::data, DEG_id_tag_update(), ListBase::first, ID_RECALC_PSYS_RESET, LISTBASE_FOREACH, NC_OBJECT, ND_DRAW, VPaint::paint, Object::particlesystem, PSYS_TOT_VG, Object::sculpt, blender::ed::sculpt_paint::vwpaint::smooth_brush_toggle_off(), WM_event_add_notifier(), and ToolSettings::wpaint.
Referenced by wpaint_exec(), and wpaint_invoke().
|
static |
Definition at line 864 of file paint_weight.cc.
References WPaintVGroupIndex::active, ToolSettings::auto_normalize, BKE_mesh_from_object(), BKE_object_defgroup_check_lock_relative(), BKE_object_defgroup_check_lock_relative_multi(), BKE_object_defgroup_lock_flags_get(), BKE_object_defgroup_mirror_selection(), BKE_object_defgroup_selected_get(), BKE_object_defgroup_split_locked_validmap(), BKE_object_defgroup_validmap_get(), BKE_paint_brush(), BKE_paint_brush_for_read(), BKE_report(), BLI_array_binary_or, BLI_findlink(), BLI_listbase_count(), BRUSH_FRONTFACE_FALLOFF, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_tool_settings(), wmOperator::customdata, blender::Array< T, InlineBufferCapacity, Allocator >::data(), depsgraph, DG_LOCK_WEIGHT, SculptSession::dvert_prev, ED_view3d_viewcontext_init(), ED_wpaint_ensure_data(), ELEM, Brush::falloff_angle, bDeformGroup::flag, Brush::flag, MDeformVert::flag, blender::ed::sculpt_paint::vwpaint::init_session_data(), blender::ed::sculpt_paint::vwpaint::init_stroke(), blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), ME_USING_MIRROR_X_VERTEX_GROUPS, MEM_callocN, MEM_dupallocN, MEM_freeN(), MEM_mallocN, WPaintVGroupIndex::mirror, SculptSession::mode, ToolSettings::multipaint, VPaint::paint, blender::ed::sculpt_paint::paint_stroke_set_mode_data(), wmOperator::reports, RPT_WARNING, Object::sculpt, blender::ed::sculpt_paint::vwpaint::update_cache_invariants(), blender::ed::sculpt_paint::vwpaint::view_angle_limits_init(), Brush::weight_brush_type, SculptSession::wpaint, ToolSettings::wpaint, WPAINT_BRUSH_TYPE_BLUR, WPAINT_BRUSH_TYPE_SMEAR, WPAINT_ENSURE_MIRROR, and ToolSettings::wpaint_lock_relative.
Referenced by wpaint_exec(), and wpaint_invoke().
|
static |
Definition at line 1788 of file paint_weight.cc.
References WeightPaintInfo::active, WPaintData::active, ToolSettings::auto_normalize, BKE_brush_alpha_get(), BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_paint_brush(), BLI_rcti_is_empty(), BLI_rcti_union(), WeightPaintInfo::brush_alpha_value, SculptSession::cache, CTX_data_active_object(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_region(), CTX_wm_region_view3d(), blender::ed::sculpt_paint::StrokeCache::current_r, Object::data, WeightPaintInfo::defbase_sel, WPaintData::defbase_sel, WeightPaintInfo::defbase_tot, WPaintData::defbase_tot, WeightPaintInfo::defbase_tot_sel, WPaintData::defbase_tot_sel, WeightPaintInfo::defbase_tot_unsel, DEG_id_tag_update(), WeightPaintInfo::do_auto_normalize, WeightPaintInfo::do_flip, WeightPaintInfo::do_lock_relative, WPaintData::do_lock_relative, WeightPaintInfo::do_multipaint, WPaintData::do_multipaint, WeightPaintInfo::dvert, ED_region_tag_redraw(), ED_region_tag_redraw_partial(), ED_view3d_init_mats_rv3d(), WeightPaintGroupData::index, blender::ed::sculpt_paint::StrokeCache::invert, WeightPaintInfo::is_normalized, blender::ed::sculpt_paint::vwpaint::last_stroke_update(), blender::ed::sculpt_paint::StrokeCache::location, WeightPaintInfo::lock_flags, WPaintData::lock_flags, WeightPaintInfo::mirror, WPaintData::mirror, mul_m4_m4m4(), mul_v3_m4v3(), NC_OBJECT, ND_DRAW, ViewContext::obact, VPaint::paint, blender::ed::sculpt_paint::paint_stroke_mode_data(), RegionView3D::persmat, precompute_weight_values(), WPaintData::precomputed_weight, blender::ed::sculpt_paint::StrokeCache::previous_r, ViewContext::region, RNA_boolean_get(), ViewContext::rv3d, Object::sculpt, SCULPT_get_redraw_rect(), swap_m4m4(), blender::ed::sculpt_paint::vwpaint::update_cache_variants(), WPaintData::vc, WeightPaintInfo::vgroup_locked, WPaintData::vgroup_locked, WeightPaintInfo::vgroup_unlocked, WPaintData::vgroup_unlocked, WeightPaintInfo::vgroup_validmap, WPaintData::vgroup_validmap, view3d_operator_needs_opengl(), ARegion::winrct, WM_event_add_notifier(), ToolSettings::wpaint, wpaint_do_symmetrical_brush_actions(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by wpaint_exec(), and wpaint_invoke().
|
static |
Definition at line 244 of file paint_weight.cc.
References VERTEX_WEIGHT_LOCK_EPSILON.
Referenced by do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().