Fix MaterialBaker not including names in baked multi-materials

This commit is contained in:
sabrina-shanman 2019-03-27 15:31:22 -07:00
parent d00ba2a9f1
commit b711ee8b8a
2 changed files with 2 additions and 0 deletions

View file

@ -318,6 +318,7 @@ public:
void setTextureTransforms(const Transform& transform, MaterialMappingMode mode, bool repeat);
const std::string& getName() const { return _name; }
void setName(const std::string& name) { _name = name; }
const std::string& getModel() const { return _model; }
void setModel(const std::string& model) { _model = model; }

View file

@ -184,6 +184,7 @@ std::pair<std::string, std::shared_ptr<NetworkMaterial>> NetworkMaterialResource
auto nameJSON = materialJSON.value(key);
if (nameJSON.isString()) {
name = nameJSON.toString().toStdString();
material->setName(name);
}
} else if (key == "model") {
auto modelJSON = materialJSON.value(key);