Deserialization of SHMaterialSpec will return an empty SHMaterialSpec on failure now instead
This commit is contained in:
parent
d207042fec
commit
976c220145
|
@ -267,21 +267,17 @@ namespace YAML
|
|||
static bool decode(YAML::Node const& node, SHMaterialSpec& rhs)
|
||||
{
|
||||
// Retrieve Shader Asset IDs
|
||||
if (!node[VERT_SHADER_YAML_TAG.data()])
|
||||
return false;
|
||||
if (node[VERT_SHADER_YAML_TAG.data()])
|
||||
rhs.vertexShader = node[VERT_SHADER_YAML_TAG.data()].as<AssetID>();
|
||||
if (!node[FRAG_SHADER_YAML_TAG.data()])
|
||||
return false;
|
||||
if (node[FRAG_SHADER_YAML_TAG.data()])
|
||||
rhs.fragShader = node[FRAG_SHADER_YAML_TAG.data()].as<AssetID>();
|
||||
|
||||
// Retrieve Subpass
|
||||
if (!node[SUBPASS_YAML_TAG.data()])
|
||||
return false;
|
||||
if (node[SUBPASS_YAML_TAG.data()])
|
||||
rhs.subpassName = node[SUBPASS_YAML_TAG.data()].as<std::string>();
|
||||
|
||||
// Retrieve
|
||||
if (!node[PROPS_YAML_TAG.data()])
|
||||
return false;
|
||||
if (node[PROPS_YAML_TAG.data()])
|
||||
rhs.properties = node[PROPS_YAML_TAG.data()];
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue