[Bf-extensions-cvs] [b0071200] master: Amaranth: Fix File Browser features showing up in Asset Browser

Pablo Vazquez noreply at git.blender.org
Sun Jul 24 05:31:17 CEST 2022


Commit: b00712001075abd383af7d88252ee199b5991231
Author: Pablo Vazquez
Date:   Sun Jul 24 05:31:12 2022 +0200
Branches: master
https://developer.blender.org/rBAb00712001075abd383af7d88252ee199b5991231

Amaranth: Fix File Browser features showing up in Asset Browser

Both the "Libraries" panel and the "Current Blend's Folder" button are
meant for the File Browser editor, not the Asset Browser.

Fixes T94212

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

M	amaranth/__init__.py
M	amaranth/scene/current_blend.py
M	amaranth/scene/goto_library.py

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

diff --git a/amaranth/__init__.py b/amaranth/__init__.py
index b7e59e13..55871cc1 100644
--- a/amaranth/__init__.py
+++ b/amaranth/__init__.py
@@ -74,7 +74,7 @@ from amaranth.misc import (
 bl_info = {
     "name": "Amaranth Toolset",
     "author": "Pablo Vazquez, Bassam Kurdali, Sergey Sharybin, Lukas Tönne, Cesar Saez, CansecoGPC",
-    "version": (1, 0, 13),
+    "version": (1, 0, 14),
     "blender": (3, 2, 0),
     "location": "Everywhere!",
     "description": "A collection of tools and settings to improve productivity",
diff --git a/amaranth/scene/current_blend.py b/amaranth/scene/current_blend.py
index 7ab855c4..11ac3679 100644
--- a/amaranth/scene/current_blend.py
+++ b/amaranth/scene/current_blend.py
@@ -36,7 +36,7 @@ class FILEBROWSER_PT_amaranth(bpy.types.Panel):
 
     @classmethod
     def poll(cls, context):
-        return panel_poll_is_upper_region(context.region)
+        return context.area.ui_type == 'FILES' and panel_poll_is_upper_region(context.region)
 
     def draw(self, context):
       layout = self.layout
diff --git a/amaranth/scene/goto_library.py b/amaranth/scene/goto_library.py
index b1ea9e5b..d38a62d3 100644
--- a/amaranth/scene/goto_library.py
+++ b/amaranth/scene/goto_library.py
@@ -19,6 +19,10 @@ class AMTH_FILE_PT_libraries(bpy.types.Panel):
     bl_category = "Bookmarks"
     bl_label = "Libraries"
 
+    @classmethod
+    def poll(cls, context):
+        return context.area.ui_type == 'FILES'
+
     def draw(self, context):
         layout = self.layout



More information about the Bf-extensions-cvs mailing list