This repository has been archived on 2023-02-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-package-manager-addon/pkg_ops.py

22 lines
566 B
Python
Raw Normal View History

2017-06-22 01:43:08 -07:00
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)