18 lines
		
	
	
		
			720 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			720 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from lnx.logicnode.lnx_nodes import *
 | |
| 
 | |
| class SpawnObjectNode(LnxLogicTreeNode):
 | |
|     """Spawns the given object if present in the current active scene. The spawned object has the same name of its instance, but they are treated as different objects."""
 | |
| 
 | |
|     bl_idname = 'LNSpawnObjectNode'
 | |
|     bl_label = 'Spawn Object'
 | |
|     lnx_version = 1
 | |
| 
 | |
|     def lnx_init(self, context):
 | |
|         self.add_input('LnxNodeSocketAction', 'In')
 | |
|         self.add_input('LnxNodeSocketObject', 'Object')
 | |
|         self.add_input('LnxDynamicSocket', 'Transform')
 | |
|         self.add_input('LnxBoolSocket', 'Children', default_value=True)
 | |
| 
 | |
|         self.add_output('LnxNodeSocketAction', 'Out')
 | |
|         self.add_output('LnxNodeSocketObject', 'Object')
 |