Skip to content

Commit

Permalink
fixed material path substitution checks
Browse files Browse the repository at this point in the history
  • Loading branch information
manavortex committed Jun 13, 2024
1 parent 61c2e24 commit 9c8e36b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Scripts/Internal/FileValidation/00_shared.wscript
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export function checkDepotPath(_depotPath, _info, allowEmpty = false, suppressLo
case 'ent':
warnAboutSubstitution = entSettings.warnAboutSubstitution;
case 'mesh':
warnAboutSubstitution = meshSettings.enabled;;
warnAboutSubstitution = meshSettings.enabled;
default:
warnAboutSubstitution = false;
}
Expand All @@ -160,22 +160,23 @@ export function checkDepotPath(_depotPath, _info, allowEmpty = false, suppressLo
if (wkit.FileExists(resolvedPath)) {
return;
}
// File does not exist
ret = false;

if (suppressLogOutput || !warnAboutSubstitution) {
if (suppressLogOutput) {
return;
}

// File does not exist
ret = false;

if ( shouldHaveSubstitution(resolvedPath, true)) {
if (warnAboutSubstitution && shouldHaveSubstitution(resolvedPath, true)) {
Logger.Info(`${info}${resolvedPath}: substitution couldn't be resolved. It's either invalid or not yet supported in Wolvenkit.`);
return;
}

if (!!currentMaterialName) {
Logger.Info(`${info}${resolvedPath}: substitution couldn't be resolved. It may not be defined yet.`);
return;
}

Logger.Warning(`${info}${resolvedPath} not found in project or game files`);
})
return ret;
Expand Down

0 comments on commit 9c8e36b

Please sign in to comment.