Skip to content

Commit

Permalink
feat: add a message/button to the shortcut menu & a link to the chang…
Browse files Browse the repository at this point in the history
…elog in the UI panel when an update is available
  • Loading branch information
tristan-hm committed Apr 4, 2022
1 parent 400371c commit bd754cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions interface/main_menu.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import bpy
from .. import bl_info
from .. import lib


keys = []
Expand All @@ -12,6 +13,11 @@ class ND_MT_main_menu(bpy.types.Menu):

def draw(self, context):
layout = self.layout

if lib.preferences.get_preferences().update_available:
layout.operator("wm.url_open", text="Update Available!", icon='PACKAGE').url = "https://hugemenace.gumroad.com/l/nd-blender-addon"
layout.separator()

layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("nd.view_align", icon='ORIENTATION_VIEW')
layout.operator("nd.geo_lift", icon='FACESEL')
Expand Down
3 changes: 3 additions & 0 deletions interface/main_ui_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def draw(self, context):
row.scale_y = 1.5
row.alert = True
row.operator("wm.url_open", text="Update Available!", icon='PACKAGE').url = "https://hugemenace.gumroad.com/l/nd-blender-addon"
row = column.row(align=True)
row.scale_y = 1.2
row.operator("wm.url_open", text="View Changelog", icon='DOCUMENTS').url = "https://docs.nd.hugemenace.co/#/getting-started/changelog"

box = layout.box()
box.label(text="Documentation", icon='INFO')
Expand Down

0 comments on commit bd754cb

Please sign in to comment.