22 lines
566 B
Python
22 lines
566 B
Python
import bpy
|
|
from multiprocessing import Process
|
|
from . import blenderpack
|
|
|
|
class PACKAGE_OT_fetch_lists(bpy.types.Operator):
|
|
bl_idname = "package.fetch_lists"
|
|
bl_label = "Update package list(s)"
|
|
|
|
def execute(self, context):
|
|
settings = context.window_manager.PackageManagerSettings
|
|
proc = Process(target=lambda: blenderpack.fetch(settings.url))
|
|
proc.start()
|
|
return {'FINISHED'}
|
|
|
|
|
|
def register():
|
|
bpy.utils.register_class(PACKAGE_OT_fetch_lists)
|
|
|
|
def unregister():
|
|
bpy.utils.unregister_class(PACKAGE_OT_fetch_lists)
|
|
|