Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
| Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Lines | if (mmd->flag & GP_THICK_NORMALIZE) { | ||||
| target = mmd->thickness * stroke_thickness_inv; | target = mmd->thickness * stroke_thickness_inv; | ||||
| target *= curvef; | target *= curvef; | ||||
| } | } | ||||
| else { | else { | ||||
| target = pt->pressure * mmd->thickness_fac; | target = pt->pressure * mmd->thickness_fac; | ||||
| weight *= curvef; | weight *= curvef; | ||||
| } | } | ||||
| float fac_begin = mmd->flag & GP_THICK_NORMALIZE ? 1 : mmd->thickness_fac; | /* Apply distance fading. */ | ||||
| target *= interpf(fac_begin, mmd->fading_end_factor, factor_depth); | if (mmd->flag & GP_THICK_FADING) { | ||||
| target = interpf(target, mmd->fading_end_factor, factor_depth); | |||||
| } | |||||
| pt->pressure = interpf(target, pt->pressure, weight); | pt->pressure = interpf(target, pt->pressure, weight); | ||||
| CLAMP_MIN(pt->pressure, 0.0f); | CLAMP_MIN(pt->pressure, 0.0f); | ||||
| } | } | ||||
| } | } | ||||
| static void bakeModifier(struct Main *UNUSED(bmain), | static void bakeModifier(struct Main *UNUSED(bmain), | ||||
| ▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines | |||||