initial (2017) commit
This commit is contained in:
26
pkg_ui.py
Normal file
26
pkg_ui.py
Normal file
@@ -0,0 +1,26 @@
|
||||
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.PackageManagerSettings, "url")
|
||||
row.operator(pkg_ops.PACKAGE_OT_fetch_lists.bl_idname, text="Fetch")
|
||||
|
||||
def register():
|
||||
bpy.utils.register_class(USERPREF_PT_packages)
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(USERPREF_PT_packages)
|
Reference in New Issue
Block a user