forked from LeenkxTeam/LNXSDK
Repe [T3DU] Update - 31f26d171bba0355ce2a77031e3aad4c64dbc7e9
This commit is contained in:
17
leenkx/blender/lnx/logicnode/curve/LN_along_curve.py
Normal file
17
leenkx/blender/lnx/logicnode/curve/LN_along_curve.py
Normal file
@ -0,0 +1,17 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class AlongCurveNode(LnxLogicTreeNode):
|
||||
"""Sets an object along a curve."""
|
||||
bl_idname = 'LNAlongCurveNode'
|
||||
bl_label = 'Along Curve'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Object')
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
self.add_input('LnxIntSocket', 'Spline Index')
|
||||
self.add_input('LnxStringSocket', 'Forward Axis', default_value = 'X')
|
||||
self.add_input('LnxFloatSocket', 'Position')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
18
leenkx/blender/lnx/logicnode/curve/LN_deform_curve.py
Normal file
18
leenkx/blender/lnx/logicnode/curve/LN_deform_curve.py
Normal file
@ -0,0 +1,18 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class DeformCurveNode(LnxLogicTreeNode):
|
||||
"""Sets an object to deform using a curve."""
|
||||
bl_idname = 'LNDeformCurveNode'
|
||||
bl_label = 'Deform Curve'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Object')
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
self.add_input('LnxIntSocket', 'Spline Index')
|
||||
self.add_input('LnxStringSocket', 'Forward Axis', default_value = 'X')
|
||||
self.add_input('LnxFloatSocket', 'Start')
|
||||
self.add_input('LnxFloatSocket', 'End', default_value = 1.0)
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
22
leenkx/blender/lnx/logicnode/curve/LN_follow_curve.py
Normal file
22
leenkx/blender/lnx/logicnode/curve/LN_follow_curve.py
Normal file
@ -0,0 +1,22 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class FollowCurveNode(LnxLogicTreeNode):
|
||||
"""Sets an object to follow a curve."""
|
||||
bl_idname = 'LNFollowCurveNode'
|
||||
bl_label = 'Follow Curve'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Object')
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
self.add_input('LnxIntSocket', 'Spline Index')
|
||||
self.add_input('LnxStringSocket', 'Forward Axis', default_value = 'X')
|
||||
self.add_input('LnxFloatSocket', 'Speed')
|
||||
self.add_input('LnxBoolSocket', 'Forward', default_value = True)
|
||||
self.add_input('LnxBoolSocket', 'Cyclic')
|
||||
self.add_input('LnxFloatSocket', 'Start')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
self.add_output('LnxNodeSocketAction', 'Cycle')
|
||||
self.add_output('LnxFloatSocket', 'Progress')
|
||||
18
leenkx/blender/lnx/logicnode/curve/LN_get_curve_data.py
Normal file
18
leenkx/blender/lnx/logicnode/curve/LN_get_curve_data.py
Normal file
@ -0,0 +1,18 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class GetCurveDataNode(LnxLogicTreeNode):
|
||||
"""Gets curve data."""
|
||||
bl_idname = 'LNGetCurveDataNode'
|
||||
bl_label = 'Get Curve Data'
|
||||
lnx_section = 'get'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
|
||||
self.add_output('LnxIntSocket', 'Splines Length')
|
||||
self.add_output('LnxIntSocket', 'Equidistant Samples')
|
||||
self.add_output('LnxBoolSocket', 'Draw')
|
||||
self.add_output('LnxFloatSocket', 'Strength')
|
||||
self.add_output('LnxColorSocket', 'Color')
|
||||
self.add_output('LnxNodeSocketObject', 'Curve Mesh')
|
||||
16
leenkx/blender/lnx/logicnode/curve/LN_get_curve_spline.py
Normal file
16
leenkx/blender/lnx/logicnode/curve/LN_get_curve_spline.py
Normal file
@ -0,0 +1,16 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class GetCurveSplineNode(LnxLogicTreeNode):
|
||||
"""Gets curve spline."""
|
||||
bl_idname = 'LNGetCurveSplineNode'
|
||||
bl_label = 'Get Curve Spline'
|
||||
lnx_section = 'get'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
self.add_input('LnxIntSocket', 'Spline Index')
|
||||
|
||||
self.add_output('LnxNodeSocketArray', 'Points')
|
||||
self.add_output('LnxBoolSocket', 'Closed')
|
||||
self.add_output('LnxIntSocket', 'Resolution')
|
||||
38
leenkx/blender/lnx/logicnode/curve/LN_set_curve_data.py
Normal file
38
leenkx/blender/lnx/logicnode/curve/LN_set_curve_data.py
Normal file
@ -0,0 +1,38 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class SetCurveDataNode(LnxLogicTreeNode):
|
||||
"""Sets curve data."""
|
||||
bl_idname = 'LNSetCurveDataNode'
|
||||
bl_label = 'Set Curve Data'
|
||||
lnx_section = 'set'
|
||||
lnx_version = 1
|
||||
|
||||
def update_sockets(self, context):
|
||||
while len(self.inputs) > 2:
|
||||
self.inputs.remove(self.inputs[-1])
|
||||
if self.property0 == 'Equidistant Samples':
|
||||
self.add_input('LnxIntSocket', 'Equidistant Samples')
|
||||
elif self.property0 == 'Strength':
|
||||
self.add_input('LnxFloatSocket', 'Strength')
|
||||
elif self.property0 == 'Color':
|
||||
self.add_input('LnxColorSocket', 'Color')
|
||||
else:
|
||||
self.add_input('LnxIntSocket', 'Resolution', default_value = 12)
|
||||
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('Equidistant Samples', 'Equidistant Samples', 'Equidistant Samples'),
|
||||
('Resolution', 'Resolution', 'Resolution'),
|
||||
('Strength', 'Strength', 'Strength'),
|
||||
('Color', 'Color', 'Color')],
|
||||
name='', default='Equidistant Samples', update=update_sockets)
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
self.add_input('LnxIntSocket', 'Equidistant Samples')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
||||
52
leenkx/blender/lnx/logicnode/curve/LN_set_curve_mesh.py
Normal file
52
leenkx/blender/lnx/logicnode/curve/LN_set_curve_mesh.py
Normal file
@ -0,0 +1,52 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class SetCurveMeshNode(LnxLogicTreeNode):
|
||||
"""Sets curve mesh."""
|
||||
bl_idname = 'LNSetCurveMeshNode'
|
||||
bl_label = 'Set Curve Mesh'
|
||||
lnx_section = 'set'
|
||||
lnx_version = 1
|
||||
|
||||
def update_sockets(self, context):
|
||||
while len(self.inputs) > 2:
|
||||
self.inputs.remove(self.inputs[-1])
|
||||
if self.property0 == 'Extrude':
|
||||
self.add_input('LnxFloatSocket', 'Width', default_value = 0.1)
|
||||
self.add_input('LnxFloatSocket', 'Thickness')
|
||||
self.add_input('LnxFloatSocket', 'Start')
|
||||
self.add_input('LnxFloatSocket', 'End', default_value = 1.0)
|
||||
self.add_input('LnxBoolSocket', 'Fill Caps')
|
||||
elif self.property0 == 'Bevel':
|
||||
self.add_input('LnxFloatSocket', 'Depth', default_value = 0.1)
|
||||
self.add_input('LnxIntSocket', 'Resolution')
|
||||
self.add_input('LnxFloatSocket', 'Start')
|
||||
self.add_input('LnxFloatSocket', 'End', default_value = 1.0)
|
||||
self.add_input('LnxBoolSocket', 'Fill Caps')
|
||||
else:
|
||||
self.add_input('LnxNodeSocketObject', 'Object')
|
||||
self.add_input('LnxStringSocket', 'Forward Axis', default_value = 'X')
|
||||
self.add_input('LnxIntSocket', 'Repetitions', default_value = 1)
|
||||
self.add_input('LnxFloatSocket', 'Start')
|
||||
self.add_input('LnxFloatSocket', 'End', default_value = 1.0)
|
||||
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('Extrude', 'Extrude', 'Extrude'),
|
||||
('Bevel', 'Bevel', 'Bevel'),
|
||||
('Deform', 'Deform', 'Deform')],
|
||||
name='', default='Extrude', update=update_sockets)
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
self.add_input('LnxFloatSocket', 'Width', default_value = 0.1)
|
||||
self.add_input('LnxFloatSocket', 'Thickness')
|
||||
self.add_input('LnxFloatSocket', 'Start')
|
||||
self.add_input('LnxFloatSocket', 'End', default_value = 1.0)
|
||||
self.add_input('LnxBoolSocket', 'Fill Caps')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
self.add_output('LnxNodeSocketObject', 'Curve Mesh')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
||||
16
leenkx/blender/lnx/logicnode/curve/LN_set_curve_shape_key.py
Normal file
16
leenkx/blender/lnx/logicnode/curve/LN_set_curve_shape_key.py
Normal file
@ -0,0 +1,16 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class SetCurveShapeKeyNode(LnxLogicTreeNode):
|
||||
"""Sets shape key value of the curve"""
|
||||
bl_idname = 'LNSetCurveShapeKeyNode'
|
||||
bl_label = 'Set Curve Shape Key'
|
||||
lnx_section = 'set'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
self.add_input('LnxStringSocket', 'Shape Key')
|
||||
self.add_input('LnxFloatSocket', 'Value')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
17
leenkx/blender/lnx/logicnode/curve/LN_set_curve_spline.py
Normal file
17
leenkx/blender/lnx/logicnode/curve/LN_set_curve_spline.py
Normal file
@ -0,0 +1,17 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class SetCurveSplineNode(LnxLogicTreeNode):
|
||||
"""Sets curve spline."""
|
||||
bl_idname = 'LNSetCurveSplineNode'
|
||||
bl_label = 'Set Curve Spline'
|
||||
lnx_section = 'set'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Curve')
|
||||
self.add_input('LnxIntSocket', 'Spline Index')
|
||||
self.add_input('LnxBoolSocket', 'Closed')
|
||||
self.add_input('LnxIntSocket', 'Resolution', default_value = 12)
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
3
leenkx/blender/lnx/logicnode/curve/__init__.py
Normal file
3
leenkx/blender/lnx/logicnode/curve/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from lnx.logicnode.lnx_nodes import add_node_section
|
||||
|
||||
add_node_section(name='default', category='curve')
|
||||
Reference in New Issue
Block a user