Add links to project homepage, docs, wiki, and community

This commit is contained in:
Dion Moult
2020-03-25 16:32:14 +11:00
parent 2678dc3a09
commit dd98ac3a89
3 changed files with 24 additions and 0 deletions
@@ -106,6 +106,7 @@ if bpy is not None:
operator.ExecuteIfcDiff,
operator.AssignContext,
operator.SetViewPreset1,
operator.OpenUpstream,
operator.Uninstall,
prop.BcfTopic,
prop.BcfTopicLabel,
@@ -1399,6 +1399,23 @@ class SetViewPreset1(bpy.types.Operator):
return {'FINISHED'}
class OpenUpstream(bpy.types.Operator):
bl_idname = 'bim.open_upstream'
bl_label = 'Open Upstream Reference'
page: bpy.props.StringProperty()
def execute(self, context):
if self.page == 'home':
webbrowser.open('https://blenderbim.org/')
elif self.page == 'docs':
webbrowser.open('https://blenderbim.org/docs/')
elif self.page == 'wiki':
webbrowser.open('https://wiki.osarch.org/')
elif self.page == 'community':
webbrowser.open('https://community.osarch.org/')
return {'FINISHED'}
class Uninstall(bpy.types.Operator):
bl_idname = 'bim.uninstall'
bl_label = 'Uninstall BlenderBIM'
+6
View File
@@ -794,4 +794,10 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
def draw(self, context):
layout = self.layout
row = layout.row()
row.operator('bim.open_upstream', text='Visit Homepage').page = 'home'
row.operator('bim.open_upstream', text='Visit Documentation').page = 'docs'
row = layout.row()
row.operator('bim.open_upstream', text='Visit Wiki').page = 'wiki'
row.operator('bim.open_upstream', text='Visit Community').page = 'community'
row = layout.row()
row.operator('bim.uninstall')