Search for add-ons does not include category #83747

Closed
opened 2020-12-14 04:09:24 +01:00 by Jeric Chard · 11 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.38

Blender Version
Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: 0f45cab862
Worked: (newest version of Blender that worked as expected)

Short description of error
Searches that should be finding addons are not

Exact steps for others to reproduce the error
If I use the string "IMP" I get several Import plugins, but not the OBJ importer.

OTOH, if I input "OBJ", the OBJ import is displayed/found, and has the string "import" in its name.

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.38 **Blender Version** Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: `0f45cab862` Worked: (newest version of Blender that worked as expected) **Short description of error** Searches that should be finding addons are not **Exact steps for others to reproduce the error** If I use the string "IMP" I get several Import plugins, but not the OBJ importer. OTOH, if I input "OBJ", the OBJ import is displayed/found, and has the string "import" in its name.
Author

Added subscriber: @jeric_synergy

Added subscriber: @jeric_synergy

Added subscriber: @VincentBlankfield

Added subscriber: @VincentBlankfield

That's because current search looks into the addon name or author only. In case of the OBJ importer the name is "Wavefront OBJ format" and the "import" word is present in it's category: "Import-Export".

IMHO the search should look for the category too. Having excessive search result is less confusing then not having enough. And the user may always specify more strict search term. Like in this example, the user may quickly searh for "import" and have an impression that it's all that have anything to do with import.

The change to add categories to the search is simple:

lines=5
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 88b3ad5e056..2f865e24cab 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1848,7 +1848,11 @@ class USERPREF_PT_addons(AddOnPanel, Panel):
                 is_visible = is_visible and is_enabled
 
             if is_visible:
-                if search and search not in info["name"].lower():
+                if (
+                    search and
+                    search not in info["name"].lower() and
+                    search not in info["category"].lower()
+                ):
                     if info["author"]:
                         if search not in info["author"].lower():
                             continue

Also the description may be added too.

That's because current search looks into the addon name or author only. In case of the OBJ importer the name is "Wavefront OBJ format" and the "import" word is present in it's category: "Import-Export". IMHO the search should look for the category too. Having excessive search result is less confusing then not having enough. And the user may always specify more strict search term. Like in this example, the user may quickly searh for "import" and have an impression that it's all that have anything to do with import. The change to add categories to the search is simple: ``` lines=5 diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 88b3ad5e056..2f865e24cab 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1848,7 +1848,11 @@ class USERPREF_PT_addons(AddOnPanel, Panel): is_visible = is_visible and is_enabled if is_visible: - if search and search not in info["name"].lower(): + if ( + search and + search not in info["name"].lower() and + search not in info["category"].lower() + ): if info["author"]: if search not in info["author"].lower(): continue ``` Also the description may be added too.
Robert Guetzkow changed title from search results in Preferences/Addons not consistent to Search for add-ons does not include category 2020-12-14 11:50:00 +01:00
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Think it's fine to do this as suggested in the patch.

Think it's fine to do this as suggested in the patch.

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

@VincentBlankfield Can you please submit your patch for review?

@VincentBlankfield Can you please submit your patch for review?

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'

Closing as this is working as intended, details can continue to be discussed in patch review.

Closing as this is working as intended, details can continue to be discussed in patch review.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#83747
No description provided.