Add webbrowser open operator

This commit is contained in:
Gorgious
2022-01-17 08:44:09 +01:00
parent 14aa25f84f
commit 8f0ab8e7a0
2 changed files with 11 additions and 0 deletions
@@ -87,6 +87,7 @@ classes = [
operator.AddIfcFile,
operator.RemoveIfcFile,
operator.ConfigureVisibility,
operator.BIM_OT_open_webbrowser,
prop.StrProperty,
prop.ObjProperty,
prop.AttributeDocumentation,
+10
View File
@@ -363,6 +363,16 @@ class RemoveIfcFile(bpy.types.Operator):
return {"FINISHED"}
class BIM_OT_open_webbrowser(bpy.types.Operator):
bl_idname = "bim.open_webbrowser"
bl_label = ""
url: bpy.props.StringProperty()
def execute(self, context):
import webbrowser
webbrowser.open(self.url)
return {'FINISHED'}
class SelectExternalMaterialDir(bpy.types.Operator):
bl_idname = "bim.select_external_material_dir"
bl_label = "Select Material File"