From 7f9ce37a98b35fa9c941d9428edbcf9523c7d1d2 Mon Sep 17 00:00:00 2001 From: Benoit DAMAY Date: Tue, 9 Apr 2024 03:50:08 +0200 Subject: [PATCH] Inline help feature (#4409) * Help operator in grouping and filtering Panel Opens up a webbrowser on click * Help button on the right of filtering panel header * replacing os.rename() by shutil.move in ifcpatch * removing debug print from previous commit * Removing extra operator Using bim.open_uri to open help page * Update docs url * Clean up whitespace --------- Co-authored-by: Dion Moult --- src/blenderbim/blenderbim/bim/ui.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/bim/ui.py b/src/blenderbim/blenderbim/bim/ui.py index 05df26cad3..bed2349191 100644 --- a/src/blenderbim/blenderbim/bim/ui.py +++ b/src/blenderbim/blenderbim/bim/ui.py @@ -466,7 +466,7 @@ class BIM_PT_tab_grouping_and_filtering(Panel): bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_context = "scene" - bl_options = {"DEFAULT_CLOSED"} + bl_options = {"DEFAULT_CLOSED","HEADER_LAYOUT_EXPAND"} @classmethod def poll(cls, context): @@ -475,6 +475,13 @@ class BIM_PT_tab_grouping_and_filtering(Panel): def draw(self, context): pass + def draw_header(self, context): + # Draws help button on the right + row = self.layout.row(align=True) + row.label(text="") # empty text occupies the left of the row + row.operator("bim.open_uri", text="", icon="HELP").uri = \ + "https://docs.ifcopenshell.org/ifcopenshell-python/selector_syntax.html" + class BIM_PT_tab_geometry(Panel): bl_label = "Geometry"