merge upstream

This commit is contained in:
2025-07-03 07:46:23 +00:00
9 changed files with 179 additions and 0 deletions

View File

@ -0,0 +1,17 @@
from lnx.logicnode.lnx_nodes import *
class GetAudioPositionNode(LnxLogicTreeNode):
"""Gets the current playback position of 3D audio in seconds."""
bl_idname = 'LNGetAudioPositionNode'
bl_label = 'Get Audio Position'
bl_description = 'Gets the current playback position of 3D audio in seconds.'
lnx_category = '3D_Audio'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxDynamicSocket', 'Audio')
self.add_output('LnxFloatSocket', 'Position (seconds)')
def register():
add_category('3D_Audio', icon='SOUND')
GetAudioPositionNode.on_register()

View File

@ -0,0 +1,20 @@
from lnx.logicnode.lnx_nodes import *
class SetAudioPositionNode(LnxLogicTreeNode):
"""Sets the playback position of 3D audio. This node allows you to "scrub" through 3D audio by setting the current playback position to a specific time in seconds."""
bl_idname = 'LNSetAudioPositionNode'
bl_label = 'Set Audio Position'
bl_description = 'Sets the playback position of 3D audio'
lnx_category = '3D_Audio'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxDynamicSocket', 'Audio')
self.add_input('LnxFloatSocket', 'Position (seconds)')
self.add_output('LnxNodeSocketAction', 'Out')
def register():
add_category('3D_Audio', icon='SOUND')
SetAudioPositionNode.on_register()

View File

@ -0,0 +1,11 @@
from lnx.logicnode.lnx_nodes import *
class GetPositionSpeakerNode(LnxLogicTreeNode):
"""Gets the current playback position of the given speaker object in seconds."""
bl_idname = 'LNGetPositionSpeakerNode'
bl_label = 'Get Position Speaker'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Speaker')
self.add_output('LnxFloatSocket', 'Position (seconds)')

View File

@ -0,0 +1,17 @@
from lnx.logicnode.lnx_nodes import *
class SetPositionSpeakerNode(LnxLogicTreeNode):
"""Sets the playback position of the given speaker object.
This node allows you to "scrub" through audio by setting the current playback position
to a specific time in seconds. The speaker must be playing for this to take effect.
"""
bl_idname = 'LNSetPositionSpeakerNode'
bl_label = 'Set Position Speaker'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Speaker')
self.add_input('LnxFloatSocket', 'Position (seconds)')
self.add_output('LnxNodeSocketAction', 'Out')