Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
index daca46c3a9a..a3dbcdf23de 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
@@ -81,9 +81,9 @@ static void initData(GpencilModifierData *md)
gpmd->object = NULL;
gpmd->force = 0.5f;
gpmd->falloff_type = eGPHook_Falloff_Smooth;
- gpmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+ gpmd->curfalloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (gpmd->curfalloff) {
- curvemapping_initialize(gpmd->curfalloff);
+ BKE_curvemapping_initialize(gpmd->curfalloff);
}
}
@@ -93,13 +93,13 @@ static void copyData(const GpencilModifierData *md, GpencilModifierData *target)
HookGpencilModifierData *tgmd = (HookGpencilModifierData *)target;
if (tgmd->curfalloff != NULL) {
- curvemapping_free(tgmd->curfalloff);
+ BKE_curvemapping_free(tgmd->curfalloff);
tgmd->curfalloff = NULL;
}
BKE_gpencil_modifier_copyData_generic(md, target);
- tgmd->curfalloff = curvemapping_copy(gmd->curfalloff);
+ tgmd->curfalloff = BKE_curvemapping_copy(gmd->curfalloff);
}
/* calculate factor of fallof */
@@ -126,7 +126,7 @@ static float gp_hook_falloff(const struct GPHookData_cb *tData, const float len_
switch (tData->falloff_type) {
case eGPHook_Falloff_Curve:
- fac = curvemapping_evaluateF(tData->curfalloff, 0, fac);
+ fac = BKE_curvemapping_evaluateF(tData->curfalloff, 0, fac);
break;
case eGPHook_Falloff_Sharp:
fac = fac * fac;
@@ -190,6 +190,7 @@ static void deformStroke(GpencilModifierData *md,
Depsgraph *UNUSED(depsgraph),
Object *ob,
bGPDlayer *gpl,
+ bGPDframe *UNUSED(gpf),
bGPDstroke *gps)
{
HookGpencilModifierData *mmd = (HookGpencilModifierData *)md;
@@ -285,7 +286,7 @@ static void bakeModifier(Main *bmain, Depsgraph *depsgraph, GpencilModifierData
/* compute hook effects on this frame */
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
- deformStroke(md, depsgraph, ob, gpl, gps);
+ deformStroke(md, depsgraph, ob, gpl, gpf, gps);
}
}
}
@@ -300,7 +301,7 @@ static void freeData(GpencilModifierData *md)
HookGpencilModifierData *mmd = (HookGpencilModifierData *)md;
if (mmd->curfalloff) {
- curvemapping_free(mmd->curfalloff);
+ BKE_curvemapping_free(mmd->curfalloff);
}
}