forked from LeenkxTeam/LNXSDK
t3du - Fix draw camera texture node
This commit is contained in:
@ -11,6 +11,7 @@ class DrawCameraTextureNode(LnxLogicTreeNode):
|
|||||||
@input Object: Object of which to choose the material in the `Material Slot` input.
|
@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
|
@input Material Slot: Index of the material slot of which the diffuse
|
||||||
texture is replaced with the camera's render target.
|
texture is replaced with the camera's render target.
|
||||||
|
@input Node: Node name of the Image Texture Node.
|
||||||
|
|
||||||
@output On Start: Activated after the `Start` input has been activated.
|
@output On Start: Activated after the `Start` input has been activated.
|
||||||
@output On Stop: Activated after the `Stop` input has been activated.
|
@output On Stop: Activated after the `Stop` input has been activated.
|
||||||
@ -18,7 +19,7 @@ class DrawCameraTextureNode(LnxLogicTreeNode):
|
|||||||
bl_idname = 'LNDrawCameraTextureNode'
|
bl_idname = 'LNDrawCameraTextureNode'
|
||||||
bl_label = 'Draw Camera to Texture'
|
bl_label = 'Draw Camera to Texture'
|
||||||
lnx_section = 'draw'
|
lnx_section = 'draw'
|
||||||
lnx_version = 1
|
lnx_version = 2
|
||||||
|
|
||||||
def lnx_init(self, context):
|
def lnx_init(self, context):
|
||||||
self.add_input('LnxNodeSocketAction', 'Start')
|
self.add_input('LnxNodeSocketAction', 'Start')
|
||||||
@ -26,6 +27,13 @@ class DrawCameraTextureNode(LnxLogicTreeNode):
|
|||||||
self.add_input('LnxNodeSocketObject', 'Camera')
|
self.add_input('LnxNodeSocketObject', 'Camera')
|
||||||
self.add_input('LnxNodeSocketObject', 'Object')
|
self.add_input('LnxNodeSocketObject', 'Object')
|
||||||
self.add_input('LnxIntSocket', 'Material Slot')
|
self.add_input('LnxIntSocket', 'Material Slot')
|
||||||
|
self.add_input('LnxStringSocket', 'Node')
|
||||||
|
|
||||||
self.add_output('LnxNodeSocketAction', 'On Start')
|
self.add_output('LnxNodeSocketAction', 'On Start')
|
||||||
self.add_output('LnxNodeSocketAction', 'On Stop')
|
self.add_output('LnxNodeSocketAction', 'On Stop')
|
||||||
|
|
||||||
|
def get_replacement_node(self, node_tree: bpy.types.NodeTree):
|
||||||
|
if self.lnx_version not in (0, 1):
|
||||||
|
raise LookupError()
|
||||||
|
|
||||||
|
return NodeReplacement.Identity(self)
|
Reference in New Issue
Block a user