Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_array_utils.h"
#include "BLI_color.hh"
#include "BLI_color_mix.hh"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_task.h"
#include "BLI_task.hh"
#include "DNA_brush_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "BKE_attribute.h"
#include "BKE_brush.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_object_deform.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_subsurf.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "ED_armature.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "IMB_imbuf.h"
#include "BKE_ccg.h"
#include "bmesh.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
Go to the source code of this file.
Classes | |
struct | VPaintAverageAccum< BlendType > |
struct | WPaintAverageAccum |
struct | NormalAnglePrecalc |
struct | WeightPaintGroupData |
struct | WeightPaintInfo |
struct | WPaintData |
struct | VPaintDataBase |
struct | VPaintData< Color, Traits, domain > |
Functions | |
Internal Utilities | |
static uint | color2uint (ColorPaint4b c) |
static bool | isZero (ColorPaint4f c) |
static bool | isZero (ColorPaint4b c) |
template<typename Color = ColorPaint4f> | |
static ColorPaint4f | toFloat (const Color &c) |
template<typename Color = ColorPaint4f> | |
static Color | fromFloat (const ColorPaint4f &c) |
static int | get_vcol_elements (Mesh *me, size_t *r_elem_size) |
static void | view_angle_limits_init (NormalAnglePrecalc *a, float angle, bool do_mask_normal) |
static float | view_angle_limits_apply_falloff (const NormalAnglePrecalc *a, float angle_cos, float *mask_p) |
static bool | vwpaint_use_normal (const VPaint *vp) |
static bool | brush_use_accumulate_ex (const Brush *brush, const int ob_mode) |
static bool | brush_use_accumulate (const VPaint *vp) |
static MDeformVert * | defweight_prev_init (MDeformVert *dvert_prev, MDeformVert *dvert_curr, int index) |
static void | paint_last_stroke_update (Scene *scene, const float location[3]) |
bool | vertex_paint_mode_poll (bContext *C) |
static bool | vertex_paint_poll_ex (bContext *C, bool check_tool) |
bool | vertex_paint_poll (bContext *C) |
bool | vertex_paint_poll_ignore_tool (bContext *C) |
bool | weight_paint_mode_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) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static Color | vpaint_get_current_col (Scene *scene, VPaint *vp, bool secondary) |
uint | vpaint_get_current_color (Scene *scene, VPaint *vp, bool secondary) |
template<typename Color , typename Traits > | |
static Color | vpaint_blend (const VPaint *vp, Color color_curr, Color color_orig, Color color_paint, const typename Traits::ValueType alpha, const typename Traits::BlendType brush_alpha_value) |
static float | wpaint_blend (const VPaint *wp, float weight, const float alpha, float paintval, const float UNUSED(brush_alpha_value), const bool do_flip) |
static void | paint_and_tex_color_alpha_intern (VPaint *vp, const ViewContext *vc, const float co[3], float r_rgba[4]) |
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 void | vertex_paint_init_session (Depsgraph *depsgraph, Scene *scene, Object *ob, eObjectMode object_mode) |
static void | vwpaint_init_stroke (Depsgraph *depsgraph, Object *ob) |
static void | vertex_paint_init_stroke (Scene *scene, Depsgraph *depsgraph, Object *ob) |
static void | vertex_paint_init_session_data (const ToolSettings *ts, Object *ob) |
Enter Vertex/Weight Paint Mode | |
static void | ed_vwpaintmode_enter_generic (Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob, const eObjectMode mode_flag) |
void | ED_object_vpaintmode_enter_ex (Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob) |
void | ED_object_vpaintmode_enter (bContext *C, Depsgraph *depsgraph) |
void | ED_object_wpaintmode_enter_ex (Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob) |
void | ED_object_wpaintmode_enter (bContext *C, Depsgraph *depsgraph) |
Exit Vertex/Weight Paint Mode | |
static void | ed_vwpaintmode_exit_generic (Object *ob, const eObjectMode mode_flag) |
void | ED_object_vpaintmode_exit_ex (Object *ob) |
void | ED_object_vpaintmode_exit (bContext *C) |
void | ED_object_wpaintmode_exit_ex (Object *ob) |
void | ED_object_wpaintmode_exit (bContext *C) |
Toggle Weight Paint Operator | |
static int | wpaint_mode_toggle_exec (bContext *C, wmOperator *op) |
static bool | paint_mode_toggle_poll_test (bContext *C) |
void | PAINT_OT_weight_paint_toggle (wmOperatorType *ot) |
Weight Paint Operator | |
static void | smooth_brush_toggle_on (const bContext *C, Paint *paint, StrokeCache *cache) |
static void | smooth_brush_toggle_off (const bContext *C, Paint *paint, StrokeCache *cache) |
static void | vwpaint_update_cache_invariants (bContext *C, VPaint *vp, SculptSession *ss, wmOperator *op, const float mval[2]) |
static void | vwpaint_update_cache_variants (bContext *C, VPaint *vp, Object *ob, PointerRNA *ptr) |
static bool | wpaint_stroke_test_start (bContext *C, wmOperator *op, const float mouse[2]) |
static void | get_brush_alpha_data (const Scene *scene, const SculptSession *ss, const Brush *brush, float *r_brush_size_pressure, float *r_brush_alpha_value, float *r_brush_alpha_pressure) |
static float | wpaint_get_active_weight (const MDeformVert *dv, const WeightPaintInfo *wpi) |
static void | do_wpaint_precompute_weight_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
static void | precompute_weight_values (bContext *C, Object *ob, Brush *brush, WPaintData *wpd, WeightPaintInfo *wpi, Mesh *me) |
static void | do_wpaint_brush_blur_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
static void | do_wpaint_brush_smear_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
static void | do_wpaint_brush_draw_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
static void | do_wpaint_brush_calc_average_weight_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls)) |
static void | calculate_average_weight (SculptThreadedTaskData *data, PBVHNode **UNUSED(nodes), int totnode) |
static void | wpaint_paint_leaves (bContext *C, Object *ob, Sculpt *sd, VPaint *vp, WPaintData *wpd, WeightPaintInfo *wpi, Mesh *me, PBVHNode **nodes, int totnode) |
static PBVHNode ** | vwpaint_pbvh_gather_generic (Object *ob, VPaint *wp, Sculpt *sd, Brush *brush, int *r_totnode) |
static void | wpaint_do_paint (bContext *C, Object *ob, VPaint *wp, Sculpt *sd, WPaintData *wpd, WeightPaintInfo *wpi, Mesh *me, Brush *brush, const char symm, const int axis, const int i, const float angle) |
static void | wpaint_do_radial_symmetry (bContext *C, Object *ob, VPaint *wp, Sculpt *sd, WPaintData *wpd, WeightPaintInfo *wpi, Mesh *me, Brush *brush, const char symm, const int axis) |
static void | wpaint_do_symmetrical_brush_actions (bContext *C, Object *ob, VPaint *wp, Sculpt *sd, WPaintData *wpd, WeightPaintInfo *wpi) |
static void | wpaint_stroke_update_step (bContext *C, wmOperator *UNUSED(op), PaintStroke *stroke, PointerRNA *itemptr) |
static void | wpaint_stroke_done (const bContext *C, PaintStroke *stroke) |
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) |
Toggle Vertex Paint Operator | |
static int | vpaint_mode_toggle_exec (bContext *C, wmOperator *op) |
void | PAINT_OT_vertex_paint_toggle (wmOperatorType *ot) |
Vertex Paint Operator | |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void * | vpaint_init_vpaint (bContext *C, wmOperator *op, Scene *scene, Depsgraph *depsgraph, VPaint *vp, Object *ob, Mesh *me, const Brush *brush) |
static bool | vpaint_stroke_test_start (bContext *C, wmOperator *op, const float mouse[2]) |
template<class Color = ColorPaint4b, typename Traits = ByteTraits> | |
static void | do_vpaint_brush_blur_loops (bContext *C, Sculpt *UNUSED(sd), VPaint *vp, VPaintData< Color, Traits, ATTR_DOMAIN_CORNER > *vpd, Object *ob, Mesh *me, PBVHNode **nodes, int totnode, Color *lcol) |
template<class Color = ColorPaint4b, typename Traits = ByteTraits> | |
static void | do_vpaint_brush_blur_verts (bContext *C, Sculpt *UNUSED(sd), VPaint *vp, VPaintData< Color, Traits, ATTR_DOMAIN_POINT > *vpd, Object *ob, Mesh *me, PBVHNode **nodes, int totnode, Color *lcol) |
template<typename Color = ColorPaint4b, typename Traits , eAttrDomain domain> | |
static void | do_vpaint_brush_smear (bContext *C, Sculpt *UNUSED(sd), VPaint *vp, VPaintData< Color, Traits, domain > *vpd, Object *ob, Mesh *me, PBVHNode **nodes, int totnode, Color *lcol) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | calculate_average_color (VPaintData< Color, Traits, domain > *vpd, Object *ob, Mesh *me, const Brush *brush, Color *lcol, PBVHNode **nodes, int totnode) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static float | paint_and_tex_color_alpha (VPaint *vp, VPaintData< Color, Traits, domain > *vpd, const float v_co[3], Color *r_color) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | vpaint_do_draw (bContext *C, Sculpt *UNUSED(sd), VPaint *vp, VPaintData< Color, Traits, domain > *vpd, Object *ob, Mesh *me, PBVHNode **nodes, int totnode, Color *lcol) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | vpaint_do_blur (bContext *C, Sculpt *sd, VPaint *vp, VPaintData< Color, Traits, domain > *vpd, Object *ob, Mesh *me, PBVHNode **nodes, int totnode, Color *lcol) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | vpaint_paint_leaves (bContext *C, Sculpt *sd, VPaint *vp, VPaintData< Color, Traits, domain > *vpd, Object *ob, Mesh *me, Color *lcol, PBVHNode **nodes, int totnode) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | vpaint_do_paint (bContext *C, Sculpt *sd, VPaint *vp, VPaintData< Color, Traits, domain > *vpd, Object *ob, Mesh *me, Brush *brush, const char symm, const int axis, const int i, const float angle) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | vpaint_do_radial_symmetry (bContext *C, Sculpt *sd, VPaint *vp, VPaintData< Color, Traits, domain > *vpd, Object *ob, Mesh *me, Brush *brush, const char symm, const int axis) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | vpaint_do_symmetrical_brush_actions (bContext *C, Sculpt *sd, VPaint *vp, VPaintData< Color, Traits, domain > *vpd, Object *ob) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | vpaint_stroke_update_step_intern (bContext *C, PaintStroke *stroke, PointerRNA *itemptr) |
static void | vpaint_stroke_update_step (bContext *C, wmOperator *UNUSED(op), PaintStroke *stroke, PointerRNA *itemptr) |
template<typename Color , typename Traits , eAttrDomain domain> | |
static void | vpaint_free_vpaintdata (Object *UNUSED(ob), void *_vpd) |
static void | vpaint_stroke_done (const bContext *C, PaintStroke *stroke) |
static int | vpaint_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
static int | vpaint_exec (bContext *C, wmOperator *op) |
static void | vpaint_cancel (bContext *C, wmOperator *op) |
static int | vpaint_modal (bContext *C, wmOperator *op, const wmEvent *event) |
void | PAINT_OT_vertex_paint (wmOperatorType *ot) |
Set Vertex Colors Operator | |
template<typename Color , typename Traits , eAttrDomain domain> | |
static bool | vertex_color_set (Object *ob, ColorPaint4f paintcol_in, CustomDataLayer *layer) |
static bool | paint_object_attributes_active_color_fill_ex (Object *ob, ColorPaint4f fill_color, bool only_selected=true) |
bool | BKE_object_attributes_active_color_fill (Object *ob, const float fill_color[4], bool only_selected) |
static int | vertex_color_set_exec (bContext *C, wmOperator *UNUSED(op)) |
void | PAINT_OT_vertex_color_set (wmOperatorType *ot) |
Used for vertex color & weight paint and mode switching.
paint_vertex_color_ops.c
& paint_vertex_weight_ops.c
for general purpose operators. Definition in file paint_vertex.cc.
bool BKE_object_attributes_active_color_fill | ( | struct Object * | ob, |
const float | fill_color[4], | ||
bool | only_selected | ||
) |
Fills the object's active color attribute layer with the fill color.
[in] | ob | The object. |
[in] | fill_color | The fill color. |
[in] | only_selected | Limit the fill to selected faces or vertices. |
Definition at line 4167 of file paint_vertex.cc.
References paint_object_attributes_active_color_fill_ex().
Referenced by blender::ed::geometry::geometry_color_attribute_add_exec(), and proj_paint_color_attribute_create().
Definition at line 213 of file paint_vertex.cc.
References Paint::brush, brush_use_accumulate_ex(), Paint_Runtime::ob_mode, VPaint::paint, and Paint::runtime.
Referenced by do_weight_paint_vertex_multi(), do_weight_paint_vertex_single(), vertex_paint_init_session_data(), vertex_paint_init_stroke(), and vpaint_blend().
Definition at line 206 of file paint_vertex.cc.
References BRUSH_ACCUMULATE, Brush::flag, OB_MODE_VERTEX_PAINT, Brush::vertexpaint_tool, VPAINT_TOOL_SMEAR, Brush::weightpaint_tool, and WPAINT_TOOL_SMEAR.
Referenced by brush_use_accumulate(), and precompute_weight_values().
|
static |
Definition at line 3402 of file paint_vertex.cc.
References ATTR_DOMAIN_CORNER, BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, blend(), SculptSession::cache, PBVHVertexIter::co, col, Color, MeshElemMap::count, Mesh::editflag, Brush::falloff_shape, PBVHVertexIter::g, PBVHVertexIter::grid_indices, PBVHVertexIter::i, MeshElemMap::indices, VPaintAverageAccum< BlendType >::len, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, MEM_mallocN, Mesh::mloop, SculptSession::mode, Mesh::mvert, VPaintData< Color, Traits, domain >::paintcol, blender::threading::parallel_for(), SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, StrokeCache::radius, Object::sculpt, SCULPT_brush_test_init_with_falloff_shape(), SELECT, sqrtf, MLoop::v, VPaintAverageAccum< BlendType >::value, PBVHVertexIter::vert_indices, SculptVertexPaintGeomMap::vert_to_loop, and SculptSession::vpaint.
|
static |
Definition at line 2251 of file paint_vertex.cc.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, do_wpaint_brush_calc_average_weight_cb_ex(), float(), WPaintAverageAccum::len, MEM_mallocN, MEM_SAFE_FREE, and WPaintAverageAccum::value.
Referenced by wpaint_paint_leaves().
|
static |
Definition at line 83 of file paint_vertex.cc.
References Freestyle::c.
Referenced by vpaint_get_current_color().
|
static |
Definition at line 218 of file paint_vertex.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 2936 of file paint_vertex.cc.
References BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, blend(), BLI_assert, StrokeCache::brush, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, brush_strength(), StrokeCache::bstrength, C, SculptSession::cache, PBVHVertexIter::co, col, Color, MeshElemMap::count, CTX_data_scene(), SculptBrushTest::dist, dot_v3v3(), Mesh::editflag, Brush::falloff_shape, Brush::flag, MPoly::flag, PBVHVertexIter::g, get_brush_alpha_data(), PBVHVertexIter::grid_indices, PBVHVertexIter::gridsize, PBVHVertexIter::i, MeshElemMap::indices, isZero(), MPoly::loopstart, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, ME_FACE_SEL, Mesh::mloop, SculptSession::mode, Mesh::mpoly, Mesh::mvert, PBVHVertexIter::no, VPaintData< Color, Traits, domain >::normal_angle_precalc, blender::threading::parallel_for(), SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, StrokeCache::prev_colors_vpaint, StrokeCache::radius, scene, Object::sculpt, SCULPT_brush_frontface_normal_from_falloff_shape(), SCULPT_brush_test_init_with_falloff_shape(), SELECT, sqrtf, MPoly::totloop, MLoop::v, PBVHVertexIter::vert_indices, SculptVertexPaintGeomMap::vert_to_loop, SculptVertexPaintGeomMap::vert_to_poly, view_angle_limits_apply_falloff(), SculptSession::vpaint, and vwpaint_use_normal().
|
static |
Definition at line 3078 of file paint_vertex.cc.
References BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, blend(), BLI_assert, StrokeCache::brush, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, brush_strength(), StrokeCache::bstrength, C, SculptSession::cache, PBVHVertexIter::co, col, Color, MeshElemMap::count, CTX_data_scene(), SculptBrushTest::dist, dot_v3v3(), Mesh::editflag, Brush::falloff_shape, Brush::flag, MPoly::flag, PBVHVertexIter::g, get_brush_alpha_data(), PBVHVertexIter::grid_indices, PBVHVertexIter::gridsize, PBVHVertexIter::i, MeshElemMap::indices, isZero(), MPoly::loopstart, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, ME_FACE_SEL, Mesh::mloop, SculptSession::mode, Mesh::mpoly, Mesh::mvert, PBVHVertexIter::no, VPaintData< Color, Traits, domain >::normal_angle_precalc, blender::threading::parallel_for(), SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, StrokeCache::prev_colors_vpaint, StrokeCache::radius, scene, Object::sculpt, SCULPT_brush_frontface_normal_from_falloff_shape(), SCULPT_brush_test_init_with_falloff_shape(), SELECT, sqrtf, MPoly::totloop, MLoop::v, PBVHVertexIter::vert_indices, SculptVertexPaintGeomMap::vert_to_loop, SculptVertexPaintGeomMap::vert_to_poly, view_angle_limits_apply_falloff(), SculptSession::vpaint, and vwpaint_use_normal().
|
static |
Definition at line 3223 of file paint_vertex.cc.
References ATTR_DOMAIN_POINT, BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_assert, StrokeCache::brush, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, brush_strength(), StrokeCache::bstrength, C, SculptSession::cache, PBVHVertexIter::co, MVert::co, Color, VPaintData< Color, Traits, domain >::color_curr, VPaintData< Color, Traits, domain >::color_prev, MeshElemMap::count, CTX_data_scene(), SculptBrushTest::dist, dot_v3v3(), Mesh::editflag, Brush::falloff_shape, Brush::flag, MVert::flag, MPoly::flag, PBVHVertexIter::g, get_brush_alpha_data(), PBVHVertexIter::grid_indices, PBVHVertexIter::gridsize, PBVHVertexIter::i, MeshElemMap::indices, StrokeCache::is_last_valid, isZero(), StrokeCache::last_location, StrokeCache::location, MPoly::loopstart, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, ME_FACE_SEL, Mesh::mloop, SculptSession::mode, Mesh::mpoly, Mesh::mvert, PBVHVertexIter::no, VPaintData< Color, Traits, domain >::normal_angle_precalc, normalize_v3(), blender::threading::parallel_for(), SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, StrokeCache::prev_colors_vpaint, project_plane_v3_v3v3(), StrokeCache::radius, scene, Object::sculpt, SCULPT_brush_frontface_normal_from_falloff_shape(), SCULPT_brush_test_init_with_falloff_shape(), SELECT, VPaintData< Color, Traits, domain >::smear, sqrtf, sub_v3_v3v3(), MPoly::totloop, UNUSED_VARS_NDEBUG, MLoop::v, PBVHVertexIter::vert_indices, SculptVertexPaintGeomMap::vert_to_loop, SculptVertexPaintGeomMap::vert_to_poly, view_angle_limits_apply_falloff(), StrokeCache::view_normal, SculptSession::vpaint, and vwpaint_use_normal().
|
static |
Definition at line 504 of file paint_vertex.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 548 of file paint_vertex.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 634 of file paint_vertex.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 1149 of file paint_vertex.cc.
References WeightPaintInfo::do_multipaint, do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().
Referenced by do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), and do_wpaint_brush_smear_task_cb_ex().
|
static |
Definition at line 1020 of file paint_vertex.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, brush_use_accumulate(), CLAMP, 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(), Mesh::dvert, Mesh::editflag, 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 807 of file paint_vertex.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, brush_use_accumulate(), CLAMP, 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(), Mesh::dvert, MDeformVert::dw, Mesh::editflag, VPaint::flag, WeightPaintGroupData::index, 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 1930 of file paint_vertex.cc.
References BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BRUSH_ACCUMULATE, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, brush_strength(), StrokeCache::bstrength, SculptSession::cache, PBVHVertexIter::co, MeshElemMap::count, CTX_data_scene(), data, SculptBrushTest::dist, do_weight_paint_vertex(), dot_v3v3(), Brush::flag, PBVHVertexIter::g, get_brush_alpha_data(), PBVHVertexIter::grid_indices, PBVHVertexIter::gridsize, PBVHVertexIter::i, MeshElemMap::indices, MPoly::loopstart, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, SculptSession::mode, PBVHVertexIter::no, SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, StrokeCache::radius, scene, SCULPT_brush_frontface_normal_from_falloff_shape(), SCULPT_brush_test_init_with_falloff_shape(), SELECT, sqrtf, MPoly::totloop, MLoop::v, PBVHVertexIter::vert_indices, SculptVertexPaintGeomMap::vert_to_poly, view_angle_limits_apply_falloff(), vwpaint_use_normal(), and SculptSession::wpaint.
Referenced by wpaint_paint_leaves().
|
static |
Definition at line 2203 of file paint_vertex.cc.
References BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, SculptSession::cache, PBVHVertexIter::co, data, dot_v3v3(), PBVHVertexIter::g, PBVHVertexIter::grid_indices, PBVHVertexIter::i, WPaintAverageAccum::len, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, PBVHVertexIter::no, SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, StrokeCache::radius, SCULPT_brush_frontface_normal_from_falloff_shape(), SCULPT_brush_test_init_with_falloff_shape(), SELECT, sqrtf, WPaintAverageAccum::value, PBVHVertexIter::vert_indices, vwpaint_use_normal(), and wpaint_get_active_weight().
Referenced by calculate_average_weight().
|
static |
Definition at line 2131 of file paint_vertex.cc.
References BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BRUSH_ACCUMULATE, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, brush_strength(), StrokeCache::bstrength, SculptSession::cache, PBVHVertexIter::co, CTX_data_scene(), data, SculptBrushTest::dist, do_weight_paint_vertex(), dot_v3v3(), Brush::flag, PBVHVertexIter::g, get_brush_alpha_data(), PBVHVertexIter::grid_indices, PBVHVertexIter::gridsize, PBVHVertexIter::i, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, SculptSession::mode, PBVHVertexIter::no, SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, StrokeCache::radius, scene, SCULPT_brush_frontface_normal_from_falloff_shape(), SCULPT_brush_test_init_with_falloff_shape(), SELECT, sqrtf, PBVHVertexIter::vert_indices, view_angle_limits_apply_falloff(), vwpaint_use_normal(), and SculptSession::wpaint.
Referenced by wpaint_paint_leaves().
|
static |
Definition at line 2021 of file paint_vertex.cc.
References BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, brush_strength(), StrokeCache::bstrength, SculptSession::cache, PBVHVertexIter::co, MVert::co, MeshElemMap::count, CTX_data_scene(), data, SculptBrushTest::dist, do_weight_paint_vertex(), dot_v3v3(), Brush::flag, MVert::flag, PBVHVertexIter::g, get_brush_alpha_data(), PBVHVertexIter::grid_indices, PBVHVertexIter::gridsize, PBVHVertexIter::i, MeshElemMap::indices, StrokeCache::is_last_valid, StrokeCache::last_location, StrokeCache::location, MPoly::loopstart, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, SculptSession::mode, PBVHVertexIter::no, normalize_v3(), SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, project_plane_v3_v3v3(), StrokeCache::radius, scene, SCULPT_brush_frontface_normal_from_falloff_shape(), SCULPT_brush_test_init_with_falloff_shape(), SELECT, sqrtf, sub_v3_v3v3(), MPoly::totloop, MLoop::v, PBVHVertexIter::vert_indices, SculptVertexPaintGeomMap::vert_to_poly, view_angle_limits_apply_falloff(), StrokeCache::view_normal, vwpaint_use_normal(), and SculptSession::wpaint.
Referenced by wpaint_paint_leaves().
|
static |
Definition at line 1898 of file paint_vertex.cc.
References data, and wpaint_get_active_weight().
Referenced by precompute_weight_values().
Definition at line 1349 of file paint_vertex.cc.
References C, CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), depsgraph, ED_object_vpaintmode_enter_ex(), and scene.
void ED_object_vpaintmode_enter_ex | ( | Main * | bmain, |
Depsgraph * | depsgraph, | ||
Scene * | scene, | ||
Object * | ob | ||
) |
Definition at line 1345 of file paint_vertex.cc.
References depsgraph, ed_vwpaintmode_enter_generic(), OB_MODE_VERTEX_PAINT, and scene.
Referenced by ED_editors_init(), ED_object_vpaintmode_enter(), and vpaint_mode_toggle_exec().
Definition at line 1426 of file paint_vertex.cc.
References C, CTX_data_active_object(), and ED_object_vpaintmode_exit_ex().
Definition at line 1422 of file paint_vertex.cc.
References ed_vwpaintmode_exit_generic(), and OB_MODE_VERTEX_PAINT.
Referenced by ed_object_mode_generic_exit_ex(), ED_object_vpaintmode_exit(), and vpaint_mode_toggle_exec().
Definition at line 1361 of file paint_vertex.cc.
References C, CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), depsgraph, ED_object_wpaintmode_enter_ex(), and scene.
void ED_object_wpaintmode_enter_ex | ( | Main * | bmain, |
Depsgraph * | depsgraph, | ||
Scene * | scene, | ||
Object * | ob | ||
) |
Definition at line 1357 of file paint_vertex.cc.
References depsgraph, ed_vwpaintmode_enter_generic(), OB_MODE_WEIGHT_PAINT, and scene.
Referenced by ED_editors_init(), ED_object_wpaintmode_enter(), and wpaint_mode_toggle_exec().
Definition at line 1436 of file paint_vertex.cc.
References C, CTX_data_active_object(), and ED_object_wpaintmode_exit_ex().
Definition at line 1432 of file paint_vertex.cc.
References ed_vwpaintmode_exit_generic(), and OB_MODE_WEIGHT_PAINT.
Referenced by ed_object_mode_generic_exit_ex(), ED_object_wpaintmode_exit(), and wpaint_mode_toggle_exec().
|
static |
Definition at line 1294 of file paint_vertex.cc.
References BKE_mesh_from_object(), BKE_object_free_derived_caches(), BKE_paint_ensure(), BKE_paint_get_active_from_paintmode(), BKE_paint_init(), BKE_sculptsession_free(), BLI_assert, SculptSession::cache, DEG_id_tag_update(), depsgraph, ED_mesh_color_ensure(), ED_mesh_mirror_spatial_table_end(), ED_paint_cursor_start(), ED_vgroup_sync_from_pose(), Object::id, ID_RECALC_COPY_ON_WRITE, Object::mode, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, PAINT_CURSOR_VERTEX_PAINT, PAINT_CURSOR_WEIGHT_PAINT, PAINT_MODE_VERTEX, PAINT_MODE_WEIGHT, scene, Object::sculpt, SCULPT_cache_free(), Scene::toolsettings, vertex_paint_init_session(), vertex_paint_poll(), ToolSettings::vpaint, weight_paint_poll(), and ToolSettings::wpaint.
Referenced by ED_object_vpaintmode_enter_ex(), and ED_object_wpaintmode_enter_ex().
|
static |
Definition at line 1375 of file paint_vertex.cc.
References BKE_mesh_flush_select_from_polys(), BKE_mesh_flush_select_from_verts(), BKE_mesh_from_object(), BKE_object_free_derived_caches(), BKE_sculptsession_free(), BLI_assert, SculptSession::cache, DEG_id_tag_update(), ED_mesh_mirror_spatial_table_end(), ED_mesh_mirror_topo_table_end(), Mesh::editflag, Object::id, ID_RECALC_COPY_ON_WRITE, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, Object::mode, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, paint_cursor_delete_textures(), Object::sculpt, and SCULPT_cache_free().
Referenced by ED_object_vpaintmode_exit_ex(), and ED_object_wpaintmode_exit_ex().
|
static |
Definition at line 108 of file paint_vertex.cc.
References Freestyle::c, and Color.
|
static |
Definition at line 1864 of file paint_vertex.cc.
References BKE_brush_alpha_get(), BKE_brush_size_get(), BKE_brush_use_alpha_pressure(), BKE_brush_use_size_pressure(), SculptSession::cache, StrokeCache::pressure, and scene.
Referenced by do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), do_wpaint_brush_smear_task_cb_ex(), and vpaint_do_draw().
|
static |
Definition at line 142 of file paint_vertex.cc.
References ATTR_DOMAIN_CORNER, ATTR_DOMAIN_POINT, BKE_id_attribute_domain(), BKE_id_attributes_active_color_get(), CD_PROP_COLOR, float(), Mesh::id, Mesh::totloop, Mesh::totvert, and CustomDataLayer::type.
Referenced by vertex_paint_init_stroke(), vpaint_init_vpaint(), and vpaint_stroke_update_step_intern().
|
static |
Definition at line 93 of file paint_vertex.cc.
References Freestyle::c.
|
static |
Definition at line 88 of file paint_vertex.cc.
References Freestyle::c.
Referenced by do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), and vpaint_do_draw().
|
static |
Definition at line 732 of file paint_vertex.cc.
References CLAMP, MDeformWeight::def_nr, MDeformVert::dw, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by do_weight_paint_vertex_multi().
|
static |
Definition at line 679 of file paint_vertex.cc.
References MDeformWeight::def_nr, MDeformVert::dw, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by do_weight_paint_vertex_multi().
|
static |
Definition at line 704 of file paint_vertex.cc.
References MDeformWeight::def_nr, MDeformVert::dw, MDeformVert::totweight, and MDeformWeight::weight.
Referenced by do_weight_paint_vertex_multi().
|
static |
Definition at line 3492 of file paint_vertex.cc.
References mul_v3_v3(), paint_and_tex_color_alpha_intern(), VPaintData< Color, Traits, domain >::paintcol, blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, rgb_uchar_to_float(), usdtokens::rgba(), toFloat(), and VPaintDataBase::vc.
|
static |
Definition at line 435 of file paint_vertex.cc.
References BKE_brush_sample_tex_3d(), BKE_paint_brush(), BLI_assert, MTex::brush_map_mode, ED_view3d_project_float_object(), Brush::mtex, MTEX_MAP_MODE_3D, VPaint::paint, ViewContext::region, ViewContext::scene, MTex::tex, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, V3D_PROJ_TEST_CLIP_NEAR, and zero_v4().
Referenced by paint_and_tex_color_alpha().
Definition at line 231 of file paint_vertex.cc.
References add_v3_v3(), UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, UnifiedPaintSettings::last_stroke_valid, scene, Scene::toolsettings, and ToolSettings::unified_paint_settings.
Referenced by vpaint_stroke_update_step_intern(), and wpaint_stroke_update_step().
Definition at line 1500 of file paint_vertex.cc.
References C, CTX_data_active_object(), Object::data, ID_IS_LINKED, OB_MESH, and Object::type.
Referenced by PAINT_OT_vertex_paint_toggle(), and PAINT_OT_weight_paint_toggle().
|
static |
See doc-string for BKE_object_attributes_active_color_fill.
Definition at line 4126 of file paint_vertex.cc.
References ATTR_DOMAIN_POINT, BKE_id_attribute_domain(), BKE_id_attributes_active_color_get(), BKE_object_get_original_mesh(), CD_PROP_BYTE_COLOR, CD_PROP_COLOR, Mesh::editflag, Mesh::id, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, and CustomDataLayer::type.
Referenced by BKE_object_attributes_active_color_fill(), and vertex_color_set_exec().
void PAINT_OT_vertex_color_set | ( | wmOperatorType * | ot | ) |
Definition at line 4190 of file paint_vertex.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, vertex_color_set_exec(), and vertex_paint_mode_poll().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_paint | ( | wmOperatorType * | ot | ) |
Definition at line 4010 of file paint_vertex.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, vertex_paint_poll(), vpaint_cancel(), vpaint_exec(), vpaint_invoke(), and vpaint_modal().
Referenced by ED_operatortypes_paint().
void PAINT_OT_vertex_paint_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 2756 of file paint_vertex.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_mode_toggle_poll_test(), wmOperatorType::poll, and vpaint_mode_toggle_exec().
Referenced by ED_operatortypes_paint().
void PAINT_OT_weight_paint | ( | wmOperatorType * | ot | ) |
Definition at line 2683 of file paint_vertex.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 1512 of file paint_vertex.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_mode_toggle_poll_test(), wmOperatorType::poll, and wpaint_mode_toggle_exec().
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 1908 of file paint_vertex.cc.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), brush_use_accumulate_ex(), C, data, do_wpaint_precompute_weight_cb_ex(), Object::mode, WPaintData::precomputed_weight_ready, and Mesh::totvert.
Referenced by wpaint_stroke_update_step().
|
static |
Definition at line 1578 of file paint_vertex.cc.
References BKE_brush_size_set(), BKE_libblock_find_name(), BKE_paint_brush(), BKE_paint_brush_set(), BLI_assert, StrokeCache::brush, C, CTX_data_main(), CTX_data_scene(), ID_BR, StrokeCache::saved_active_brush_name, StrokeCache::saved_smooth_size, and scene.
Referenced by vpaint_stroke_done(), and wpaint_stroke_done().
|
static |
Definition at line 1559 of file paint_vertex.cc.
References BKE_brush_size_get(), BKE_brush_size_set(), BKE_curvemapping_init(), BKE_paint_brush_set(), BKE_paint_toolslots_brush_get(), BLI_strncpy(), Paint::brush, C, CTX_data_scene(), Brush::curve, Brush::id, ID::name, StrokeCache::saved_active_brush_name, StrokeCache::saved_smooth_size, scene, and WPAINT_TOOL_BLUR.
Referenced by vwpaint_update_cache_invariants().
|
static |
Definition at line 98 of file paint_vertex.cc.
References Freestyle::c.
Referenced by paint_and_tex_color_alpha().
|
static |
Definition at line 4037 of file paint_vertex.cc.
References ATTR_DOMAIN_CORNER, ATTR_DOMAIN_POINT, BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_from_object(), BKE_mesh_tessface_clear(), BLI_assert, BMEditMesh::bm, bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, color, Color, CustomDataLayer::data, DEG_id_tag_update(), ED_mesh_color_ensure(), Mesh::edit_mesh, Mesh::editflag, MVert::flag, MPoly::flag, Mesh::id, ID_RECALC_COPY_ON_WRITE, l, BMFace::l_first, CustomData::layers, BMesh::ldata, MPoly::loopstart, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, ME_FACE_SEL, Mesh::mloop, Mesh::mpoly, Mesh::mvert, CustomDataLayer::name, BMLoop::next, CustomDataLayer::offset, SELECT, STREQ, CustomData::totlayer, Mesh::totpoly, BMLoop::v, MLoop::v, and BMesh::vdata.
|
static |
Definition at line 4174 of file paint_vertex.cc.
References C, CTX_data_active_object(), CTX_data_scene(), NC_OBJECT, ND_DRAW, OPERATOR_CANCELLED, OPERATOR_FINISHED, paint_object_attributes_active_color_fill_ex(), scene, Scene::toolsettings, ToolSettings::vpaint, and WM_event_add_notifier().
Referenced by PAINT_OT_vertex_color_set().
|
static |
Definition at line 1168 of file paint_vertex.cc.
References BKE_sculpt_toolsettings_data_ensure(), BKE_sculpt_update_object_for_edit(), BLI_assert, depsgraph, MEM_callocN, SculptSession::mode_type, scene, and Object::sculpt.
Referenced by ed_vwpaintmode_enter_generic().
|
static |
Definition at line 1219 of file paint_vertex.cc.
References BKE_defvert_array_free_elems(), BKE_mesh_vert_loop_map_create(), BKE_mesh_vert_poly_map_create(), BLI_assert, brush_use_accumulate(), Object::data, MDeformVert::flag, if(), MEM_callocN, MEM_freeN, MEM_SAFE_FREE, Mesh::mloop, SculptSession::mode, Object::mode, SculptSession::mode_type, Mesh::mpoly, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, SculptVertexPaintGeomMap::poly_map_mem, Object::sculpt, Mesh::totloop, Mesh::totpoly, Mesh::totvert, SculptVertexPaintGeomMap::vert_map_mem, SculptVertexPaintGeomMap::vert_to_loop, SculptVertexPaintGeomMap::vert_to_poly, SculptSession::vpaint, SculptSession::wpaint, and ToolSettings::wpaint.
Referenced by vpaint_stroke_test_start(), and wpaint_stroke_test_start().
Definition at line 1195 of file paint_vertex.cc.
References BKE_object_get_original_mesh(), brush_use_accumulate(), SculptSession::cache, depsgraph, get_vcol_elements(), MEM_callocN, MEM_SAFE_FREE, StrokeCache::prev_colors_vpaint, scene, Object::sculpt, Scene::toolsettings, ToolSettings::vpaint, and vwpaint_init_stroke().
Referenced by vpaint_stroke_test_start().
Returns true if vertex paint mode is active.
Definition at line 239 of file paint_vertex.cc.
References BKE_id_attributes_active_color_get(), C, CTX_data_active_object(), Object::data, Object::mode, and OB_MODE_VERTEX_PAINT.
Referenced by ED_keymap_paint(), PAINT_OT_vertex_color_brightness_contrast(), PAINT_OT_vertex_color_hsv(), PAINT_OT_vertex_color_invert(), PAINT_OT_vertex_color_levels(), PAINT_OT_vertex_color_set(), PAINT_OT_vertex_color_smooth(), and vertex_paint_poll_ex().
Definition at line 269 of file paint_vertex.cc.
References C, and vertex_paint_poll_ex().
Referenced by ed_vwpaintmode_enter_generic(), and PAINT_OT_vertex_paint().
Definition at line 253 of file paint_vertex.cc.
References blender::compositor::area(), BKE_paint_brush(), C, CTX_data_tool_settings(), CTX_wm_area(), CTX_wm_region(), ARegion::regiontype, RGN_TYPE_WINDOW, SPACE_VIEW3D, vertex_paint_mode_poll(), and WM_toolsystem_active_tool_is_brush().
Referenced by vertex_paint_poll(), and vertex_paint_poll_ignore_tool().
Definition at line 274 of file paint_vertex.cc.
References C, and vertex_paint_poll_ex().
Referenced by sample_color_poll().
|
static |
Definition at line 185 of file paint_vertex.cc.
References Freestyle::a, and acosf.
Referenced by do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), do_wpaint_brush_smear_task_cb_ex(), and vpaint_do_draw().
|
static |
Definition at line 161 of file paint_vertex.cc.
References Freestyle::a, angle(), cosf, float(), M_PI_2, and RAD2DEGF.
Referenced by vpaint_init_vpaint(), and wpaint_stroke_test_start().
|
static |
Definition at line 338 of file paint_vertex.cc.
References Freestyle::a, Brush::blend, blend(), Paint::brush, BRUSH_LOCK_ALPHA, brush_use_accumulate(), Color, ELEM, Brush::flag, IMB_BLEND_ADD_ALPHA, IMB_BLEND_ERASE_ALPHA, VPaint::paint, and Value.
|
static |
Definition at line 3994 of file paint_vertex.cc.
References C, SculptSession::cache, CTX_data_active_object(), wmOperator::customdata, paint_stroke_cancel(), Object::sculpt, and SCULPT_cache_free().
Referenced by PAINT_OT_vertex_paint().
|
static |
Definition at line 3650 of file paint_vertex.cc.
References ATTR_DOMAIN_POINT, and C.
|
static |
Definition at line 3510 of file paint_vertex.cc.
References ATTR_DOMAIN_POINT, BKE_brush_curve_strength(), BKE_pbvh_type(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BLI_assert, StrokeCache::brush, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, brush_strength(), StrokeCache::bstrength, C, SculptSession::cache, PBVHVertexIter::co, CoNo::co, Color, MeshElemMap::count, CTX_data_scene(), SculptBrushTest::dist, dot_v3v3(), Mesh::editflag, Brush::falloff_shape, Brush::flag, MPoly::flag, PBVHVertexIter::g, get_brush_alpha_data(), PBVHVertexIter::grid_indices, PBVHVertexIter::gridsize, PBVHVertexIter::i, PBVHVertexIter::index, MeshElemMap::indices, VPaintData< Color, Traits, domain >::is_texbrush, isZero(), ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, ME_FACE_SEL, Mesh::mloop, SculptSession::mode, Mesh::mpoly, Mesh::mvert, PBVHVertexIter::no, VPaintData< Color, Traits, domain >::normal_angle_precalc, VPaintData< Color, Traits, domain >::paintcol, blender::threading::parallel_for(), SculptSession::pbvh, PBVH_GRIDS, PBVH_ITER_UNIQUE, StrokeCache::prev_colors_vpaint, StrokeCache::radius, scene, Object::sculpt, SCULPT_brush_frontface_normal_from_falloff_shape(), SCULPT_brush_test_init_with_falloff_shape(), SELECT, sqrtf, MLoop::v, PBVHVertexIter::vert_indices, SculptVertexPaintGeomMap::vert_to_loop, SculptVertexPaintGeomMap::vert_to_poly, VPaintData< Color, Traits, domain >::vertexcosnos, view_angle_limits_apply_falloff(), SculptSession::vpaint, and vwpaint_use_normal().
|
static |
Definition at line 3706 of file paint_vertex.cc.
References angle(), BKE_id_attributes_active_color_get(), C, SculptSession::cache, Color, CustomDataLayer::data, Mesh::id, MEM_freeN, StrokeCache::radial_symmetry_pass, Object::sculpt, SCULPT_cache_calc_brushdata_symm(), and vwpaint_pbvh_gather_generic().
|
static |
Definition at line 3737 of file paint_vertex.cc.
References angle(), C, M_PI, and VPaint::radial_symm.
|
static |
Definition at line 3756 of file paint_vertex.cc.
References BKE_paint_brush(), C, copy_v3_v3(), Object::data, ELEM, VPaint::paint, Object::sculpt, SCULPT_cache_calc_brushdata_symm(), and SCULPT_mesh_symmetry_xyz_get().
|
static |
Definition at line 3977 of file paint_vertex.cc.
References C, wmOperator::customdata, OPERATOR_FINISHED, paint_stroke_exec(), paint_stroke_new(), SCULPT_stroke_get_location(), vpaint_stroke_done(), vpaint_stroke_test_start(), and vpaint_stroke_update_step().
Referenced by PAINT_OT_vertex_paint().
|
static |
Definition at line 3883 of file paint_vertex.cc.
References VPaintData< Color, Traits, domain >::color_curr, VPaintData< Color, Traits, domain >::color_prev, ED_vpaint_proj_handle_free(), VPaintData< Color, Traits, domain >::is_texbrush, MEM_freeN, VPaintData< Color, Traits, domain >::smear, and VPaintData< Color, Traits, domain >::vp_handle.
|
static |
Definition at line 315 of file paint_vertex.cc.
References BKE_brush_color_get(), BKE_brush_secondary_color_get(), BKE_paint_brush_for_read(), color, Color, IMB_colormanagement_srgb_to_scene_linear_v3(), VPaint::paint, and scene.
Definition at line 328 of file paint_vertex.cc.
References col, color2uint(), and scene.
|
static |
Definition at line 2820 of file paint_vertex.cc.
References BKE_id_attributes_active_color_get(), Paint::brush, BRUSH_FRONTFACE_FALLOFF, BRUSH_STROKE_INVERT, SculptSession::building_vp_handle, C, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, VPaintData< Color, Traits, domain >::color_curr, VPaintData< Color, Traits, domain >::color_prev, CustomDataLayer::data, depsgraph, VPaintDataBase::domain, ED_view3d_viewcontext_init(), ED_vpaint_proj_handle_create(), Brush::falloff_angle, Brush::flag, get_vcol_elements(), Mesh::id, if(), VPaintData< Color, Traits, domain >::is_texbrush, MEM_dupallocN, MEM_malloc_arrayN, Brush::mtex, VPaintData< Color, Traits, domain >::normal_angle_precalc, VPaint::paint, VPaintData< Color, Traits, domain >::paintcol, wmOperator::ptr, RNA_enum_get(), scene, Object::sculpt, VPaintData< Color, Traits, domain >::smear, MTex::tex, VPaintDataBase::type, VPaintDataBase::vc, VPaintData< Color, Traits, domain >::vertexcosnos, Brush::vertexpaint_tool, view_angle_limits_init(), VPaintData< Color, Traits, domain >::vp_handle, VPAINT_TOOL_BLUR, and VPAINT_TOOL_SMEAR.
|
static |
Definition at line 3942 of file paint_vertex.cc.
References BKE_pbvh_ensure_node_loops(), BLI_assert, C, CTX_data_active_object(), wmOperator::customdata, wmOperatorType::modal, OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, paint_stroke_free(), paint_stroke_new(), SculptSession::pbvh, Object::sculpt, SCULPT_has_loop_colors(), SCULPT_stroke_get_location(), SCULPT_undo_push_begin(), wmOperator::type, wmEvent::type, vpaint_stroke_done(), vpaint_stroke_test_start(), vpaint_stroke_update_step(), and WM_event_add_modal_handler().
Referenced by PAINT_OT_vertex_paint().
|
static |
Definition at line 4005 of file paint_vertex.cc.
References C, wmOperator::customdata, and paint_stroke_modal().
Referenced by PAINT_OT_vertex_paint().
|
static |
Definition at line 2712 of file paint_vertex.cc.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_from_object(), BKE_paint_toolslots_brush_validate(), C, CTX_data_active_object(), CTX_data_depsgraph_on_load(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_message_bus(), Object::data, DEG_id_tag_update(), depsgraph, ED_object_mode_compat_set(), ED_object_vpaintmode_enter_ex(), ED_object_vpaintmode_exit_ex(), Mesh::id, Object::id, Object::mode, NC_SCENE, ND_MODE, OB_MODE_VERTEX_PAINT, OPERATOR_CANCELLED, OPERATOR_FINISHED, VPaint::paint, wmOperator::reports, scene, Scene::toolsettings, ToolSettings::vpaint, WM_event_add_notifier(), WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by PAINT_OT_vertex_paint_toggle().
|
static |
Definition at line 3669 of file paint_vertex.cc.
References StrokeCache::brush, C, SculptSession::cache, Object::sculpt, SCULPT_UNDO_COLOR, SCULPT_undo_push_node(), Brush::vertexpaint_tool, VPAINT_TOOL_AVERAGE, VPAINT_TOOL_BLUR, VPAINT_TOOL_DRAW, and VPAINT_TOOL_SMEAR.
|
static |
Definition at line 3901 of file paint_vertex.cc.
References StrokeCache::alt_smooth, ATTR_DOMAIN_CORNER, ATTR_DOMAIN_POINT, C, SculptSession::cache, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, CTX_data_tool_settings(), VPaintDataBase::domain, NC_OBJECT, ND_DRAW, ViewContext::obact, VPaint::paint, paint_stroke_mode_data(), Object::sculpt, SCULPT_cache_free(), SCULPT_undo_push_end(), smooth_brush_toggle_off(), VPaintDataBase::type, VPaintDataBase::vc, ToolSettings::vpaint, and WM_event_add_notifier().
Referenced by vpaint_exec(), and vpaint_invoke().
|
static |
Definition at line 2874 of file paint_vertex.cc.
References ATTR_DOMAIN_CORNER, ATTR_DOMAIN_POINT, BKE_id_attribute_domain(), BKE_id_attributes_active_color_get(), BKE_mesh_from_object(), BKE_paint_brush(), BLI_assert, C, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), wmOperator::customdata, depsgraph, ED_mesh_color_ensure(), Mesh::id, paint_stroke_set_mode_data(), scene, Object::sculpt, Scene::toolsettings, Mesh::totpoly, CustomDataLayer::type, vertex_paint_init_session_data(), vertex_paint_init_stroke(), ToolSettings::vpaint, and vwpaint_update_cache_invariants().
Referenced by vpaint_exec(), and vpaint_invoke().
|
static |
Definition at line 3853 of file paint_vertex.cc.
References ATTR_DOMAIN_CORNER, ATTR_DOMAIN_POINT, C, CD_PROP_BYTE_COLOR, CD_PROP_COLOR, VPaintDataBase::domain, paint_stroke_mode_data(), and VPaintDataBase::type.
Referenced by vpaint_exec(), and vpaint_invoke().
|
static |
Definition at line 3803 of file paint_vertex.cc.
References BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_object_get_original_mesh(), C, SculptSession::cache, VPaintData< Color, Traits, domain >::color_curr, VPaintData< Color, Traits, domain >::color_prev, CTX_data_scene(), CTX_data_tool_settings(), Object::data, DEG_id_tag_update(), ED_region_tag_redraw(), ED_view3d_init_mats_rv3d(), get_vcol_elements(), ID_RECALC_GEOMETRY, mul_m4_m4m4(), mul_v3_m4v3(), ViewContext::obact, Object::obmat, paint_last_stroke_update(), paint_stroke_mode_data(), RegionView3D::persmat, ViewContext::region, ViewContext::rv3d, scene, Object::sculpt, ToolSettings::sculpt, VPaintData< Color, Traits, domain >::smear, swap_m4m4(), StrokeCache::true_location, VPaintDataBase::vc, ToolSettings::vpaint, VPAINT_TOOL_SMEAR, and vwpaint_update_cache_variants().
Definition at line 1182 of file paint_vertex.cc.
References BKE_sculpt_update_object_for_edit(), SculptSession::cache, depsgraph, MEM_callocN, and Object::sculpt.
Referenced by vertex_paint_init_stroke(), and wpaint_stroke_test_start().
|
static |
Definition at line 2327 of file paint_vertex.cc.
References BKE_pbvh_search_gather(), SculptSession::cache, copy_v3_v3(), data, dist_squared_ray_to_aabb_v3_precalc(), Brush::falloff_shape, StrokeCache::location, PAINT_FALLOFF_SHAPE_SPHERE, SculptSession::pbvh, StrokeCache::radius_squared, Object::sculpt, StrokeCache::sculpt_normal_symm, SCULPT_pbvh_calc_area_normal(), SCULPT_search_circle_cb(), SCULPT_search_sphere_cb(), StrokeCache::view_normal, vwpaint_use_normal(), and zero_v3().
Referenced by vpaint_do_paint(), and wpaint_do_paint().
|
static |
Definition at line 1595 of file paint_vertex.cc.
References StrokeCache::alt_smooth, BKE_brush_alpha_get(), StrokeCache::brush, Paint::brush, BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH, StrokeCache::bstrength, C, SculptSession::cache, copy_m3_m4(), copy_v2_v2(), copy_v3_v3(), CTX_data_active_object(), CTX_data_scene(), CTX_data_tool_settings(), wmOperator::customdata, UnifiedPaintSettings::draw_inverted, ED_view3d_ob_project_mat_get(), StrokeCache::first_time, Object::imat, StrokeCache::initial_mouse, StrokeCache::invert, invert_m4_m4(), StrokeCache::is_last_valid, MEM_callocN, StrokeCache::mouse, mul_m3_v3(), normalize_v3_v3(), Object::obmat, VPaint::paint, paint_stroke_view_context(), StrokeCache::projection_mat, wmOperator::ptr, RNA_enum_get(), ViewContext::rv3d, scene, smooth_brush_toggle_on(), StrokeCache::true_view_normal, ToolSettings::unified_paint_settings, StrokeCache::vc, StrokeCache::view_normal, RegionView3D::viewinv, and zero_v2().
Referenced by vpaint_stroke_test_start(), and wpaint_stroke_test_start().
|
static |
Definition at line 1663 of file paint_vertex.cc.
References BKE_brush_size_get(), BKE_brush_unprojected_radius_set(), BKE_brush_use_size_pressure(), BKE_paint_brush(), BKE_pbvh_update_bounds(), C, SculptSession::cache, CTX_data_scene(), StrokeCache::first_time, StrokeCache::initial_radius, StrokeCache::mouse, VPaint::paint, paint_calc_object_space_radius(), PAINT_MODE_SCULPT, paint_supports_dynamic_size(), SculptSession::pbvh, PBVH_UpdateBB, PBVH_UpdateRedraw, StrokeCache::pressure, ptr, StrokeCache::radius, StrokeCache::radius_squared, RNA_float_get(), RNA_float_get_array(), scene, Object::sculpt, StrokeCache::true_location, and StrokeCache::vc.
Referenced by vpaint_stroke_update_step_intern(), and wpaint_stroke_update_step().
Definition at line 200 of file paint_vertex.cc.
References Paint::brush, BRUSH_FRONTFACE, BRUSH_FRONTFACE_FALLOFF, Brush::flag, and VPaint::paint.
Referenced by do_vpaint_brush_blur_loops(), do_vpaint_brush_blur_verts(), do_vpaint_brush_smear(), do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_calc_average_weight_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), do_wpaint_brush_smear_task_cb_ex(), vpaint_do_draw(), and vwpaint_pbvh_gather_generic().
Definition at line 279 of file paint_vertex.cc.
References C, CTX_data_active_object(), Object::data, Object::mode, and OB_MODE_WEIGHT_PAINT.
Referenced by ED_keymap_paint(), PAINT_OT_weight_sample(), and PAINT_OT_weight_sample_group().
Definition at line 304 of file paint_vertex.cc.
References C, and weight_paint_poll_ex().
Referenced by ed_vwpaintmode_enter_generic(), and PAINT_OT_weight_paint().
Definition at line 286 of file paint_vertex.cc.
References blender::compositor::area(), BKE_paint_brush(), C, CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_area(), CTX_wm_region(), ELEM, Object::mode, OB_MODE_WEIGHT_PAINT, ARegion::regiontype, 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().
Definition at line 309 of file paint_vertex.cc.
References C, and weight_paint_poll_ex().
Referenced by PAINT_OT_weight_gradient().
|
static |
Definition at line 396 of file paint_vertex.cc.
References Brush::blend, blend(), Paint::brush, CLAMP, ED_wpaint_blend_tool(), if(), 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 2667 of file paint_vertex.cc.
References C, SculptSession::cache, CTX_data_active_object(), wmOperator::customdata, paint_stroke_cancel(), Object::sculpt, and SCULPT_cache_free().
Referenced by PAINT_OT_weight_paint().
Definition at line 461 of file paint_vertex.cc.
Referenced by do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().
|
static |
Definition at line 2373 of file paint_vertex.cc.
References angle(), C, SculptSession::cache, MEM_freeN, StrokeCache::radial_symmetry_pass, Object::sculpt, SCULPT_cache_calc_brushdata_symm(), vwpaint_pbvh_gather_generic(), and wpaint_paint_leaves().
Referenced by wpaint_do_radial_symmetry(), and wpaint_do_symmetrical_brush_actions().
|
static |
Definition at line 2400 of file paint_vertex.cc.
References angle(), C, M_PI, VPaint::radial_symm, and wpaint_do_paint().
Referenced by wpaint_do_symmetrical_brush_actions().
|
static |
Definition at line 2419 of file paint_vertex.cc.
References BKE_paint_brush(), C, copy_v3_v3(), Object::data, Mesh::editflag, ELEM, ME_EDIT_MIRROR_VERTEX_GROUPS, VPaint::paint, Object::sculpt, SCULPT_cache_calc_brushdata_symm(), SCULPT_mesh_symmetry_xyz_get(), wpaint_do_paint(), and wpaint_do_radial_symmetry().
Referenced by wpaint_stroke_update_step().
|
static |
Definition at line 2650 of file paint_vertex.cc.
References C, wmOperator::customdata, OPERATOR_FINISHED, paint_stroke_exec(), 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 1877 of file paint_vertex.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.
Referenced by do_wpaint_brush_calc_average_weight_cb_ex(), and do_wpaint_precompute_weight_cb_ex().
|
static |
Definition at line 2624 of file paint_vertex.cc.
References BLI_assert, C, wmOperator::customdata, wmOperatorType::modal, OPERATOR_FINISHED, OPERATOR_RETVAL_CHECK, OPERATOR_RUNNING_MODAL, paint_stroke_free(), paint_stroke_new(), SCULPT_stroke_get_location(), wmOperator::type, wmEvent::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 2678 of file paint_vertex.cc.
References C, wmOperator::customdata, and paint_stroke_modal().
Referenced by PAINT_OT_weight_paint().
|
static |
Definition at line 1451 of file paint_vertex.cc.
References BKE_mesh_from_object(), BKE_paint_toolslots_brush_validate(), C, 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_mode_compat_set(), ED_object_posemode_set_for_weight_paint(), ED_object_wpaintmode_enter_ex(), ED_object_wpaintmode_exit_ex(), Mesh::id, Object::id, Object::mode, NC_SCENE, ND_MODE, OB_MODE_WEIGHT_PAINT, OPERATOR_CANCELLED, OPERATOR_FINISHED, VPaint::paint, wmOperator::reports, scene, Scene::toolsettings, 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 2277 of file paint_vertex.cc.
References BKE_brush_weight_get(), BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), StrokeCache::brush, C, SculptSession::cache, calculate_average_weight(), CTX_data_scene(), data, do_wpaint_brush_blur_task_cb_ex(), do_wpaint_brush_draw_task_cb_ex(), do_wpaint_brush_smear_task_cb_ex(), ME_USING_MIRROR_X_VERTEX_GROUPS, scene, Object::sculpt, Brush::weightpaint_tool, WPAINT_TOOL_AVERAGE, WPAINT_TOOL_BLUR, WPAINT_TOOL_DRAW, and WPAINT_TOOL_SMEAR.
Referenced by wpaint_do_paint().
|
static |
Definition at line 2576 of file paint_vertex.cc.
References WPaintData::active, StrokeCache::alt_smooth, BKE_object_defgroup_active_index_get(), C, SculptSession::cache, CTX_data_active_object(), CTX_data_tool_settings(), Object::data, WPaintData::defbase_sel, DEG_id_tag_update(), ListBase::first, ID_RECALC_PSYS_RESET, WeightPaintGroupData::lock, WPaintData::lock_flags, MEM_freeN, MEM_SAFE_FREE, WPaintData::mirror, NC_OBJECT, ND_DRAW, ParticleSystem::next, VPaint::paint, paint_stroke_mode_data(), Object::particlesystem, WPaintData::precomputed_weight, PSYS_TOT_VG, ParticleSystem::recalc, Object::sculpt, SCULPT_cache_free(), smooth_brush_toggle_off(), ParticleSystem::vgroup, WPaintData::vgroup_locked, WPaintData::vgroup_unlocked, WPaintData::vgroup_validmap, WM_event_add_notifier(), and ToolSettings::wpaint.
Referenced by wpaint_exec(), and wpaint_invoke().
|
static |
Definition at line 1709 of file paint_vertex.cc.
References WPaintVGroupIndex::active, WPaintData::active, 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_report(), BLI_array_binary_or, BLI_findlink(), BLI_listbase_count(), Paint::brush, BRUSH_FRONTFACE_FALLOFF, C, CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_scene(), CTX_data_tool_settings(), wmOperator::customdata, WPaintData::defbase_sel, WPaintData::defbase_tot, WPaintData::defbase_tot_sel, depsgraph, DG_LOCK_WEIGHT, WPaintData::do_lock_relative, WPaintData::do_multipaint, ED_view3d_viewcontext_init(), ED_wpaint_ensure_data(), ELEM, Brush::falloff_angle, Brush::flag, MDeformVert::flag, bDeformGroup::flag, WeightPaintGroupData::index, WeightPaintGroupData::lock, WPaintData::lock_flags, ME_USING_MIRROR_X_VERTEX_GROUPS, MEM_callocN, MEM_dupallocN, MEM_freeN, MEM_mallocN, WPaintVGroupIndex::mirror, WPaintData::mirror, WPaintData::normal_angle_precalc, VPaint::paint, paint_stroke_set_mode_data(), WPaintData::precomputed_weight, wmOperator::reports, RPT_WARNING, scene, Scene::toolsettings, Mesh::totvert, WPaintData::vc, Mesh::vertex_group_names, vertex_paint_init_session_data(), WPaintData::vgroup_locked, WPaintData::vgroup_unlocked, WPaintData::vgroup_validmap, view_angle_limits_init(), vwpaint_init_stroke(), vwpaint_update_cache_invariants(), Brush::weightpaint_tool, ToolSettings::wpaint, WPAINT_ENSURE_MIRROR, WPAINT_TOOL_BLUR, and WPAINT_TOOL_SMEAR.
Referenced by wpaint_exec(), and wpaint_invoke().
|
static |
Definition at line 2471 of file paint_vertex.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, C, SculptSession::cache, CTX_data_active_object(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_region(), CTX_wm_region_view3d(), 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, ED_region_tag_redraw(), ED_region_tag_redraw_partial(), ED_view3d_init_mats_rv3d(), WeightPaintGroupData::index, StrokeCache::invert, WeightPaintInfo::is_normalized, WeightPaintInfo::lock_flags, WPaintData::lock_flags, WeightPaintInfo::mirror, WPaintData::mirror, mul_m4_m4m4(), mul_v3_m4v3(), NC_OBJECT, ND_DRAW, ViewContext::obact, Object::obmat, VPaint::paint, paint_last_stroke_update(), paint_stroke_mode_data(), RegionView3D::persmat, precompute_weight_values(), WPaintData::precomputed_weight, StrokeCache::previous_r, r, ViewContext::region, RNA_boolean_get(), ViewContext::rv3d, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_get_redraw_rect(), swap_m4m4(), StrokeCache::true_location, WPaintData::vc, WeightPaintInfo::vgroup_locked, WPaintData::vgroup_locked, WeightPaintInfo::vgroup_unlocked, WPaintData::vgroup_unlocked, WeightPaintInfo::vgroup_validmap, WPaintData::vgroup_validmap, view3d_operator_needs_opengl(), vwpaint_update_cache_variants(), ARegion::winrct, WM_event_add_notifier(), ToolSettings::wpaint, wpaint_do_symmetrical_brush_actions(), rcti::xmin, and rcti::ymin.
Referenced by wpaint_exec(), and wpaint_invoke().
|
static |
Definition at line 472 of file paint_vertex.cc.
References VERTEX_WEIGHT_LOCK_EPSILON.
Referenced by do_weight_paint_vertex_multi(), and do_weight_paint_vertex_single().