Compare commits

...

2 commits

2 changed files with 5 additions and 1 deletions

View file

@ -18,7 +18,7 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(SAVETOOL_PROJECT_VERSION 1.4.1)
set(SAVETOOL_PROJECT_VERSION 1.4.2)
find_package(Corrade REQUIRED Main Containers Utility)
find_package(Magnum REQUIRED GL Sdl2Application)

View file

@ -458,6 +458,7 @@ auto Profile::setResource(Containers::StringView container, MaterialID id, Int a
if(!mats_prop) {
mats_prop = new ArrayProperty;
mats_prop->name.emplace(container);
mats_prop->itemType = "StructProperty";
_profile.appendProperty(ArrayProperty::ptr{mats_prop});
}
@ -471,6 +472,9 @@ auto Profile::setResource(Containers::StringView container, MaterialID id, Int a
ResourceItemValue* res_prop;
if(it == mats_prop->items.end()) {
res_prop = new ResourceItemValue;
if(mats_prop->items.isEmpty()) {
res_prop->name.emplace("ResourceMaterial");
}
res_prop->id = id;
ResourceItemValue::ptr prop{res_prop};
arrayAppend(mats_prop->items, std::move(prop));