Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,12 @@
from lnx.logicnode.lnx_nodes import *
class ActiveCameraNode(LnxLogicTreeNode):
"""Returns the active camera.
@seeNode Set Active Camera"""
bl_idname = 'LNActiveCameraNode'
bl_label = 'Get Camera Active'
lnx_version = 1
def lnx_init(self, context):
self.add_output('LnxNodeSocketObject', 'Camera')

View File

@ -0,0 +1,12 @@
from lnx.logicnode.lnx_nodes import *
class GetCameraAspectNode(LnxLogicTreeNode):
"""Returns the aspect of the given camera."""
bl_idname = 'LNGetCameraAspectNode'
bl_label = 'Get Camera Aspect'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_output('LnxFloatSocket', 'Aspect')

View File

@ -0,0 +1,14 @@
from lnx.logicnode.lnx_nodes import *
class GetCameraFovNode(LnxLogicTreeNode):
"""Returns the field of view (FOV) of the given camera.
@seeNode Set Camera FOV"""
bl_idname = 'LNGetCameraFovNode'
bl_label = 'Get Camera FOV'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Object')
self.add_output('LnxFloatSocket', 'FOV')

View File

@ -0,0 +1,13 @@
from lnx.logicnode.lnx_nodes import *
class GetCameraScaleNode(LnxLogicTreeNode):
"""Returns the scale of the given camera."""
bl_idname = 'LNGetCameraScaleNode'
bl_label = 'Get Camera Ortho Scale'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_output('LnxFloatSocket', 'Ortho Scale')
2

View File

@ -0,0 +1,15 @@
from lnx.logicnode.lnx_nodes import *
class GetCameraStartEndNode(LnxLogicTreeNode):
"""Returns the Start & End of the given camera.
@seeNode Set Camera Start & End"""
bl_idname = 'LNGetCameraStartEndNode'
bl_label = 'Get Camera Start End'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_output('LnxFloatSocket', 'Start')
self.add_output('LnxFloatSocket', 'End')

View File

@ -0,0 +1,15 @@
from lnx.logicnode.lnx_nodes import *
class GetCameraTypeNode(LnxLogicTreeNode):
"""Returns the camera Type:
0 : Perspective
1 : Ortographic
."""
bl_idname = 'LNGetCameraTypeNode'
bl_label = 'Get Camera Type'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_output('LnxBoolSocket', 'Type')

View File

@ -0,0 +1,15 @@
from lnx.logicnode.lnx_nodes import *
class SetCameraNode(LnxLogicTreeNode):
"""Sets the active camera.
@seeNode Get Active Camera"""
bl_idname = 'LNSetCameraNode'
bl_label = 'Set Camera Active'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,14 @@
from lnx.logicnode.lnx_nodes import *
class SetCameraAspectNode(LnxLogicTreeNode):
"""Sets the aspect of the given camera."""
bl_idname = 'LNSetCameraAspectNode'
bl_label = 'Set Camera Aspect'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_input('LnxFloatSocket', 'Aspect', default_value=1.7)
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,16 @@
from lnx.logicnode.lnx_nodes import *
class SetCameraFovNode(LnxLogicTreeNode):
"""Sets the field of view (FOV) of the given camera.
@seeNode Get Camera FOV"""
bl_idname = 'LNSetCameraFovNode'
bl_label = 'Set Camera FOV'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_input('LnxFloatSocket', 'FOV', default_value=0.9)
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,14 @@
from lnx.logicnode.lnx_nodes import *
class SetCameraScaleNode(LnxLogicTreeNode):
"""Sets the aspect of the given camera."""
bl_idname = 'LNSetCameraScaleNode'
bl_label = 'Set Camera Ortho Scale'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_input('LnxFloatSocket', 'Ortho Scale', default_value=1.7)
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,39 @@
from lnx.logicnode.lnx_nodes import *
class SetCameraStartEndNode(LnxLogicTreeNode):
"""Sets the Start & End of the given camera.
@seeNode Get Camera Start & End"""
bl_idname = 'LNSetCameraStartEndNode'
bl_label = 'Set Camera Start End'
lnx_version = 1
def remove_extra_inputs(self, context):
while len(self.inputs) > 2:
self.inputs.remove(self.inputs[-1])
if self.property0 == 'Start':
self.add_input('LnxFloatSocket', 'Start')
if self.property0 == 'End':
self.add_input('LnxFloatSocket', 'End')
if self.property0 == 'Start&End':
self.add_input('LnxFloatSocket', 'Start')
self.add_input('LnxFloatSocket', 'End')
property0: HaxeEnumProperty(
'property0',
items = [('Start&End', 'Start&End', 'Start&End'),
('Start', 'Start', 'Start'),
('End', 'End', 'End')],
name='', default='Start&End', update=remove_extra_inputs)
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_input('LnxFloatSocket', 'Start')
self.add_input('LnxFloatSocket', 'End')
self.add_output('LnxNodeSocketAction', 'Out')
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')

View File

@ -0,0 +1,33 @@
from lnx.logicnode.lnx_nodes import *
class SetCameraTypeNode(LnxLogicTreeNode):
"""Sets the camera type."""
bl_idname = 'LNSetCameraTypeNode'
bl_label = 'Set Camera Type'
lnx_version = 1
def remove_extra_inputs(self, context):
while len(self.inputs) > 2:
self.inputs.remove(self.inputs[-1])
if self.property0 == 'Perspective':
self.add_input('LnxFloatSocket', 'Fov')
self.add_input('LnxFloatSocket', 'Start')
self.add_input('LnxFloatSocket', 'End')
if self.property0 == 'Orthographic':
self.add_input('LnxFloatSocket', 'Scale')
property0: HaxeEnumProperty(
'property0',
items = [('Perspective', 'Perspective', 'Perspective'),
('Orthographic', 'Orthographic', 'Orthographic')],
name='', default='Perspective', update=remove_extra_inputs)
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Camera')
self.add_input('LnxFloatSocket', 'Fov')
self.add_output('LnxNodeSocketAction', 'Out')
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')