Blender  V3.3
Functions
paint_vertex_weight_utils.c File Reference
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string_utils.h"
#include "DNA_armature_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_object_deform.h"
#include "BKE_report.h"
#include "DEG_depsgraph_build.h"
#include "IMB_imbuf.h"
#include "WM_api.h"
#include "WM_types.h"
#include "paint_intern.h"

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, struct ReportList *reports, enum eWPaintFlag flag, struct 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)
 

Detailed Description

Intended for use by paint_vertex.c & paint_vertex_weight_ops.c.

Definition in file paint_vertex_weight_utils.c.

Function Documentation

◆ ED_wpaint_blend_tool()

float ED_wpaint_blend_tool ( int  tool,
float  weight,
float  paintval,
float  alpha 
)

◆ ED_wpaint_ensure_data()

bool ED_wpaint_ensure_data ( struct bContext C,
struct ReportList reports,
enum eWPaintFlag  flag,
struct WPaintVGroupIndex vgroup_index 
)

◆ ED_wpaint_mirror_vgroup_ensure()

int ED_wpaint_mirror_vgroup_ensure ( struct Object ob,
int  vgroup_active 
)

◆ wval_add()

BLI_INLINE float wval_add ( const float  weight,
const float  paintval,
const float  alpha 
)

Definition at line 156 of file paint_vertex_weight_utils.c.

Referenced by ED_wpaint_blend_tool().

◆ wval_blend()

BLI_INLINE float wval_blend ( const float  weight,
const float  paintval,
const float  alpha 
)

Definition at line 151 of file paint_vertex_weight_utils.c.

References min_ff().

Referenced by ED_wpaint_blend_tool(), wval_darken(), and wval_lighten().

◆ wval_colordodge()

BLI_INLINE float wval_colordodge ( float  weight,
float  paintval,
float  fac 
)

Definition at line 178 of file paint_vertex_weight_utils.c.

References min_ff().

Referenced by ED_wpaint_blend_tool().

◆ wval_darken()

BLI_INLINE float wval_darken ( const float  weight,
const float  paintval,
const float  alpha 
)

Definition at line 172 of file paint_vertex_weight_utils.c.

References wval_blend().

Referenced by ED_wpaint_blend_tool().

◆ wval_difference()

BLI_INLINE float wval_difference ( float  weight,
float  paintval,
float  fac 
)

Definition at line 189 of file paint_vertex_weight_utils.c.

References fabsf.

Referenced by ED_wpaint_blend_tool().

◆ wval_exclusion()

BLI_INLINE float wval_exclusion ( float  weight,
float  paintval,
float  fac 
)

Definition at line 254 of file paint_vertex_weight_utils.c.

Referenced by ED_wpaint_blend_tool().

◆ wval_hardlight()

BLI_INLINE float wval_hardlight ( float  weight,
float  paintval,
float  fac 
)

Definition at line 209 of file paint_vertex_weight_utils.c.

Referenced by ED_wpaint_blend_tool().

◆ wval_lighten()

BLI_INLINE float wval_lighten ( const float  weight,
const float  paintval,
const float  alpha 
)

Definition at line 168 of file paint_vertex_weight_utils.c.

References wval_blend().

Referenced by ED_wpaint_blend_tool().

◆ wval_mul()

BLI_INLINE float wval_mul ( const float  weight,
const float  paintval,
const float  alpha 
)

Definition at line 164 of file paint_vertex_weight_utils.c.

Referenced by ED_wpaint_blend_tool().

◆ wval_overlay()

BLI_INLINE float wval_overlay ( float  weight,
float  paintval,
float  fac 
)

Definition at line 224 of file paint_vertex_weight_utils.c.

Referenced by ED_wpaint_blend_tool().

◆ wval_screen()

BLI_INLINE float wval_screen ( float  weight,
float  paintval,
float  fac 
)

Definition at line 199 of file paint_vertex_weight_utils.c.

References max_ff().

Referenced by ED_wpaint_blend_tool().

◆ wval_softlight()

BLI_INLINE float wval_softlight ( float  weight,
float  paintval,
float  fac 
)

Definition at line 239 of file paint_vertex_weight_utils.c.

Referenced by ED_wpaint_blend_tool().

◆ wval_sub()

BLI_INLINE float wval_sub ( const float  weight,
const float  paintval,
const float  alpha 
)

Definition at line 160 of file paint_vertex_weight_utils.c.

Referenced by ED_wpaint_blend_tool().