1. Move the Quaternion node from Transform to Variable 2. Move the Separate Quaternion node from Transform to Math 3. Added Quaternion Math Node Linked to PR - https://github.com/armory3d/iron/pull/108
20 lines
656 B
Python
20 lines
656 B
Python
from arm.logicnode.arm_nodes import *
|
|
|
|
class QuaternionNode(ArmLogicTreeNode):
|
|
"""TO DO."""
|
|
bl_idname = 'LNQuaternionNode'
|
|
bl_label = 'Quaternion'
|
|
arm_section = 'quaternions'
|
|
arm_version = 1
|
|
|
|
def init(self, context):
|
|
super(QuaternionNode, self).init(context)
|
|
self.add_input('NodeSocketFloat', 'X')
|
|
self.add_input('NodeSocketFloat', 'Y')
|
|
self.add_input('NodeSocketFloat', 'Z')
|
|
self.add_input('NodeSocketFloat', 'W', default_value=1.0)
|
|
|
|
self.add_output('NodeSocketVector', 'Quaternion')
|
|
self.add_output('NodeSocketVector', 'XYZ')
|
|
self.add_output('NodeSocketFloat', 'W')
|