17 lines
604 B
Python
17 lines
604 B
Python
|
from lnx.logicnode.lnx_nodes import *
|
||
|
|
||
|
class TranslateObjectNode(LnxLogicTreeNode):
|
||
|
"""Translates (moves) the given object using the given vector in world coordinates."""
|
||
|
bl_idname = 'LNTranslateObjectNode'
|
||
|
bl_label = 'Translate Object'
|
||
|
lnx_section = 'location'
|
||
|
lnx_version = 1
|
||
|
|
||
|
def lnx_init(self, context):
|
||
|
self.add_input('LnxNodeSocketAction', 'In')
|
||
|
self.add_input('LnxNodeSocketObject', 'Object')
|
||
|
self.add_input('LnxVectorSocket', 'Vector')
|
||
|
self.add_input('LnxBoolSocket', 'On Local Axis')
|
||
|
|
||
|
self.add_output('LnxNodeSocketAction', 'Out')
|