Link drag search does not show results for node-groups #104975

Closed
opened 2023-02-20 15:45:26 +01:00 by Simon Thommes · 8 comments
Member

System Information
Operating system: Linux-5.17.15-76051715-generic-x86_64-with-glibc2.35 64 Bits
Graphics card: Quadro RTX 6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 515.48.07

Blender Version
Broken: version: 3.5.0 Beta, branch: blender-v3.5-release, commit date: 2023-02-20 11:56, hash: 5fd4d47206ff
Also broken in main
Worked: never (?)

Short description of error
Link drag search does not show results for built-in essentials node-groups
Video attached below

Exact steps for others to reproduce the error

  • search for one of the builtin hair node-group assets via link drag search
**System Information** Operating system: Linux-5.17.15-76051715-generic-x86_64-with-glibc2.35 64 Bits Graphics card: Quadro RTX 6000/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 515.48.07 **Blender Version** Broken: version: 3.5.0 Beta, branch: blender-v3.5-release, commit date: 2023-02-20 11:56, hash: `5fd4d47206ff` Also broken in main Worked: never (?) **Short description of error** Link drag search does not show results for built-in essentials node-groups Video attached below **Exact steps for others to reproduce the error** - search for one of the builtin hair node-group assets via link drag search

You attach really big video...? I can't open/download that

You attach really big video...? I can't open/download that
Author
Member

it's 1.3MB on disk, guess it's an issue with the format, I'll ask around

it's 1.3MB on disk, guess it's an issue with the format, I'll ask around
Author
Member

Seems like the file was corrupt on my end, I replaced the upload. Not sure how to recreate the reference in the post's body. But the link below should be fine.

Seems like the file was corrupt on my end, I replaced the upload. Not sure how to recreate the reference in the post's body. But the link below should be fine.
Hans Goudey added this to the 3.5 milestone 2023-02-20 21:59:42 +01:00
Member

@JulianEisel Hey, this is how I'd expect to get the essentials in link-drag search, but it gives me an assert in find_custom_asset_library_from_library_ref. Do you think that makes sense? BTW, this doesn't use the "all" library you refactored the add-node search to use because of the skip_local thing. That could definitely be handled differently. Curious about your opinion on that.

diff --git a/source/blender/editors/space_node/link_drag_search.cc b/source/blender/editors/space_node/link_drag_search.cc
index 73be1a58a86..9e2dbacbb44 100644
--- a/source/blender/editors/space_node/link_drag_search.cc
+++ b/source/blender/editors/space_node/link_drag_search.cc
@@ -253,11 +253,20 @@ static void gather_search_link_ops_for_all_assets(const bContext &C,
         C, node_tree, socket, library_ref, true, search_link_ops);
   }
 
-  AssetLibraryReference library_ref{};
-  library_ref.custom_library_index = -1;
-  library_ref.type = ASSET_LIBRARY_LOCAL;
-  gather_search_link_ops_for_asset_library(
-      C, node_tree, socket, library_ref, false, search_link_ops);
+  {
+    AssetLibraryReference library_ref{};
+    library_ref.custom_library_index = -1;
+    library_ref.type = ASSET_LIBRARY_LOCAL;
+    gather_search_link_ops_for_asset_library(
+        C, node_tree, socket, library_ref, false, search_link_ops);
+  }
+  {
+    AssetLibraryReference library_ref{};
+    library_ref.custom_library_index = -1;
+    library_ref.type = ASSET_LIBRARY_ESSENTIALS;
+    gather_search_link_ops_for_asset_library(
+        C, node_tree, socket, library_ref, false, search_link_ops);
+  }
 }
 
 /**
@JulianEisel Hey, this is how I'd expect to get the essentials in link-drag search, but it gives me an assert in `find_custom_asset_library_from_library_ref`. Do you think that makes sense? BTW, this doesn't use the "all" library you refactored the add-node search to use because of the `skip_local` thing. That could definitely be handled differently. Curious about your opinion on that. ``` diff --git a/source/blender/editors/space_node/link_drag_search.cc b/source/blender/editors/space_node/link_drag_search.cc index 73be1a58a86..9e2dbacbb44 100644 --- a/source/blender/editors/space_node/link_drag_search.cc +++ b/source/blender/editors/space_node/link_drag_search.cc @@ -253,11 +253,20 @@ static void gather_search_link_ops_for_all_assets(const bContext &C, C, node_tree, socket, library_ref, true, search_link_ops); } - AssetLibraryReference library_ref{}; - library_ref.custom_library_index = -1; - library_ref.type = ASSET_LIBRARY_LOCAL; - gather_search_link_ops_for_asset_library( - C, node_tree, socket, library_ref, false, search_link_ops); + { + AssetLibraryReference library_ref{}; + library_ref.custom_library_index = -1; + library_ref.type = ASSET_LIBRARY_LOCAL; + gather_search_link_ops_for_asset_library( + C, node_tree, socket, library_ref, false, search_link_ops); + } + { + AssetLibraryReference library_ref{}; + library_ref.custom_library_index = -1; + library_ref.type = ASSET_LIBRARY_ESSENTIALS; + gather_search_link_ops_for_asset_library( + C, node_tree, socket, library_ref, false, search_link_ops); + } } /** ```
Member

This bit seems to be missing:

diff --git a/source/blender/asset_system/intern/asset_library_service.cc b/source/blender/asset_system/intern/asset_library_service.cc
index cf52f9d1d76..45d8264e926 100644
--- a/source/blender/asset_system/intern/asset_library_service.cc
+++ b/source/blender/asset_system/intern/asset_library_service.cc
@@ -215,6 +215,10 @@ std::string AssetLibraryService::root_path_from_library_ref(
     return "";
   }
 
+  if (ELEM(library_reference.type, ASSET_LIBRARY_ESSENTIALS)) {
+    return essentials_directory_path();
+  }
+
   bUserAssetLibrary *custom_library = find_custom_asset_library_from_library_ref(
       library_reference);
   if (!custom_library || !custom_library->path[0]) {

(Eventually this kind of information should be stored in the asset library itself, so we don't have to hardcode behavior for different library types.)

This bit seems to be missing: ```diff diff --git a/source/blender/asset_system/intern/asset_library_service.cc b/source/blender/asset_system/intern/asset_library_service.cc index cf52f9d1d76..45d8264e926 100644 --- a/source/blender/asset_system/intern/asset_library_service.cc +++ b/source/blender/asset_system/intern/asset_library_service.cc @@ -215,6 +215,10 @@ std::string AssetLibraryService::root_path_from_library_ref( return ""; } + if (ELEM(library_reference.type, ASSET_LIBRARY_ESSENTIALS)) { + return essentials_directory_path(); + } + bUserAssetLibrary *custom_library = find_custom_asset_library_from_library_ref( library_reference); if (!custom_library || !custom_library->path[0]) { ``` (Eventually this kind of information should be stored in the asset library itself, so we don't have to hardcode behavior for different library types.)
Member

Worked: Recently, unsure when exactly

Are we sure this ever worked with the essentials?

> Worked: Recently, unsure when exactly Are we sure this ever worked with the essentials?
Author
Member

Worked: Recently, unsure when exactly

Are we sure this ever worked with the essentials?

Actually... no, just tested the version I thought it worked in. I must have mixed that up with the regular search where it works

> > Worked: Recently, unsure when exactly > > Are we sure this ever worked with the essentials? Actually... no, just tested the version I thought it worked in. I must have mixed that up with the regular search where it works
Member

Thanks @JulianEisel, obvious now!

Thanks @JulianEisel, obvious now!
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-02-21 14:45:56 +01:00
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#104975
No description provided.