15 entt::meta_factory<project_editor_settings::scene_setup>{}
16 .type(
"scene_setup"_hs)
21 .data<&project_editor_settings::scene_setup::opened_scene>(
"opened_scene"_hs)
25 entt::attribute{
"tooltip",
"The scene that was last opened in the editor."},
31 try_save(ar, ser20::make_nvp(
"opened_scene", obj.opened_scene));
36 try_load(ar, ser20::make_nvp(
"opened_scene", obj.opened_scene));
41 entt::meta_factory<project_editor_settings>{}
42 .type(
"project_editor_settings"_hs)
48 .data<&project_editor_settings::scene>(
"scene"_hs)
57 try_save(ar, ser20::make_nvp(
"scene", obj.scene));
64 try_load(ar, ser20::make_nvp(
"scene", obj.scene));
71 std::ofstream stream(absolute_path);
77 try_save(ar, ser20::make_nvp(
"settings", obj));
79 catch(
const std::exception& e)
81 APPLOG_WARNING(
"Failed to save project editor settings {}", absolute_path);
88 std::ifstream stream(absolute_path);
94 return try_load(ar, ser20::make_nvp(
"settings", obj));
96 catch(
const std::exception& e)
98 APPLOG_WARNING(
"Failed to load project editor settings {}", absolute_path);
#define APPLOG_WARNING(...)
attributes::value_type attribute
std::map< std::string, meta_any > attributes
auto create_oarchive_associative(std::ostream &stream)
BinaryInputArchive iarchive_binary_t
auto create_iarchive_associative(std::istream &stream)
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
void load_from_file(const std::string &absolute_path, animation_clip &obj)
void save_to_file(const std::string &absolute_path, const animation_clip &obj)
#define REFLECT_INLINE(cls)
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool