2018-04-13 05:45:19 +02:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class VectorClampToSizeNode(ArmLogicTreeNode):
|
2020-09-08 23:14:51 +02:00
|
|
|
"""Vector clamp to size node"""
|
2018-04-13 05:45:19 +02:00
|
|
|
bl_idname = 'LNVectorClampToSizeNode'
|
|
|
|
bl_label = 'Vector Clamp To Size'
|
2020-09-08 17:03:24 +02:00
|
|
|
|
2018-04-13 05:45:19 +02:00
|
|
|
def init(self, context):
|
2020-09-08 21:49:02 +02:00
|
|
|
self.add_input('NodeSocketVector', 'Vector', default_value=[0.5, 0.5, 0.5])
|
|
|
|
self.add_input('NodeSocketFloat', 'Min')
|
|
|
|
self.add_input('NodeSocketFloat', 'Max')
|
|
|
|
self.add_output('NodeSocketVector', 'Vector')
|
2018-04-13 05:45:19 +02:00
|
|
|
|
2020-09-09 20:48:35 +02:00
|
|
|
add_node(VectorClampToSizeNode, category=PKG_AS_CATEGORY, section='vector')
|