initial (2017) commit
This commit is contained in:
21
pkg_ops.py
Normal file
21
pkg_ops.py
Normal file
@@ -0,0 +1,21 @@
|
||||
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)
|
||||
|
Reference in New Issue
Block a user