112 vgroup_index->
mirror = mirror;
153 const float talpha =
min_ff(alpha, 1.0f);
154 return (paintval * talpha) + (weight * (1.0f - talpha));
158 return weight + (paintval * alpha);
162 return weight - (paintval * alpha);
166 return ((1.0f - alpha) + (alpha * paintval)) * weight;
170 return (weight < paintval) ?
wval_blend(weight, paintval, alpha) : weight;
174 return (weight > paintval) ?
wval_blend(weight, paintval, alpha) : weight;
185 temp = (paintval == 1.0f) ? 1.0f :
186 min_ff((weight * (225.0f / 255.0f)) / (1.0f - paintval), 1.0f);
187 return mfac * weight + temp * fac;
196 temp =
fabsf(weight - paintval);
197 return mfac * weight + temp * fac;
206 temp =
max_ff(1.0f - (((1.0f - weight) * (1.0f - paintval))), 0);
207 return mfac * weight + temp * fac;
216 if (paintval > 0.5f) {
217 temp = 1.0f - ((1.0f - 2.0f * (paintval - 0.5f)) * (1.0f - weight));
220 temp = (2.0f * paintval * weight);
222 return mfac * weight + temp * fac;
232 temp = 1.0f - ((1.0f - 2.0f * (weight - 0.5f)) * (1.0f - paintval));
235 temp = (2.0f * paintval * weight);
237 return mfac * weight + temp * fac;
247 temp = ((2.0f * ((paintval / 2.0f) + 0.25f)) * weight);
250 temp = 1.0f - (2.0f * (1.0f - ((paintval / 2.0f) + 0.25f)) * (1.0f - weight));
252 return temp * fac + weight * mfac;
261 temp = 0.5f - ((2.0f * (weight - 0.5f) * (paintval - 0.5f)));
262 return temp * fac + weight * mfac;
267 const float paintval,
274 return wval_add(weight, paintval, alpha);
276 return wval_sub(weight, paintval, alpha);
278 return wval_mul(weight, paintval, alpha);
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, eReportType 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)
size_t BLI_string_flip_side_name(char *r_name, const char *from_name, bool strip_number, 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.
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
int vertex_group_active_index
void WM_event_add_notifier(const bContext *C, uint type, void *reference)