28 lines
		
	
	
		
			900 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			900 B
		
	
	
	
		
			Python
		
	
	
	
	
	
import bpy
 | 
						|
from bpy.props import *
 | 
						|
from bpy.types import Node, NodeSocket
 | 
						|
from lnx.logicnode.lnx_nodes import *
 | 
						|
 | 
						|
 | 
						|
@deprecated('Get Cursor State')
 | 
						|
class GetMouseLockNode(LnxLogicTreeNode):
 | 
						|
    """Deprecated. It is recommended to use the 'Get Cursor State' node instead."""
 | 
						|
    bl_idname = 'LNGetMouseLockNode'
 | 
						|
    bl_label = 'Get Mouse Lock'
 | 
						|
    bl_description = "Please use the \"Get Cursor State\" node instead"
 | 
						|
    lnx_version = 2
 | 
						|
    lnx_category = 'Input'
 | 
						|
    lnx_section = 'mouse'
 | 
						|
 | 
						|
    def lnx_init(self, context):
 | 
						|
        self.outputs.new('LnxBoolSocket', 'Is Locked')
 | 
						|
 | 
						|
    def get_replacement_node(self, node_tree: bpy.types.NodeTree):
 | 
						|
        if self.lnx_version not in (0, 1):
 | 
						|
            raise LookupError()
 | 
						|
 | 
						|
        return NodeReplacement(
 | 
						|
            'LNGetMouseLockNode', self.lnx_version, 'LNGetCursorStateNode', 1,
 | 
						|
            in_socket_mapping={}, out_socket_mapping={0: 2}
 | 
						|
        )
 |