124 vgroup_index->
mirror = mirror;
165 return (paintval * talpha) + (weight * (1.0f - talpha));
169 return weight + (paintval *
alpha);
173 return weight - (paintval *
alpha);
177 return ((1.0f -
alpha) + (
alpha * paintval)) * weight;
181 return (weight < paintval) ?
wval_blend(weight, paintval,
alpha) : weight;
185 return (weight > paintval) ?
wval_blend(weight, paintval,
alpha) : weight;
196 temp = (paintval == 1.0f) ? 1.0f :
197 min_ff((weight * (225.0f / 255.0f)) / (1.0f - paintval), 1.0f);
198 return mfac * weight + temp * fac;
207 temp =
fabsf(weight - paintval);
208 return mfac * weight + temp * fac;
217 temp =
max_ff(1.0f - (((1.0f - weight) * (1.0f - paintval))), 0);
218 return mfac * weight + temp * fac;
227 if (paintval > 0.5f) {
228 temp = 1.0f - ((1.0f - 2.0f * (paintval - 0.5f)) * (1.0f - weight));
231 temp = (2.0f * paintval * weight);
233 return mfac * weight + temp * fac;
243 temp = 1.0f - ((1.0f - 2.0f * (weight - 0.5f)) * (1.0f - paintval));
246 temp = (2.0f * paintval * weight);
248 return mfac * weight + temp * fac;
258 temp = ((2.0f * ((paintval / 2.0f) + 0.25f)) * weight);
261 temp = 1.0f - (2.0f * (1.0f - ((paintval / 2.0f) + 0.25f)) * (1.0f - weight));
263 return temp * fac + weight * mfac;
272 temp = 0.5f - ((2.0f * (weight - 0.5f) * (paintval - 0.5f)));
273 return temp * fac + weight * mfac;
286 const float paintval,
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
struct Object * CTX_data_active_object(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct Mesh * BKE_mesh_from_object(struct Object *ob)
struct Object * BKE_modifiers_is_deformed_by_armature(struct Object *ob)
General operations, lookup, etc. for blender objects.
bool BKE_object_is_in_editmode(const struct Object *ob)
void BKE_report(ReportList *reports, ReportType type, const char *message)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
void BLI_string_flip_side_name(char *r_name, const char *from_name, const bool strip_number, const size_t name_len)
void DEG_relations_tag_update(struct Main *bmain)
#define ME_USING_MIRROR_X_VERTEX_GROUPS(_me)
Object is a sort of wrapper for general info.
static CCL_NAMESPACE_BEGIN const double alpha
BLI_INLINE float wval_screen(float weight, float paintval, float fac)
BLI_INLINE float wval_softlight(float weight, float paintval, float fac)
BLI_INLINE float wval_difference(float weight, float paintval, float fac)
BLI_INLINE float wval_colordodge(float weight, float paintval, float fac)
float ED_wpaint_blend_tool(const int tool, const float weight, const float paintval, const float alpha)
BLI_INLINE float wval_blend(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_overlay(float weight, float paintval, float fac)
bool ED_wpaint_ensure_data(bContext *C, struct ReportList *reports, enum eWPaintFlag flag, struct WPaintVGroupIndex *vgroup_index)
BLI_INLINE float wval_mul(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_add(const float weight, const float paintval, const float alpha)
BLI_INLINE float wval_exclusion(float weight, float paintval, float fac)
BLI_INLINE float wval_hardlight(float weight, float paintval, float fac)
BLI_INLINE float wval_sub(const float weight, const float paintval, const float alpha)
int ED_wpaint_mirror_vgroup_ensure(Object *ob, const int vgroup_active)
struct MDeformVert * dvert
void WM_event_add_notifier(const bContext *C, uint type, void *reference)