Added material inspector and setting of materials #168

Merged
srishamharan merged 8 commits from SP3-4-Editor into main 2022-11-02 21:48:07 +08:00
1 changed files with 8 additions and 12 deletions
Showing only changes of commit 976c220145 - Show all commits

View File

@ -267,22 +267,18 @@ namespace YAML
static bool decode(YAML::Node const& node, SHMaterialSpec& rhs)
{
// Retrieve Shader Asset IDs
if (!node[VERT_SHADER_YAML_TAG.data()])
return false;
rhs.vertexShader = node[VERT_SHADER_YAML_TAG.data()].as<AssetID>();
if (!node[FRAG_SHADER_YAML_TAG.data()])
return false;
rhs.fragShader = node[FRAG_SHADER_YAML_TAG.data()].as<AssetID>();
if (node[VERT_SHADER_YAML_TAG.data()])
rhs.vertexShader = node[VERT_SHADER_YAML_TAG.data()].as<AssetID>();
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;
rhs.subpassName = node[SUBPASS_YAML_TAG.data()].as<std::string>();
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;
rhs.properties = node[PROPS_YAML_TAG.data()];
if (node[PROPS_YAML_TAG.data()])
rhs.properties = node[PROPS_YAML_TAG.data()];
return true;
}