mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 03:44:34 +00:00
Add links to project homepage, docs, wiki, and community
This commit is contained in:
@@ -106,6 +106,7 @@ if bpy is not None:
|
|||||||
operator.ExecuteIfcDiff,
|
operator.ExecuteIfcDiff,
|
||||||
operator.AssignContext,
|
operator.AssignContext,
|
||||||
operator.SetViewPreset1,
|
operator.SetViewPreset1,
|
||||||
|
operator.OpenUpstream,
|
||||||
operator.Uninstall,
|
operator.Uninstall,
|
||||||
prop.BcfTopic,
|
prop.BcfTopic,
|
||||||
prop.BcfTopicLabel,
|
prop.BcfTopicLabel,
|
||||||
|
|||||||
@@ -1399,6 +1399,23 @@ class SetViewPreset1(bpy.types.Operator):
|
|||||||
return {'FINISHED'}
|
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):
|
class Uninstall(bpy.types.Operator):
|
||||||
bl_idname = 'bim.uninstall'
|
bl_idname = 'bim.uninstall'
|
||||||
bl_label = 'Uninstall BlenderBIM'
|
bl_label = 'Uninstall BlenderBIM'
|
||||||
|
|||||||
@@ -794,4 +794,10 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
row = layout.row()
|
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')
|
row.operator('bim.uninstall')
|
||||||
|
|||||||
Reference in New Issue
Block a user