Additional terms

Additional terms
This commit is contained in:
E1e5en 2020-11-14 11:52:07 +03:00
parent 5f4a3104f1
commit 82ac44571a
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ class QuaternionMathNode(ArmLogicTreeNode):
def set_bool(self, value):
self['property1'] = value
if value:
if (self.property0 == 'Module') or (self.property0 == 'DotProduct') or (self.property0 == 'ToAxisAngle'):
if ((self.property0 == 'Module') or (self.property0 == 'DotProduct') or (self.property0 == 'ToAxisAngle')) and (len(self.outputs) > 1):
self.outputs.remove(self.outputs.values()[-1]) # Module/DotProduct/ToAxisAngle
self.add_output('NodeSocketFloat', 'X') # Result X
self.add_output('NodeSocketFloat', 'Y') # Result Y
@ -26,7 +26,7 @@ class QuaternionMathNode(ArmLogicTreeNode):
if (self.property0 == 'ToAxisAngle'):
self.add_output('NodeSocketFloat', 'To Axis Angle') # ToAxisAngle
else:
if (self.property0 == 'Module') or (self.property0 == 'DotProduct') or (self.property0 == 'ToAxisAngle'):
if ((self.property0 == 'Module') or (self.property0 == 'DotProduct') or (self.property0 == 'ToAxisAngle')) and (len(self.outputs) > 1):
self.outputs.remove(self.outputs.values()[-1]) # Module/DotProduct/ToAxisAngle
# Remove X, Y, Z, W
for i in range(4):

View file

@ -27,7 +27,7 @@ class VectorMathNode(ArmLogicTreeNode):
if (self.property0 == 'Dot Product'):
self.add_output('NodeSocketFloat', 'Scalar') # Scalar
else:
if (self.property0 == 'Length') or (self.property0 == 'Distance') or (self.property0 == 'Dot Product'):
if ((self.property0 == 'Length') or (self.property0 == 'Distance') or (self.property0 == 'Dot Product')) and (len(self.outputs) > 1):
self.outputs.remove(self.outputs.values()[-1]) # Distance/Length/Scalar
# Remove X, Y, Z
for i in range(3):