mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 08:32:48 +00:00
Add webbrowser open operator
This commit is contained in:
@@ -87,6 +87,7 @@ classes = [
|
|||||||
operator.AddIfcFile,
|
operator.AddIfcFile,
|
||||||
operator.RemoveIfcFile,
|
operator.RemoveIfcFile,
|
||||||
operator.ConfigureVisibility,
|
operator.ConfigureVisibility,
|
||||||
|
operator.BIM_OT_open_webbrowser,
|
||||||
prop.StrProperty,
|
prop.StrProperty,
|
||||||
prop.ObjProperty,
|
prop.ObjProperty,
|
||||||
prop.AttributeDocumentation,
|
prop.AttributeDocumentation,
|
||||||
|
|||||||
@@ -363,6 +363,16 @@ class RemoveIfcFile(bpy.types.Operator):
|
|||||||
return {"FINISHED"}
|
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):
|
class SelectExternalMaterialDir(bpy.types.Operator):
|
||||||
bl_idname = "bim.select_external_material_dir"
|
bl_idname = "bim.select_external_material_dir"
|
||||||
bl_label = "Select Material File"
|
bl_label = "Select Material File"
|
||||||
|
|||||||
Reference in New Issue
Block a user