32 lines
		
	
	
		
			924 B
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			32 lines
		
	
	
		
			924 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| 
								 | 
							
								from lnx.logicnode.lnx_nodes import *
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class GetBlobUrlNode(LnxLogicTreeNode):
							 | 
						||
| 
								 | 
							
								    """Get Blob Url"""
							 | 
						||
| 
								 | 
							
								    bl_idname = 'LNGetBlobUrlNode'
							 | 
						||
| 
								 | 
							
								    bl_label = 'Get Blob Url'
							 | 
						||
| 
								 | 
							
								    bl_description = 'Get Blob Url'
							 | 
						||
| 
								 | 
							
								    lnx_category = 'HTML'
							 | 
						||
| 
								 | 
							
								    lnx_version = 1
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    property0: HaxeEnumProperty(
							 | 
						||
| 
								 | 
							
								        'property0',
							 | 
						||
| 
								 | 
							
								        items = [('file', 'File', 'Get Blob URL From File'),
							 | 
						||
| 
								 | 
							
								                 ('object', 'Object', 'Get Blob URL From Object'),
							 | 
						||
| 
								 | 
							
								                 ('video', 'Video', 'Get Blob URL From Video'),
							 | 
						||
| 
								 | 
							
								                 ('canvas', 'Canvas', 'Get Blob URL From Canvas')],
							 | 
						||
| 
								 | 
							
								        name='', default='file')
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    def lnx_init(self, context):
							 | 
						||
| 
								 | 
							
								        self.add_input('LnxDynamicSocket', 'Data')
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        self.add_output('LnxStringSocket', 'Url')
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								    def draw_buttons(self, context, layout):
							 | 
						||
| 
								 | 
							
								        layout.prop(self, 'property0')
							 | 
						||
| 
								 | 
							
										
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								def register():
							 | 
						||
| 
								 | 
							
								    add_category('HTML', icon='SEQ_STRIP_META')
							 | 
						||
| 
								 | 
							
								    GetBlobUrlNode.on_register()
							 |