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 5c82729445 - Show all commits

View File

@ -62,13 +62,15 @@ class BrushSetImporter(bpy.types.Operator):
bl_label = "Import BrushSet"
set_default_filters: bool = True
# creating a temporary filter to avoid overriding the users filters
temp_filters: bool = True
def draw(self, context):
if self.set_default_filters:
if self.temp_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
self.temp_filters = False
directory: StringProperty(
name="Directory",
description="Directory",