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 <dion@thinkmoult.com>
This commit is contained in:
Benoit DAMAY
2024-04-09 03:50:08 +02:00
committed by GitHub
parent ac23d08717
commit 7f9ce37a98
+8 -1
View File
@@ -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"