diff options
author | Pablo Vazquez <pablo@blender.org> | 2022-07-24 06:31:12 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2022-07-24 06:31:12 +0300 |
commit | b00712001075abd383af7d88252ee199b5991231 (patch) | |
tree | 1b197701d9e6a8d63ec4c2311020dbf754963b2d | |
parent | 3c6a16fcbe5eeff525a83779a896b275bc410fbe (diff) |
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
-rw-r--r-- | amaranth/__init__.py | 2 | ||||
-rw-r--r-- | amaranth/scene/current_blend.py | 2 | ||||
-rw-r--r-- | amaranth/scene/goto_library.py | 4 |
3 files changed, 6 insertions, 2 deletions
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 |