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

add option to mesh converter to disable adding the model name as prefix to the material names

parent a61ffbf2
......@@ -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() << "\"!";
......
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