forked from LeenkxTeam/LNXSDK
t3du - New Image nodes: Draw Sub Image and Write Image
This commit is contained in:
parent
8fc14ac793
commit
a70d0bd601
34
leenkx/blender/lnx/logicnode/native/LN_write_image.py
Normal file
34
leenkx/blender/lnx/logicnode/native/LN_write_image.py
Normal file
@ -0,0 +1,34 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
|
||||
class WriteImageNode(LnxLogicTreeNode):
|
||||
"""Writes the given image to the given file. If the image
|
||||
already exists, the existing content of the image is overwritten.
|
||||
Aspect ratio must match display resolution ratio.
|
||||
@input Image File: the name of the image, relative to `Krom.getFilesLocation()`
|
||||
@input Camera: the render target image of the camera to write to the image file.
|
||||
@input Width: width of the image file.
|
||||
@input Height: heigth of the image file.
|
||||
@input sX: sub position of first x pixel of the sub image (0 for start).
|
||||
@input sY: sub position of first y pixel of the sub image (0 for start).
|
||||
@input sWidth: width of the sub image.
|
||||
@input sHeight: height of the sub image.
|
||||
@seeNode Read File
|
||||
"""
|
||||
bl_idname = 'LNWriteImageNode'
|
||||
bl_label = 'Write Image'
|
||||
lnx_section = 'file'
|
||||
lnx_version = 1
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxStringSocket', 'Image File')
|
||||
self.add_input('LnxNodeSocketObject', 'Camera')
|
||||
self.add_input('LnxIntSocket', 'Width')
|
||||
self.add_input('LnxIntSocket', 'Height')
|
||||
self.add_input('LnxIntSocket', 'sX')
|
||||
self.add_input('LnxIntSocket', 'sY')
|
||||
self.add_input('LnxIntSocket', 'sWidth')
|
||||
self.add_input('LnxIntSocket', 'sHeight')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
Loading…
x
Reference in New Issue
Block a user