mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 06:18:09 +00:00
Add attribute doc popup 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_show_attribute_documentation,
|
||||||
operator.BIM_OT_open_webbrowser,
|
operator.BIM_OT_open_webbrowser,
|
||||||
prop.StrProperty,
|
prop.StrProperty,
|
||||||
prop.ObjProperty,
|
prop.ObjProperty,
|
||||||
|
|||||||
@@ -373,6 +373,25 @@ class BIM_OT_open_webbrowser(bpy.types.Operator):
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
webbrowser.open(self.url)
|
webbrowser.open(self.url)
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
|
class BIM_OT_show_attribute_documentation(bpy.types.Operator):
|
||||||
|
bl_idname = "bim.show_attribute_documentation"
|
||||||
|
bl_label = ""
|
||||||
|
|
||||||
|
path: bpy.props.StringProperty()
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
def invoke(self, context, event):
|
||||||
|
return context.window_manager.invoke_props_dialog(self)
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
doc = eval(self.path)
|
||||||
|
doc.draw(self.layout)
|
||||||
|
|
||||||
|
|
||||||
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