Fix #147270: Smooth by angle asset detection broken

The previous commit 80e8493c11 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.
This commit is contained in:
Hans Goudey
2025-10-12 11:14:03 -04:00
parent 8c4c92f304
commit 6d884e0da5

View File

@@ -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")) {