From 6a10cc71cb3a4218472d14b408f30acb6d3d0a38 Mon Sep 17 00:00:00 2001 From: MK Date: Sat, 11 Mar 2023 21:50:49 +0100 Subject: [PATCH 1/2] Added file directory change to on_value_change callback for the FilePath Property --- .../custom_widgets/properties_bin/custom_widget_file_paths.py | 1 + 1 file changed, 1 insertion(+) diff --git a/NodeGraphQt/custom_widgets/properties_bin/custom_widget_file_paths.py b/NodeGraphQt/custom_widgets/properties_bin/custom_widget_file_paths.py index 59eae72a..51b811ee 100644 --- a/NodeGraphQt/custom_widgets/properties_bin/custom_widget_file_paths.py +++ b/NodeGraphQt/custom_widgets/properties_bin/custom_widget_file_paths.py @@ -42,6 +42,7 @@ def _on_select_file(self): def _on_value_change(self, value=None): if value is None: value = self._ledit.text() + self.set_file_directory(value) self.value_changed.emit(self.toolTip(), value) def set_file_ext(self, ext=None): From aea40c1db47aa4d7f880b31f8fdaa56257a47a7a Mon Sep 17 00:00:00 2001 From: MK Date: Sat, 11 Mar 2023 21:55:08 +0100 Subject: [PATCH 2/2] Added file property example --- .../custom_widgets/properties_bin/node_property_widgets.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NodeGraphQt/custom_widgets/properties_bin/node_property_widgets.py b/NodeGraphQt/custom_widgets/properties_bin/node_property_widgets.py index 79f38a65..0bac3d5d 100644 --- a/NodeGraphQt/custom_widgets/properties_bin/node_property_widgets.py +++ b/NodeGraphQt/custom_widgets/properties_bin/node_property_widgets.py @@ -565,6 +565,11 @@ def __init__(self): value='text edit test', widget_type=NodePropWidgetEnum.QLABEL.value ) + self.create_property( + "file", + value="", + widget_type=NodePropWidgetEnum.FILE_OPEN.value + ) self.create_property( 'color_picker', value=(0, 0, 255),