Update Files
This commit is contained in:
20
leenkx/blender/lnx/logicnode/math/LN_combine_hsv.py
Normal file
20
leenkx/blender/lnx/logicnode/math/LN_combine_hsv.py
Normal file
@ -0,0 +1,20 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
|
||||
class CombineColorNode(LnxLogicTreeNode):
|
||||
"""Combines the given HSVA() components to a color value.
|
||||
If any input is `null`, the respective channel of the output color is set to `0.0`.
|
||||
formula from // https://stackoverflow.com/a/17243070
|
||||
"""
|
||||
bl_idname = 'LNCombineColorHSVNode'
|
||||
bl_label = 'Combine HSVA'
|
||||
lnx_section = 'color'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxFloatSocket', 'H', default_value=0.0)
|
||||
self.add_input('LnxFloatSocket', 'S', default_value=0.0)
|
||||
self.add_input('LnxFloatSocket', 'V', default_value=0.0)
|
||||
self.add_input('LnxFloatSocket', 'A', default_value=1.0)
|
||||
|
||||
self.add_output('LnxColorSocket', 'Color', default_value=[1.0, 1.0, 1.0, 1.0])
|
Reference in New Issue
Block a user