forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
@ -0,0 +1,12 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class GetHosekWilkiePropertiesNode(LnxLogicTreeNode):
|
||||
"""Gets the HosekWilkie properties."""
|
||||
bl_idname = 'LNGetHosekWilkiePropertiesNode'
|
||||
bl_label = 'Get HosekWilkie Properties'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_output('LnxFloatSocket', 'Turbidity')
|
||||
self.add_output('LnxFloatSocket', 'Ground Albedo')
|
||||
self.add_output('LnxVectorSocket', 'Sun Direction')
|
@ -0,0 +1,14 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class GetNishitaPropertiesNode(LnxLogicTreeNode):
|
||||
"""Gets the Nishita properties."""
|
||||
bl_idname = 'LNGetNishitaPropertiesNode'
|
||||
bl_label = 'Get Nishita Properties'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_output('LnxFloatSocket', 'Air')
|
||||
self.add_output('LnxFloatSocket', 'Dust')
|
||||
self.add_output('LnxFloatSocket', 'Ozone')
|
||||
self.add_output('LnxVectorSocket', 'Sun Direction')
|
||||
|
10
leenkx/blender/lnx/logicnode/world/LN_get_world_strength.py
Normal file
10
leenkx/blender/lnx/logicnode/world/LN_get_world_strength.py
Normal file
@ -0,0 +1,10 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class GetWorldStrengthNode(LnxLogicTreeNode):
|
||||
"""Gets the strength of the given World."""
|
||||
bl_idname = 'LNGetWorldStrengthNode'
|
||||
bl_label = 'Get World Strength'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_output('LnxFloatSocket', 'Strength')
|
@ -0,0 +1,38 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class SetHosekWilkiePropertiesNode(LnxLogicTreeNode):
|
||||
"""Sets the HosekWilkie properties."""
|
||||
bl_idname = 'LNSetHosekWilkiePropertiesNode'
|
||||
bl_label = 'Set HosekWilkie Properties'
|
||||
lnx_version = 1
|
||||
|
||||
def remove_extra_inputs(self, context):
|
||||
while len(self.inputs) > 1:
|
||||
self.inputs.remove(self.inputs[-1])
|
||||
if self.property0 == 'Turbidity/Ground Albedo':
|
||||
self.add_input('LnxFloatSocket', 'Turbidity')
|
||||
self.add_input('LnxFloatSocket', 'Ground Albedo')
|
||||
if self.property0 == 'Turbidity':
|
||||
self.add_input('LnxFloatSocket', 'Turbidity')
|
||||
if self.property0 == 'Ground Albedo':
|
||||
self.add_input('LnxFloatSocket', 'Ground Albedo')
|
||||
if self.property0 == 'Sun Direction':
|
||||
self.add_input('LnxVectorSocket', 'Sun Direction')
|
||||
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('Turbidity/Ground Albedo', 'Turbidity/Ground Albedo', 'Turbidity, Ground Albedo'),
|
||||
('Turbidity', 'Turbidity', 'Turbidity'),
|
||||
('Ground Albedo', 'Ground Albedo', 'Ground Albedo'),
|
||||
('Sun Direction', 'Sun Direction', 'Sun Direction')],
|
||||
name='', default='Turbidity/Ground Albedo', update=remove_extra_inputs)
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxFloatSocket', 'Turbidity')
|
||||
self.add_input('LnxFloatSocket', 'Ground_Albedo')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
@ -0,0 +1,43 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class SetNishitaPropertiesNode(LnxLogicTreeNode):
|
||||
"""Sets the Nishita properties"""
|
||||
bl_idname = 'LNSetNishitaPropertiesNode'
|
||||
bl_label = 'Set Nishita Properties'
|
||||
lnx_version = 1
|
||||
|
||||
def remove_extra_inputs(self, context):
|
||||
while len(self.inputs) > 1:
|
||||
self.inputs.remove(self.inputs[-1])
|
||||
if self.property0 == 'Density':
|
||||
self.add_input('LnxFloatSocket', 'Air')
|
||||
self.add_input('LnxFloatSocket', 'Dust')
|
||||
self.add_input('LnxFloatSocket', 'Ozone')
|
||||
if self.property0 == 'Air':
|
||||
self.add_input('LnxFloatSocket', 'Air')
|
||||
if self.property0 == 'Dust':
|
||||
self.add_input('LnxFloatSocket', 'Dust')
|
||||
if self.property0 == 'Ozone':
|
||||
self.add_input('LnxFloatSocket', 'Ozone')
|
||||
if self.property0 == 'Sun Direction':
|
||||
self.add_input('LnxVectorSocket', 'Sun Direction')
|
||||
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('Density', 'Density', 'Air, Dust, Ozone'),
|
||||
('Air', 'Air', 'Air'),
|
||||
('Dust', 'Dust', 'Dust'),
|
||||
('Ozone', 'Ozone', 'Ozone'),
|
||||
('Sun Direction', 'Sun Direction', 'Sun Direction')],
|
||||
name='', default='Density', update=remove_extra_inputs)
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxFloatSocket', 'Air')
|
||||
self.add_input('LnxFloatSocket', 'Dust')
|
||||
self.add_input('LnxFloatSocket', 'Ozone')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
13
leenkx/blender/lnx/logicnode/world/LN_set_world_strength.py
Normal file
13
leenkx/blender/lnx/logicnode/world/LN_set_world_strength.py
Normal file
@ -0,0 +1,13 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class SetWorldStrengthNode(LnxLogicTreeNode):
|
||||
"""Sets the strength of the given World."""
|
||||
bl_idname = 'LNSetWorldStrengthNode'
|
||||
bl_label = 'Set World Strength'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxFloatSocket', 'Strength')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
3
leenkx/blender/lnx/logicnode/world/__init__.py
Normal file
3
leenkx/blender/lnx/logicnode/world/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from lnx.logicnode.lnx_nodes import add_node_section
|
||||
|
||||
add_node_section(name='default', category='world')
|
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