|
Blender V4.3
|
#include <algorithm>#include "BLI_listbase.h"#include "BLI_string_utils.hh"#include "DNA_armature_types.h"#include "DNA_mesh_types.h"#include "DNA_object_types.h"#include "BKE_action.hh"#include "BKE_context.hh"#include "BKE_deform.hh"#include "BKE_mesh.hh"#include "BKE_modifier.hh"#include "BKE_object.hh"#include "BKE_object_deform.h"#include "BKE_report.hh"#include "DEG_depsgraph_build.hh"#include "IMB_imbuf.hh"#include "WM_api.hh"#include "WM_types.hh"#include "paint_intern.hh"Go to the source code of this file.
Functions | |
| int | ED_wpaint_mirror_vgroup_ensure (Object *ob, const int vgroup_active) |
Weight Paint Sanity Checks | |
| bool | ED_wpaint_ensure_data (bContext *C, ReportList *reports, eWPaintFlag flag, WPaintVGroupIndex *vgroup_index) |
Weight Blending Modes | |
| BLI_INLINE float | wval_blend (const float weight, const float paintval, const float alpha) |
| BLI_INLINE float | wval_add (const float weight, const float paintval, const float alpha) |
| BLI_INLINE float | wval_sub (const float weight, const float paintval, const float alpha) |
| BLI_INLINE float | wval_mul (const float weight, const float paintval, const float alpha) |
| BLI_INLINE float | wval_lighten (const float weight, const float paintval, const float alpha) |
| BLI_INLINE float | wval_darken (const float weight, const float paintval, const float alpha) |
| BLI_INLINE float | wval_colordodge (float weight, float paintval, float fac) |
| BLI_INLINE float | wval_difference (float weight, float paintval, float fac) |
| BLI_INLINE float | wval_screen (float weight, float paintval, float fac) |
| BLI_INLINE float | wval_hardlight (float weight, float paintval, float fac) |
| BLI_INLINE float | wval_overlay (float weight, float paintval, float fac) |
| BLI_INLINE float | wval_softlight (float weight, float paintval, float fac) |
| BLI_INLINE float | wval_exclusion (float weight, float paintval, float fac) |
| float | ED_wpaint_blend_tool (const int tool, const float weight, const float paintval, const float alpha) |
Intended for use by paint_vertex.cc & paint_vertex_weight_ops.cc.
Definition in file paint_vertex_weight_utils.cc.
| weight | Typically the current weight: MDeformWeight.weight |
Definition at line 267 of file paint_vertex_weight_utils.cc.
References IMB_BLEND_ADD, IMB_BLEND_COLORDODGE, IMB_BLEND_DARKEN, IMB_BLEND_DIFFERENCE, IMB_BLEND_EXCLUSION, IMB_BLEND_HARDLIGHT, IMB_BLEND_LIGHTEN, IMB_BLEND_MIX, IMB_BLEND_MUL, IMB_BLEND_OVERLAY, IMB_BLEND_SCREEN, IMB_BLEND_SOFTLIGHT, IMB_BLEND_SUB, wval_add(), wval_blend(), wval_colordodge(), wval_darken(), wval_difference(), wval_exclusion(), wval_hardlight(), wval_lighten(), wval_mul(), wval_overlay(), wval_screen(), wval_softlight(), and wval_sub().
Referenced by gradientVert_update(), and wpaint_blend().
| bool ED_wpaint_ensure_data | ( | bContext * | C, |
| ReportList * | reports, | ||
| enum eWPaintFlag | flag, | ||
| WPaintVGroupIndex * | vgroup_index ) |
Ensure we have data on wpaint start, add if needed.
Definition at line 43 of file paint_vertex_weight_utils.cc.
References WPaintVGroupIndex::active, BKE_mesh_from_object(), BKE_modifiers_is_deformed_by_armature(), BKE_object_defgroup_add(), BKE_object_defgroup_add_name(), BKE_object_defgroup_data_create(), BKE_object_defgroup_find_name(), BKE_object_defgroup_list(), BKE_object_is_in_editmode(), BKE_pose_channel_find_name(), BKE_report(), BLI_assert, BLI_findindex(), BLI_listbase_is_empty(), CTX_data_active_object(), CTX_data_main(), Object::data, DEG_relations_tag_update(), ED_wpaint_mirror_vgroup_ensure(), flag, ME_USING_MIRROR_X_VERTEX_GROUPS, WPaintVGroupIndex::mirror, Bone::name, bPoseChannel::name, NC_GEOM, ND_DATA, Object::pose, RPT_WARNING, WM_event_add_notifier(), and WPAINT_ENSURE_MIRROR.
Referenced by paint_weight_gradient_exec(), paint_weight_gradient_invoke(), weight_paint_set_exec(), and wpaint_stroke_test_start().
Return -1 when invalid.
Definition at line 125 of file paint_vertex_weight_utils.cc.
References BKE_object_defgroup_list(), BKE_object_defgroup_name_index(), BKE_object_defgroup_new(), BLI_findlink(), BLI_listbase_count(), BLI_string_flip_side_name(), MAXBONENAME, and bDeformGroup::name.
Referenced by ED_wpaint_ensure_data(), and weight_paint_set().
| BLI_INLINE float wval_add | ( | const float | weight, |
| const float | paintval, | ||
| const float | alpha ) |
Definition at line 158 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_blend | ( | const float | weight, |
| const float | paintval, | ||
| const float | alpha ) |
Definition at line 153 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool(), wval_darken(), and wval_lighten().
| BLI_INLINE float wval_colordodge | ( | float | weight, |
| float | paintval, | ||
| float | fac ) |
Definition at line 180 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_darken | ( | const float | weight, |
| const float | paintval, | ||
| const float | alpha ) |
Definition at line 174 of file paint_vertex_weight_utils.cc.
References wval_blend().
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_difference | ( | float | weight, |
| float | paintval, | ||
| float | fac ) |
Definition at line 191 of file paint_vertex_weight_utils.cc.
References fabsf.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_exclusion | ( | float | weight, |
| float | paintval, | ||
| float | fac ) |
Definition at line 256 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_hardlight | ( | float | weight, |
| float | paintval, | ||
| float | fac ) |
Definition at line 211 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_lighten | ( | const float | weight, |
| const float | paintval, | ||
| const float | alpha ) |
Definition at line 170 of file paint_vertex_weight_utils.cc.
References wval_blend().
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_mul | ( | const float | weight, |
| const float | paintval, | ||
| const float | alpha ) |
Definition at line 166 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_overlay | ( | float | weight, |
| float | paintval, | ||
| float | fac ) |
Definition at line 226 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_screen | ( | float | weight, |
| float | paintval, | ||
| float | fac ) |
Definition at line 201 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_softlight | ( | float | weight, |
| float | paintval, | ||
| float | fac ) |
Definition at line 241 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().
| BLI_INLINE float wval_sub | ( | const float | weight, |
| const float | paintval, | ||
| const float | alpha ) |
Definition at line 162 of file paint_vertex_weight_utils.cc.
Referenced by ED_wpaint_blend_tool().