From 6d884e0da5b94eb43fb8c9dd4ce74e7e1ff047c8 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sun, 12 Oct 2025 11:14:03 -0400 Subject: [PATCH] Fix #147270: Smooth by angle asset detection broken The previous commit 80e8493c119c0e105eb4 was incorrect. I must have tested it incorrectly, because `BLI_path_contains` only tests the beginning of the path. Instead just make the shorter asset path native, and explicitly use StringRef for the test. --- source/blender/editors/object/object_edit.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/editors/object/object_edit.cc b/source/blender/editors/object/object_edit.cc index 1cb46b9c085..a7fd91e0125 100644 --- a/source/blender/editors/object/object_edit.cc +++ b/source/blender/editors/object/object_edit.cc @@ -1663,9 +1663,9 @@ static bool is_smooth_by_angle_modifier(const ModifierData &md) if (!library) { return false; } - if (!BLI_path_contains(library->filepath, - "datafiles/assets/nodes/geometry_nodes_essentials.blend")) - { + char auto_smooth_asset_path[FILE_MAX] = "datafiles/assets/nodes/geometry_nodes_essentials.blend"; + BLI_path_normalize(auto_smooth_asset_path); + if (!StringRef(library->filepath).endswith(auto_smooth_asset_path)) { return false; } if (!STREQ(BKE_id_name(nmd.node_group->id), "Smooth by Angle")) {