Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
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):
wm = context.window_manager
# see comment in __init__.py
pm_settings = wm.package_manager_settings
layout = self.layout
row = layout.row()
row.prop(pm_settings, "url")
row.operator(pkg_ops.PACKAGE_OT_fetch.bl_idname, text="Fetch")
# just a demonstration
row.label(text="Last response: %s" % pkg_ops.PACKAGE_OT_fetch.last_response)
def register():
bpy.utils.register_class(USERPREF_PT_packages)
def unregister():
bpy.utils.unregister_class(USERPREF_PT_packages)