Add attribute doc popup operator

This commit is contained in:
Gorgious
2022-01-17 08:44:51 +01:00
parent abe222d8f5
commit 4ad5f5cbf4
2 changed files with 20 additions and 0 deletions
@@ -87,6 +87,7 @@ classes = [
operator.AddIfcFile,
operator.RemoveIfcFile,
operator.ConfigureVisibility,
operator.BIM_OT_show_attribute_documentation,
operator.BIM_OT_open_webbrowser,
prop.StrProperty,
prop.ObjProperty,
+19
View File
@@ -373,6 +373,25 @@ class BIM_OT_open_webbrowser(bpy.types.Operator):
import webbrowser
webbrowser.open(self.url)
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):
bl_idname = "bim.select_external_material_dir"
bl_label = "Select Material File"