armory/blender/arm/logicnode/math/LN_matrix_math.py

23 lines
674 B
Python
Raw Normal View History

2017-04-08 20:05:35 +02:00
from arm.logicnode.arm_nodes import *
class MatrixMathNode(ArmLogicTreeNode):
2020-10-05 19:55:56 +02:00
"""Multiplies matrices."""
2017-04-08 20:05:35 +02:00
bl_idname = 'LNMatrixMathNode'
bl_label = 'Matrix Math'
2020-10-27 19:44:37 +01:00
arm_section = 'matrix'
arm_version = 1
2020-10-27 19:44:37 +01:00
2018-12-18 23:48:38 +01:00
property0: EnumProperty(
2017-04-08 20:05:35 +02:00
items = [('Multiply', 'Multiply', 'Multiply')],
name='', default='Multiply')
2017-04-08 20:05:35 +02:00
def init(self, context):
super(MatrixMathNode, self).init(context)
2020-09-20 20:10:01 +02:00
self.add_input('NodeSocketShader', 'Matrix 1')
self.add_input('NodeSocketShader', 'Matrix 2')
2020-11-17 16:01:15 +01:00
2020-09-20 20:10:01 +02:00
self.add_output('NodeSocketShader', 'Result')
2017-04-08 20:05:35 +02:00
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')