Add support for BCF topic BIM snippets

This commit is contained in:
Dion Moult
2020-03-25 16:20:24 +11:00
parent f2e203d699
commit 2678dc3a09
4 changed files with 65 additions and 2 deletions
@@ -457,6 +457,33 @@ class OpenBcfReferenceLink(bpy.types.Operator):
return {'FINISHED'}
class OpenBcfBimSnippetSchema(bpy.types.Operator):
bl_idname = 'bim.open_bcf_bim_snippet_schema'
bl_label = 'Open BCF BIM Snippet Schema'
def execute(self, context):
webbrowser.open(bpy.context.scene.BCFProperties.topic_snippet_schema)
return {'FINISHED'}
class OpenBcfBimSnippetReference(bpy.types.Operator):
bl_idname = 'bim.open_bcf_bim_snippet_reference'
bl_label = 'Open BCF BIM Snippet Reference'
topic_guid: bpy.props.StringProperty()
def execute(self, context):
import bcfplugin
if bpy.context.scene.BCFProperties.topic_snippet_is_external:
webbrowser.open(bpy.context.scene.BCFProperties.topic_snippet_reference)
return {'FINISHED'}
webbrowser.open('file:///' + os.path.join(
bcfplugin.util.getBcfDir(),
self.topic_guid,
bpy.context.scene.BCFProperties.topic_snippet_reference
))
return {'FINISHED'}
class SelectAudited(bpy.types.Operator):
bl_idname = 'bim.select_audited'
bl_label = 'Select Audited'