forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
46
leenkx/blender/lnx/logicnode/math/LN_mix_vector.py
Normal file
46
leenkx/blender/lnx/logicnode/math/LN_mix_vector.py
Normal file
@ -0,0 +1,46 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class VectorMixNode(LnxLogicTreeNode):
|
||||
"""Interpolates between the two given vectors."""
|
||||
bl_idname = 'LNVectorMixNode'
|
||||
bl_label = 'Mix Vector'
|
||||
lnx_section = 'vector'
|
||||
lnx_version = 1
|
||||
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('Linear', 'Linear', 'Linear'),
|
||||
('Sine', 'Sine', 'Sine'),
|
||||
('Quad', 'Quad', 'Quad'),
|
||||
('Cubic', 'Cubic', 'Cubic'),
|
||||
('Quart', 'Quart', 'Quart'),
|
||||
('Quint', 'Quint', 'Quint'),
|
||||
('Expo', 'Expo', 'Expo'),
|
||||
('Circ', 'Circ', 'Circ'),
|
||||
('Back', 'Back', 'Back'),
|
||||
('Bounce', 'Bounce', 'Bounce'),
|
||||
('Elastic', 'Elastic', 'Elastic'),
|
||||
],
|
||||
name='', default='Linear')
|
||||
property1: HaxeEnumProperty(
|
||||
'property1',
|
||||
items = [('In', 'In', 'In'),
|
||||
('Out', 'Out', 'Out'),
|
||||
('InOut', 'InOut', 'InOut'),
|
||||
],
|
||||
name='', default='Out')
|
||||
|
||||
property2: HaxeBoolProperty('property2', name='Clamp', default=False)
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxFloatSocket', 'Factor', default_value=0.0)
|
||||
self.add_input('LnxVectorSocket', 'Vector 1', default_value=[0.0, 0.0, 0.0])
|
||||
self.add_input('LnxVectorSocket', 'Vector 2', default_value=[1.0, 1.0, 1.0])
|
||||
|
||||
self.add_output('LnxVectorSocket', 'Result')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property2')
|
||||
layout.prop(self, 'property0')
|
||||
if self.property0 != 'Linear':
|
||||
layout.prop(self, 'property1')
|
Reference in New Issue
Block a user