From 99a4935825c246b36fa0993a699ef2f6c76a7349 Mon Sep 17 00:00:00 2001 From: Alexis Maiquez Date: Wed, 8 Feb 2023 18:55:27 +0100 Subject: [PATCH] Add composelayer checks back until we figure out how they work Signed-off-by: Alexis Maiquez --- src/WallpaperEngine/Core/CObject.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/WallpaperEngine/Core/CObject.cpp b/src/WallpaperEngine/Core/CObject.cpp index a78ca2a..a449a85 100644 --- a/src/WallpaperEngine/Core/CObject.cpp +++ b/src/WallpaperEngine/Core/CObject.cpp @@ -40,7 +40,7 @@ CObject* CObject::fromJSON (json data, CScene* scene, const CContainer& containe std::string json = data.dump (); auto id_it = jsonFindRequired (data, "id", "Objects must have id"); - auto visible = jsonFindUserConfig (data, "visible", true); + auto visible = jsonFindUserConfig (data, "visible", false); auto origin = jsonFindUserConfig (data, "origin", {0, 0, 0}); auto scale = jsonFindUserConfig (data, "scale", {0, 0, 0}); auto angles_val = jsonFindDefault (data, "angles", "0.0 0.0 0.0"); @@ -58,6 +58,9 @@ CObject* CObject::fromJSON (json data, CScene* scene, const CContainer& containe if (image_it != data.end () && !(*image_it).is_null ()) { + if (*image_it == "models/util/composelayer.json") + return nullptr; + object = Objects::CImage::fromJSON ( scene, data,