Files
LNXSDK/leenkx/blender/lnx/logicnode/miscellaneous/LN_get_application_time.py

21 lines
646 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
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
2025-01-22 16:18:30 +01:00
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)