Update Files
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class CreateRenderTargetNode(LnxLogicTreeNode):
|
||||
"""Create a render target and set it as parameter to the specified object material.
|
||||
This image can be then drawn to using `Draw To Material Image Node`. In most cases, the render target needs to be created just once.
|
||||
|
||||
@seeNode Get Scene Root
|
||||
|
||||
@seeNode Draw To Material Image Node
|
||||
|
||||
@input Object: Object whose material parameter should change. Use `Get Scene Root` node to set parameter globally.
|
||||
|
||||
@input Per Object:
|
||||
- `Enabled`: Set material parameter specific to this object. Global parameter will be ignored.
|
||||
- `Disabled`: Set parameter globally, including this object.
|
||||
|
||||
@input Material: Material whose parameter to be set.
|
||||
|
||||
@input Node: Name of the parameter.
|
||||
|
||||
@input Width: Width of the render target image created.
|
||||
|
||||
@input Height: Height of the render target image created.
|
||||
"""
|
||||
|
||||
bl_idname = 'LNCreateRenderTargetNode'
|
||||
bl_label = 'Create Render Target'
|
||||
lnx_section = 'draw'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Object')
|
||||
self.add_input('LnxBoolSocket', 'Per Object')
|
||||
self.add_input('LnxDynamicSocket', 'Material')
|
||||
self.add_input('LnxStringSocket', 'Node')
|
||||
self.add_input('LnxIntSocket', 'Width')
|
||||
self.add_input('LnxIntSocket', 'Height')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
@ -0,0 +1,20 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class PauseActiveCameraRenderNode(LnxLogicTreeNode):
|
||||
"""Pause only the rendering of active camera. The logic behaviour remains active.
|
||||
|
||||
@input In: Activate to set property.
|
||||
@input Pause: Pause the rendering when enabled.
|
||||
|
||||
@output Out: Activated after property is set.
|
||||
"""
|
||||
bl_idname = 'LNPauseActiveCameraRenderNode'
|
||||
bl_label = 'Pause Active Camera Render'
|
||||
lnx_section = 'draw'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxBoolSocket', 'Pause', default_value=False)
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
@ -0,0 +1,31 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
|
||||
class RotateRenderTargetNode(LnxLogicTreeNode):
|
||||
"""Rotates the render target.
|
||||
|
||||
@input In: Activate to rotate render target. The input must
|
||||
be (indirectly) called from an `On Render2D` node.
|
||||
@input Angle: Angle in radians to rotate.
|
||||
@input Center X: X coordinate to rotate around.
|
||||
@input Center Y: Y coordinate to rotate around.
|
||||
@input Revert After: Revert rotation after all the draw calls
|
||||
are activated from this node.
|
||||
|
||||
@output Out: Activated after the render target is rotated.
|
||||
|
||||
@see [`kha.graphics2.Graphics.rotate()`](http://kha.tech/api/kha/graphics2/Graphics.html#rotate).
|
||||
"""
|
||||
bl_idname = 'LNRotateRenderTargetNode'
|
||||
bl_label = 'Rotate Render Target'
|
||||
lnx_section = 'draw'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxFloatSocket', 'Angle')
|
||||
self.add_input('LnxFloatSocket', 'Center X')
|
||||
self.add_input('LnxFloatSocket', 'Center Y')
|
||||
self.add_input('LnxBoolSocket', 'Revert after', default_value=True)
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
@ -0,0 +1,24 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class RpMSAANode(LnxLogicTreeNode):
|
||||
"""Sets the MSAA quality."""
|
||||
bl_idname = 'LNRpMSAANode'
|
||||
bl_label = 'Set MSAA Quality'
|
||||
lnx_version = 1
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('1', '1', '1'),
|
||||
('2', '2', '2'),
|
||||
('4', '4', '4'),
|
||||
('8', '8', '8'),
|
||||
('16', '16', '16')
|
||||
],
|
||||
name='', default='1')
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
@ -0,0 +1,25 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class RpConfigNode(LnxLogicTreeNode):
|
||||
"""Sets the post process quality."""
|
||||
bl_idname = 'LNRpConfigNode'
|
||||
bl_label = 'Set Post Process Quality'
|
||||
lnx_version = 1
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('SSGI', 'SSGI', 'SSGI'),
|
||||
('SSR', 'SSR', 'SSR'),
|
||||
('Bloom', 'Bloom', 'Bloom'),
|
||||
('GI', 'GI', 'GI'),
|
||||
('Motion Blur', 'Motion Blur', 'Motion Blur')
|
||||
],
|
||||
name='', default='SSGI')
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxBoolSocket', 'Enable')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
@ -0,0 +1,46 @@
|
||||
from bpy.props import EnumProperty
|
||||
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
|
||||
class SetShaderUniformNode(LnxLogicTreeNode):
|
||||
"""Set a global shader uniform value."""
|
||||
bl_idname = 'LNSetShaderUniformNode'
|
||||
bl_label = 'Set Shader Uniform'
|
||||
bl_width_default = 200
|
||||
lnx_section = 'shaders'
|
||||
lnx_version = 1
|
||||
|
||||
def on_update_uniform_type(self, _):
|
||||
self.inputs.remove(self.inputs[2])
|
||||
|
||||
if self.property0 == 'int':
|
||||
self.add_input('LnxIntSocket', 'Int')
|
||||
elif self.property0 == 'float':
|
||||
self.add_input('LnxFloatSocket', 'Float')
|
||||
elif self.property0 in ('vec2', 'vec3', 'vec4'):
|
||||
self.add_input('LnxVectorSocket', 'Vector')
|
||||
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('int', 'int', 'int'),
|
||||
('float', 'float', 'float'),
|
||||
('vec2', 'vec2', 'vec2'),
|
||||
('vec3', 'vec3', 'vec3'),
|
||||
('vec4', 'vec4', 'vec4')],
|
||||
name='Uniform Type',
|
||||
default='float',
|
||||
description="The type of the uniform",
|
||||
update=on_update_uniform_type)
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxStringSocket', 'Uniform Name')
|
||||
self.add_input('LnxFloatSocket', 'Float')
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
split = layout.split(factor=0.5, align=True)
|
||||
|
||||
split.label(text="Type")
|
||||
split.prop(self, "property0", text="")
|
@ -0,0 +1,22 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class RpShadowQualityNode(LnxLogicTreeNode):
|
||||
"""Sets the shadows quality."""
|
||||
bl_idname = 'LNRpShadowQualityNode'
|
||||
bl_label = 'Set Shadows Quality'
|
||||
lnx_version = 1
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('High', 'High', 'High'),
|
||||
('Medium', 'Medium', 'Medium'),
|
||||
('Low', 'Low', 'Low')
|
||||
],
|
||||
name='', default='Medium')
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
@ -0,0 +1,23 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class RpSuperSampleNode(LnxLogicTreeNode):
|
||||
"""Sets the supersampling quality."""
|
||||
bl_idname = 'LNRpSuperSampleNode'
|
||||
bl_label = 'Set SSAA Quality'
|
||||
lnx_version = 1
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('1', '1', '1'),
|
||||
('1.5', '1.5', '1.5'),
|
||||
('2', '2', '2'),
|
||||
('4', '4', '4')
|
||||
],
|
||||
name='', default='1')
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
0
leenkx/blender/lnx/logicnode/renderpath/__init__.py
Normal file
0
leenkx/blender/lnx/logicnode/renderpath/__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.
Reference in New Issue
Block a user