Skip to content

Commit

Permalink
Restore exception in translateShader
Browse files Browse the repository at this point in the history
This changelist restores an exception that was removed from ShaderTranslator::translateShader, allowing the caller to tell whether a translation operation successfully modified the document.
  • Loading branch information
jstone-lucasfilm committed Oct 31, 2022
1 parent bbb900f commit 60dbde8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/MaterialXGenShader/ShaderTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void ShaderTranslator::translateShader(NodePtr shader, const string& destCategor
const string& sourceCategory = shader->getCategory();
if (sourceCategory == destCategory)
{
return;
throw Exception("The source shader \"" + shader->getNamePath() + "\" category is already \"" + destCategory + "\"");
}

DocumentPtr doc = shader->getDocument();
Expand Down

0 comments on commit 60dbde8

Please sign in to comment.