add filtering to window manager to only show folders and images since this is what the user wants to see when using this addon #104845

Merged
Germano Cavalcante merged 3 commits from DanielGrauer/blender-addons:brushset-import-filter-files into main 2023-09-25 22:06:29 +02:00
Showing only changes of commit f3bd9e4d58 - Show all commits

View File

@ -61,6 +61,14 @@ class BrushSetImporter(bpy.types.Operator):
bl_idname = "import_image.brushset" bl_idname = "import_image.brushset"
bl_label = "Import BrushSet" bl_label = "Import BrushSet"
set_default_filters: bool = True
def draw(self, context):
if self.set_default_filters:
context.space_data.params.use_filter = True
context.space_data.params.use_filter_folder = True
context.space_data.params.use_filter_image = True
self.set_default_filters = False
directory: StringProperty( directory: StringProperty(
name="Directory", name="Directory",
description="Directory", description="Directory",