Fix error when removing preview collection
This commit is contained in:
		
							parent
							
								
									fcb26f6feb
								
							
						
					
					
						commit
						8bf47ba3de
					
				@ -50,7 +50,12 @@ def register():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def unregister():
 | 
					def unregister():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    try:
 | 
				
			||||||
        bpy.utils.previews.remove(ASSET_PREVIEWS)
 | 
					        bpy.utils.previews.remove(ASSET_PREVIEWS)
 | 
				
			||||||
 | 
					    except Exception as e:
 | 
				
			||||||
 | 
					        pass
 | 
				
			||||||
 | 
					        # print(f"!-- {e} --!")
 | 
				
			||||||
 | 
					        # print(f"No preview collection found. {ASSET_PREVIEWS} can't be remove.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if bpy.app.background:
 | 
					    if bpy.app.background:
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user