LNXSDK/leenkx/blender/lnx/logicnode/canvas/LN_get_canvas_location.py

18 lines
572 B
Python
Raw Permalink Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class CanvasGetLocationNode(LnxLogicTreeNode):
"""Returns the location of the given UI element (pixels)."""
bl_idname = 'LNCanvasGetLocationNode'
bl_label = 'Get Canvas Location'
lnx_section = 'elements_general'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxStringSocket', 'Element')
self.add_output('LnxNodeSocketAction', 'Out')
self.add_output('LnxIntSocket', 'X')
self.add_output('LnxIntSocket', 'Y')