forked from LeenkxTeam/LNXSDK
		
	
		
			
	
	
		
			32 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			32 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
|  | from lnx.logicnode.lnx_nodes import * | ||
|  | 
 | ||
|  | 
 | ||
|  | class RotateRenderTargetNode(LnxLogicTreeNode): | ||
|  |     """Rotates the render target.
 | ||
|  | 
 | ||
|  |     @input In: Activate to rotate render target. The input must | ||
|  |         be (indirectly) called from an `On Render2D` node. | ||
|  |     @input Angle: Angle in radians to rotate. | ||
|  |     @input Center X: X coordinate to rotate around. | ||
|  |     @input Center Y: Y coordinate to rotate around. | ||
|  |     @input Revert After: Revert rotation after all the draw calls | ||
|  |         are activated from this node. | ||
|  | 
 | ||
|  |     @output Out: Activated after the render target is rotated. | ||
|  | 
 | ||
|  |     @see [`kha.graphics2.Graphics.rotate()`](http://kha.tech/api/kha/graphics2/Graphics.html#rotate). | ||
|  |     """
 | ||
|  |     bl_idname = 'LNRotateRenderTargetNode' | ||
|  |     bl_label = 'Rotate Render Target' | ||
|  |     lnx_section = 'draw' | ||
|  |     lnx_version = 1 | ||
|  | 
 | ||
|  |     def lnx_init(self, context): | ||
|  |         self.add_input('LnxNodeSocketAction', 'In') | ||
|  |         self.add_input('LnxFloatSocket', 'Angle') | ||
|  |         self.add_input('LnxFloatSocket', 'Center X') | ||
|  |         self.add_input('LnxFloatSocket', 'Center Y') | ||
|  |         self.add_input('LnxBoolSocket', 'Revert after', default_value=True) | ||
|  | 
 | ||
|  |         self.add_output('LnxNodeSocketAction', 'Out') |