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_ui.py
gandalf3 9dfd58671e 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
2017-06-29 18:16:44 -07:00

27 lines
733 B
Python

import bpy
from . import pkg_ops
class USERPREF_PT_packages(bpy.types.Panel):
bl_label = "Package Management"
bl_space_type = 'USER_PREFERENCES'
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
userpref = context.user_preferences
return (userpref.active_section == 'PACKAGES')
def draw(self, context):
layout = self.layout
row = layout.row()
row.prop(context.window_manager.package_manager_settings, "url")
row.operator(pkg_ops.PACKAGE_OT_fetch.bl_idname, text="Fetch")
def register():
bpy.utils.register_class(USERPREF_PT_packages)
def unregister():
bpy.utils.unregister_class(USERPREF_PT_packages)