mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 03:37:54 -06:00
Removed StringMap
This commit is contained in:
parent
05b2993769
commit
54a199919b
11 changed files with 35 additions and 162 deletions
|
@ -83,19 +83,17 @@ Model::delete_all_materials()
|
|||
}
|
||||
|
||||
ModelMaterial *
|
||||
Model::set_material(t_model_material_id material_id,
|
||||
const t_model_material_attributes &attributes)
|
||||
Model::set_material(t_model_material_id material_id)
|
||||
{
|
||||
ModelMaterialMap::iterator i = this->materials.find(material_id);
|
||||
|
||||
|
||||
ModelMaterial *mat;
|
||||
if (i == this->materials.end()) {
|
||||
mat = this->materials[material_id] = new ModelMaterial(this);
|
||||
} else {
|
||||
mat = i->second;
|
||||
}
|
||||
|
||||
mat->apply(attributes);
|
||||
|
||||
return mat;
|
||||
}
|
||||
|
||||
|
@ -142,12 +140,7 @@ REGISTER_CLASS(Model, "Model");
|
|||
#endif
|
||||
|
||||
|
||||
ModelMaterial::ModelMaterial(Model *model)
|
||||
: model(model),
|
||||
attributes(),
|
||||
config()
|
||||
{
|
||||
}
|
||||
ModelMaterial::ModelMaterial(Model *model) : model(model) {}
|
||||
|
||||
void
|
||||
ModelMaterial::apply(const t_model_material_attributes &attributes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue