forked from LeenkxTeam/LNXSDK
18 lines
459 B
Python
18 lines
459 B
Python
|
from lnx.logicnode.lnx_nodes import *
|
||
|
|
||
|
class ClampNode(LnxLogicTreeNode):
|
||
|
"""Keeps the value inside the given bound.
|
||
|
|
||
|
@seeNode Map Range
|
||
|
"""
|
||
|
bl_idname = 'LNClampNode'
|
||
|
bl_label = 'Clamp'
|
||
|
lnx_version = 1
|
||
|
|
||
|
def lnx_init(self, context):
|
||
|
self.add_input('LnxFloatSocket', 'Value')
|
||
|
self.add_input('LnxFloatSocket', 'Min')
|
||
|
self.add_input('LnxFloatSocket', 'Max')
|
||
|
|
||
|
self.add_output('LnxFloatSocket', 'Result')
|