forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
31
leenkx/blender/lnx/logicnode/draw/LN_draw_camera_texture.py
Normal file
31
leenkx/blender/lnx/logicnode/draw/LN_draw_camera_texture.py
Normal file
@ -0,0 +1,31 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
|
||||
class DrawCameraTextureNode(LnxLogicTreeNode):
|
||||
"""Renders the scene from the view of a specified camera and draws
|
||||
its render target to the diffuse texture of the given material.
|
||||
|
||||
@input Start: Evaluate the inputs and start drawing the camera render target.
|
||||
@input Stop: Stops the rendering and drawing of the camera render target.
|
||||
@input Camera: The camera from which to render.
|
||||
@input Object: Object of which to choose the material in the `Material Slot` input.
|
||||
@input Material Slot: Index of the material slot of which the diffuse
|
||||
texture is replaced with the camera's render target.
|
||||
|
||||
@output On Start: Activated after the `Start` input has been activated.
|
||||
@output On Stop: Activated after the `Stop` input has been activated.
|
||||
"""
|
||||
bl_idname = 'LNDrawCameraTextureNode'
|
||||
bl_label = 'Draw Camera to Texture'
|
||||
lnx_section = 'draw'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'Start')
|
||||
self.add_input('LnxNodeSocketAction', 'Stop')
|
||||
self.add_input('LnxNodeSocketObject', 'Camera')
|
||||
self.add_input('LnxNodeSocketObject', 'Object')
|
||||
self.add_input('LnxIntSocket', 'Material Slot')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'On Start')
|
||||
self.add_output('LnxNodeSocketAction', 'On Stop')
|
Reference in New Issue
Block a user