Commit ae56e83a authored by Georg Schäfer's avatar Georg Schäfer
Browse files

Merge branch 'tmp' into development

parents 51bb74f6 ff70000f
Pipeline #2316 failed with stage
in 2 minutes and 10 seconds
......@@ -42,6 +42,7 @@ namespace mirrage {
bool print_material_info = false;
bool print_animations = true;
bool prefix_materials = true;
};
sf2_structDef(Mesh_converted_config,
texture_mappings,
......@@ -50,7 +51,8 @@ namespace mirrage {
default_output_directory,
skinning_type,
print_material_info,
print_animations);
print_animations,
prefix_materials);
template <typename T>
......
......@@ -142,7 +142,10 @@ namespace mirrage {
continue;
}
auto mat_id = model_name + "_" + name.C_Str();
auto mat_id = std::string(name.C_Str());
if(cfg.prefix_materials) {
mat_id = model_name + "_" + mat_id;
}
util::to_lower_inplace(mat_id);
if(!convert_material(mat_id, *mat, base_dir, output, cfg)) {
LOG(plog::warning) << "Unable to parse material \"" << name.C_Str() << "\"!";
......
......@@ -60,6 +60,52 @@ namespace glm {
sf2::vmember("w", v.w));
}
inline void load(sf2::JsonDeserializer& s, ivec2& v)
{
s.read_virtual(sf2::vmember("x", v.x),
sf2::vmember("y", v.y),
sf2::vmember("w", v.x),
sf2::vmember("h", v.y));
}
inline void save(sf2::JsonSerializer& s, const ivec2& v)
{
s.write_virtual(sf2::vmember("x", v.x), sf2::vmember("y", v.y));
}
inline void load(sf2::JsonDeserializer& s, ivec3& v)
{
s.read_virtual(sf2::vmember("x", v.x),
sf2::vmember("y", v.y),
sf2::vmember("z", v.z),
sf2::vmember("r", v.x),
sf2::vmember("g", v.y),
sf2::vmember("b", v.z));
}
inline void save(sf2::JsonSerializer& s, const ivec3& v)
{
s.write_virtual(sf2::vmember("x", v.x), sf2::vmember("y", v.y), sf2::vmember("z", v.z));
}
inline void load(sf2::JsonDeserializer& s, ivec4& v)
{
s.read_virtual(sf2::vmember("x", v.x),
sf2::vmember("y", v.y),
sf2::vmember("z", v.z),
sf2::vmember("w", v.w),
sf2::vmember("r", v.x),
sf2::vmember("g", v.y),
sf2::vmember("b", v.z),
sf2::vmember("a", v.a));
}
inline void save(sf2::JsonSerializer& s, const ivec4& v)
{
s.write_virtual(sf2::vmember("x", v.x),
sf2::vmember("y", v.y),
sf2::vmember("z", v.z),
sf2::vmember("w", v.w));
}
inline void load(sf2::JsonDeserializer& s, quat& v)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment