forked from LeenkxTeam/LNXSDK
Repe [T3DU] Update - 31f26d171bba0355ce2a77031e3aad4c64dbc7e9
This commit is contained in:
@ -14,18 +14,25 @@ class RotationNode(LnxLogicVariableNodeMixin, LnxLogicTreeNode):
|
||||
self.add_input('LnxFloatSocket', 'Angle / W')
|
||||
|
||||
self.add_output('LnxRotationSocket', 'Out', is_var=True)
|
||||
|
||||
self.inputs[1].hide = True
|
||||
|
||||
def on_property_update(self, context):
|
||||
"""called by the EnumProperty, used to update the node socket labels"""
|
||||
if self.property0 == "Quaternion":
|
||||
self.inputs[0].name = "Quaternion XYZ"
|
||||
self.inputs[1].name = "Quaternion W"
|
||||
self.inputs[1].hide = False
|
||||
elif self.property0 == "EulerAngles":
|
||||
self.inputs[0].name = "Euler Angles"
|
||||
self.inputs[1].name = "[unused for Euler input]"
|
||||
if self.inputs[1].is_linked:
|
||||
for link in self.inputs[1].links:
|
||||
self.id_data.links.remove(link)
|
||||
self.inputs[1].hide = True
|
||||
elif self.property0 == "AxisAngle":
|
||||
self.inputs[0].name = "Axis"
|
||||
self.inputs[1].name = "Angle"
|
||||
self.inputs[1].hide = False
|
||||
else:
|
||||
raise ValueError('No nodesocket labels for current input mode: check self-consistancy of LN_rotation.py')
|
||||
|
||||
@ -49,7 +56,7 @@ class RotationNode(LnxLogicVariableNodeMixin, LnxLogicTreeNode):
|
||||
'property1',
|
||||
items=[('Deg', 'Degrees', 'Degrees'),
|
||||
('Rad', 'Radians', 'Radians')],
|
||||
name='', default='Rad')
|
||||
name='', default='Deg')
|
||||
property2: HaxeEnumProperty(
|
||||
'property2',
|
||||
items=[('XYZ','XYZ','XYZ'),
|
||||
|
||||
Reference in New Issue
Block a user