Update Files
This commit is contained in:
12
leenkx/blender/lnx/logicnode/camera/LN_get_camera_active.py
Normal file
12
leenkx/blender/lnx/logicnode/camera/LN_get_camera_active.py
Normal 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')
|
12
leenkx/blender/lnx/logicnode/camera/LN_get_camera_aspect.py
Normal file
12
leenkx/blender/lnx/logicnode/camera/LN_get_camera_aspect.py
Normal 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')
|
14
leenkx/blender/lnx/logicnode/camera/LN_get_camera_fov.py
Normal file
14
leenkx/blender/lnx/logicnode/camera/LN_get_camera_fov.py
Normal 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')
|
13
leenkx/blender/lnx/logicnode/camera/LN_get_camera_scale.py
Normal file
13
leenkx/blender/lnx/logicnode/camera/LN_get_camera_scale.py
Normal 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
|
@ -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')
|
15
leenkx/blender/lnx/logicnode/camera/LN_get_camera_type.py
Normal file
15
leenkx/blender/lnx/logicnode/camera/LN_get_camera_type.py
Normal 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')
|
15
leenkx/blender/lnx/logicnode/camera/LN_set_camera_active.py
Normal file
15
leenkx/blender/lnx/logicnode/camera/LN_set_camera_active.py
Normal 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')
|
14
leenkx/blender/lnx/logicnode/camera/LN_set_camera_aspect.py
Normal file
14
leenkx/blender/lnx/logicnode/camera/LN_set_camera_aspect.py
Normal 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')
|
16
leenkx/blender/lnx/logicnode/camera/LN_set_camera_fov.py
Normal file
16
leenkx/blender/lnx/logicnode/camera/LN_set_camera_fov.py
Normal 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')
|
14
leenkx/blender/lnx/logicnode/camera/LN_set_camera_scale.py
Normal file
14
leenkx/blender/lnx/logicnode/camera/LN_set_camera_scale.py
Normal 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')
|
@ -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')
|
33
leenkx/blender/lnx/logicnode/camera/LN_set_camera_type.py
Normal file
33
leenkx/blender/lnx/logicnode/camera/LN_set_camera_type.py
Normal 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')
|
0
leenkx/blender/lnx/logicnode/camera/__init__.py
Normal file
0
leenkx/blender/lnx/logicnode/camera/__init__.py
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user