LNXSDK/leenkx/blender/lnx/logicnode/math/LN_float_delta_interpolate.py

21 lines
769 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class FloatDeltaInterpolateNode(LnxLogicTreeNode):
"""Linearly interpolate to a new value with specified interpolation `Rate`.
@input From: Value to interpolate from.
@input To: Value to interpolate to.
@input Delta Time: Delta Time.
@input Rate: Rate of interpolation.
"""
bl_idname = 'LNFloatDeltaInterpolateNode'
bl_label = 'Float Delta Interpolate'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxFloatSocket', 'From', default_value=0.0)
self.add_input('LnxFloatSocket', 'To', default_value=1.0)
self.add_input('LnxFloatSocket', 'Delta Time')
self.add_input('LnxFloatSocket', 'Rate')
self.add_output('LnxFloatSocket', 'Result')