forked from LeenkxTeam/LNXSDK
21 lines
646 B
Python
21 lines
646 B
Python
from lnx.logicnode.lnx_nodes import *
|
|
|
|
class TimeNode(LnxLogicTreeNode):
|
|
"""Returns the application execution time and the delta time."""
|
|
bl_idname = 'LNTimeNode'
|
|
bl_label = 'Get Application Time'
|
|
lnx_section = 'time'
|
|
lnx_version = 2
|
|
|
|
def lnx_init(self, context):
|
|
self.add_output('LnxFloatSocket', 'Time')
|
|
self.add_output('LnxFloatSocket', 'Delta')
|
|
self.add_output('LnxFloatSocket', 'RealTime')
|
|
|
|
|
|
def get_replacement_node(self, node_tree: bpy.types.NodeTree):
|
|
if self.lnx_version not in (0, 1):
|
|
raise LookupError()
|
|
|
|
return NodeReplacement.Identity(self)
|