Fix #134756: Internal IES texture node flagged in missing file report

There was another fix for this, but it addressed a different problem than
what was reported.

Pull Request: https://projects.blender.org/blender/blender/pulls/136331
This commit is contained in:
Brecht Van Lommel
2025-03-24 09:39:22 +01:00
committed by Brecht Van Lommel
parent 583f4a7909
commit 758e70d728

View File

@@ -404,11 +404,15 @@ static void node_foreach_path(ID *id, BPathForeachPathData *bpath_data)
for (bNode *node : ntree->all_nodes()) {
if (node->type_legacy == SH_NODE_SCRIPT) {
NodeShaderScript *nss = static_cast<NodeShaderScript *>(node->storage);
BKE_bpath_foreach_path_fixed_process(bpath_data, nss->filepath, sizeof(nss->filepath));
if (nss->mode == NODE_SCRIPT_EXTERNAL && nss->filepath[0]) {
BKE_bpath_foreach_path_fixed_process(bpath_data, nss->filepath, sizeof(nss->filepath));
}
}
else if (node->type_legacy == SH_NODE_TEX_IES) {
NodeShaderTexIES *ies = static_cast<NodeShaderTexIES *>(node->storage);
BKE_bpath_foreach_path_fixed_process(bpath_data, ies->filepath, sizeof(ies->filepath));
if (ies->mode == NODE_IES_EXTERNAL && ies->filepath[0]) {
BKE_bpath_foreach_path_fixed_process(bpath_data, ies->filepath, sizeof(ies->filepath));
}
}
}
break;