Profile: setResource() now can create an array if it's missing.
This commit is contained in:
parent
fb6246cff7
commit
bf820f65ec
1 changed files with 3 additions and 3 deletions
|
@ -412,9 +412,9 @@ auto Profile::setResource(Containers::StringView container, MaterialID id, Int a
|
||||||
auto mats_prop = _profile.at<ArrayProperty>(container);
|
auto mats_prop = _profile.at<ArrayProperty>(container);
|
||||||
|
|
||||||
if(!mats_prop) {
|
if(!mats_prop) {
|
||||||
_lastError = "Couldn't find "_s + container + " in "_s + _filename;
|
mats_prop = new ArrayProperty;
|
||||||
_valid = false;
|
mats_prop->name.emplace(container);
|
||||||
return false;
|
_profile.appendProperty(ArrayProperty::ptr{mats_prop});
|
||||||
}
|
}
|
||||||
|
|
||||||
auto predicate = [&id](UnrealPropertyBase::ptr& prop){
|
auto predicate = [&id](UnrealPropertyBase::ptr& prop){
|
||||||
|
|
Loading…
Reference in a new issue