Asynchronous IPC: Initial implementation

This commit adds a mixin which sets up a modal operator which:
* Starts a subprocess
* Polls for messages from that subprocesses
This commit is contained in:
gandalf3
2017-06-29 17:46:08 -07:00
parent 2268925733
commit 9dfd58671e
4 changed files with 86 additions and 17 deletions

View File

@@ -9,11 +9,18 @@ import bpy
class PackageSettings(bpy.types.PropertyGroup):
url = bpy.props.StringProperty(name="URL")
# class PackageManager:
# # For some reason accessing 'settings' PointerProperty via wm.package_manager.settings gives a value error
# # but accessing it when not stored in this class (wm.package_manager_settings) is fine?
# # settings = bpy.props.PointerProperty(type=PackageSettings)
# pipes = []
def register():
from . import (pkg_ops, pkg_ui)
bpy.utils.register_class(PackageSettings)
bpy.types.WindowManager.PackageManagerSettings = bpy.props.PointerProperty(type=PackageSettings)
# bpy.types.WindowManager.package_manager = PackageManager()
bpy.types.WindowManager.package_manager_settings = bpy.props.PointerProperty(type=PackageSettings)
pkg_ops.register()
pkg_ui.register()
@@ -22,5 +29,6 @@ def unregister():
pkg_ops.unregister()
pkg_ui.unregister();
del bpy.types.WindowManager.PackageManagerSettings
bpy.utils.unregister_class(PackageSettings)
del bpy.types.WindowManager.package_manager