forked from LeenkxTeam/LNXSDK
35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
from lnx.logicnode.lnx_nodes import *
|
|
import lnx.node_utils
|
|
|
|
|
|
class BloomSetNode(LnxLogicTreeNode):
|
|
"""Set the bloom post-processing settings. This node
|
|
requires `Leenkx Render Path > Renderer > Realtime postprocess`
|
|
to be enabled in order to work.
|
|
"""
|
|
bl_idname = 'LNBloomSetNode'
|
|
bl_label = 'Set Bloom Settings'
|
|
lnx_version = 2
|
|
|
|
def lnx_init(self, context):
|
|
self.add_input('LnxNodeSocketAction', 'In')
|
|
self.add_input('LnxFloatSocket', 'Threshold', default_value=0.8)
|
|
self.add_input('LnxFloatSocket', 'Knee', default_value=0.5)
|
|
self.add_input('LnxFloatSocket', 'Strength', default_value=0.05)
|
|
self.add_input('LnxFloatSocket', 'Radius', default_value=6.5)
|
|
|
|
self.add_output('LnxNodeSocketAction', 'Out')
|
|
|
|
def get_replacement_node(self, node_tree: bpy.types.NodeTree):
|
|
return NodeReplacement(
|
|
'LNBloomSetNode', 1,
|
|
'LNBloomSetNode', 2,
|
|
{0: 0, 1: 1, 2: 3, 3: 4}, {0: 0},
|
|
None,
|
|
{
|
|
1: lnx.node_utils.get_socket_default(self.inputs[1]),
|
|
3: lnx.node_utils.get_socket_default(self.inputs[2]),
|
|
4: lnx.node_utils.get_socket_default(self.inputs[3]),
|
|
}
|
|
)
|