From a50b9d83aaf5cbe9968497c0f7acbabe4e9fec92 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 27 Mar 2024 11:06:34 +0100 Subject: [PATCH] interval: Fix creating LerpFunctionInterval from partial Fixes #1623 --- direct/src/interval/LerpInterval.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/direct/src/interval/LerpInterval.py b/direct/src/interval/LerpInterval.py index 24435ae084..b65b3750ca 100644 --- a/direct/src/interval/LerpInterval.py +++ b/direct/src/interval/LerpInterval.py @@ -821,9 +821,13 @@ class LerpFunctionInterval(Interval.Interval): self.blendType = LerpBlendHelpers.getBlend(blendType) self.extraArgs = extraArgs # Generate unique name if necessary - if (name == None): + if name is None: + if hasattr(function, '__name__'): + name = function.__name__ + else: + name = '<' + function.__class__.__name__ + '>' name = ('LerpFunctionInterval-%s-%d' % - (function.__name__, + (name, LerpFunctionInterval.lerpFunctionIntervalNum)) LerpFunctionInterval.lerpFunctionIntervalNum += 1 else: