diff --git a/Changes.md b/Changes.md index a86456826f4..ea1196b9cf5 100644 --- a/Changes.md +++ b/Changes.md @@ -25,6 +25,7 @@ API --- - CatalogueUI : Made ImageListing widget public so it can be customized using the API. +- MatchPatternPathFilterWidget : Made the entries in the property menu configurable. Build ----- diff --git a/python/GafferUI/MatchPatternPathFilterWidget.py b/python/GafferUI/MatchPatternPathFilterWidget.py index 248a3019739..fca21b358b4 100644 --- a/python/GafferUI/MatchPatternPathFilterWidget.py +++ b/python/GafferUI/MatchPatternPathFilterWidget.py @@ -134,12 +134,15 @@ def __updateFilterMatchPatterns( self ) : def __propertyMenuDefinition( self ) : - ## \todo Make this configurable propertiesAndLabels = ( ( "name", "Name" ), ( "fileSystem:owner", "Owner" ), ) + with IECore.IgnoredExceptions( KeyError ) : + propertyFilters = self.pathFilter().userData()["UI"]["propertyFilters"] + propertiesAndLabels = [ ( k, v.value ) for k, v in propertyFilters.items() ] + menuDefinition = IECore.MenuDefinition() for property, label in propertiesAndLabels : menuDefinition.append(