Repe [T3DU] Update - 31f26d171bba0355ce2a77031e3aad4c64dbc7e9

This commit is contained in:
2026-09-04 10:46:13 -07:00
parent c915312901
commit 0460b9d587
482 changed files with 27797 additions and 3226 deletions

View File

@ -0,0 +1,60 @@
from lnx.logicnode.lnx_nodes import *
class SetScreenCamerasNode(LnxLogicTreeNode):
"""Renders the scene from the view of specified cameras.
@input Start: Evaluate the inputs and start drawing the camera render targets.
@input Stop: Stops the rendering and drawing of the camera render targets.
@input Camera: The camera from which to render.
@input X/Y: Position where the camera's render target is drawn, in pixels from the top left corner.
@input Width/Height: Size of the camera's render target in pixels.
@output On Start: Activated after the `Start` input has been activated.
@output On Stop: Activated after the `Stop` input has been activated.
"""
bl_idname = 'LNSetScreenCamerasNode'
bl_label = 'Set Screen Cameras'
lnx_version = 1
min_inputs = 7
num_choices: IntProperty(default=0, min=0)
def __init__(self, *args, **kwargs):
super(SetScreenCamerasNode, self).__init__(*args, **kwargs)
array_nodes[str(id(self))] = self
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'Start')
self.add_input('LnxNodeSocketAction', 'Stop')
self.add_sockets()
self.add_output('LnxNodeSocketAction', 'On Start')
self.add_output('LnxNodeSocketAction', 'On Stop')
def add_sockets(self):
self.num_choices += 1
self.add_input('LnxNodeSocketObject', 'Camera ' + str(self.num_choices))
self.add_input('LnxIntSocket', 'X')
self.add_input('LnxIntSocket', 'Y')
self.add_input('LnxIntSocket', 'Width')
self.add_input('LnxIntSocket', 'Height')
def remove_sockets(self):
if self.num_choices > 1:
for _ in range(5):
self.inputs.remove(self.inputs.values()[-1])
self.num_choices -= 1
def draw_buttons(self, context, layout):
row = layout.row(align=True)
op = row.operator('lnx.node_call_func', text='Add Camera', icon='PLUS', emboss=True)
op.node_index = str(id(self))
op.callback_name = 'add_sockets'
column = row.column(align=True)
op = column.operator('lnx.node_call_func', text='', icon='X', emboss=True)
op.node_index = str(id(self))
op.callback_name = 'remove_sockets'
if len(self.inputs) == self.min_inputs:
column.enabled = False