From 5676a9e2c5f0dfd2a11d412565cc36d4196be319 Mon Sep 17 00:00:00 2001 From: Ellwood Zwovic Date: Tue, 18 Jul 2017 18:36:58 -0700 Subject: [PATCH] Don't show install button if there's no URL to install from --- bpkg/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bpkg/__init__.py b/bpkg/__init__.py index 1c5494d..52bd46d 100644 --- a/bpkg/__init__.py +++ b/bpkg/__init__.py @@ -491,8 +491,9 @@ class USERPREF_PT_packages(bpy.types.Panel): lr2.label(text=blinfo.get('description', "")) lr2.enabled = False #Give name more visual weight - right.operator(BPKG_OT_install.bl_idname, - text="Install").package_url=pkg.get('url', "") + if pkg.get('url'): + right.operator(BPKG_OT_install.bl_idname, + text="Install").package_url=pkg.get('url') def expanded(): row1 = leftcol.row()