mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 08:52:43 +00:00
bim.open_uri - display url in description
This commit is contained in:
@@ -82,9 +82,12 @@ class SwitchTab(bpy.types.Operator):
|
|||||||
class OpenUri(bpy.types.Operator):
|
class OpenUri(bpy.types.Operator):
|
||||||
bl_idname = "bim.open_uri"
|
bl_idname = "bim.open_uri"
|
||||||
bl_label = "Open URI"
|
bl_label = "Open URI"
|
||||||
bl_description = "Open the URL in your Web Browser"
|
|
||||||
uri: bpy.props.StringProperty()
|
uri: bpy.props.StringProperty()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def description(cls, context, properties):
|
||||||
|
return f"Open the URL in your Web Browser: '{properties.uri}'."
|
||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
webbrowser.open(self.uri)
|
webbrowser.open(self.uri)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|||||||
Reference in New Issue
Block a user