userManagesMemory in HprInterval this time

Hello All,

I meet the userManagesMemory again in Hpr Interval…
This time message is more explicit but i didn’t manage to
identify the issue.

the calling code is:

self.hprInterval=LerpHprInterval(model, duration, newHpr, startHpr,reference,
                  blendType,bakeInStart , fluid , IntervalName+"hpr")

the error msg is :

File “E:\WG\ArkheniaFrameWork\bin\”, line 68, in onEnable
blendType,bakeInStart , fluid , IntervalName+“hpr”)
File “E:\Panda3D\direct\src\interval\”, line 116, in init
File “E:\Panda3D\direct\src\interval\”, line 26, in init
File “CLerpInterval”, line 92, in stringBlendType
TypeError: argument 1 must be string or read-only buffer, not int
Exception exceptions.AttributeError: “LerpHprInterval instance has no attribute
‘userManagesMemory’” in ignored

Blend type is set to ‘noBlend’ as in previous post.

I wonder if fluid can be used on every Interval or only on Posinterval.
( it does not seem to make sense in other interval than Pos interval but
manual says it’s in all interval parameters so…)

Anyhow thanks for any kind of help

I think your problem might be a combination of things. You specify most of the parameters, but some revert to default (you dont use startQuat). You then define a variable blendType and use that for the blendType keyword in a lerp interval. But since it is already defined as a variable, python doesnt know it is intended for the blendType argument. So python orders the arguments in the way they were defined in the class, which is not the order you wanted.

Try changing your predefined blendType variable to something like bt. Then, when you create your interval use blendType=bt. It would help if you did this for all of the optional variables defined in an interval class.

You are right " using named arguments is solving the issue " if you also remove the “fluid parameter”.

by the way it’s is also a good coding practice in case of an evolving engine…

For the Quat part , it was pretty normal since i was using Hpr instead of Quat… old habit …

Thanks for your help. I debugged my code and it works now…