[Bf-blender-cvs] [28b9dd7b1f0] master: Cleanup: Remove redundant checks in File Browser UI script

Julian Eisel noreply at git.blender.org
Tue Aug 3 12:26:10 CEST 2021


Commit: 28b9dd7b1f0a8d4ae56eafca188796936a6e3723
Author: Julian Eisel
Date:   Tue Aug 3 12:24:48 2021 +0200
Branches: master
https://developer.blender.org/rB28b9dd7b1f0a8d4ae56eafca188796936a6e3723

Cleanup: Remove redundant checks in File Browser UI script

Was already checking these preconditions in the poll method.

===================================================================

M	release/scripts/startup/bl_ui/space_filebrowser.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index 3189efeb939..9f70d26c71b 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -384,19 +384,17 @@ class FILEBROWSER_PT_advanced_filter(Panel):
         space = context.space_data
         params = space.params
 
-        if params and params.use_library_browsing:
-            layout.prop(params, "use_filter_blendid")
-            if params.use_filter_blendid:
-                layout.separator()
-                col = layout.column(align=True)
+        layout.prop(params, "use_filter_blendid")
+        if params.use_filter_blendid:
+            layout.separator()
+            col = layout.column(align=True)
 
-                if context.preferences.experimental.use_asset_browser:
-                    col.prop(params, "use_filter_asset_only")
+            col.prop(params, "use_filter_asset_only")
 
-                filter_id = params.filter_id
-                for identifier in dir(filter_id):
-                    if identifier.startswith("filter_"):
-                        col.prop(filter_id, identifier, toggle=True)
+            filter_id = params.filter_id
+            for identifier in dir(filter_id):
+                if identifier.startswith("filter_"):
+                    col.prop(filter_id, identifier, toggle=True)
 
 
 def is_option_region_visible(context, space):



More information about the Bf-blender-cvs mailing list