mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
Prevent writing empty materials to AMF files. Also add a note about material-id = 0 being reserved by AMF spec. #2871
This commit is contained in:
@@ -690,7 +690,8 @@ ModelVolume::assign_unique_material()
|
||||
{
|
||||
Model* model = this->get_object()->get_model();
|
||||
|
||||
this->_material_id = 1 + model->materials.size();
|
||||
// as material-id "0" is reserved by the AMF spec we start from 1
|
||||
this->_material_id = 1 + model->materials.size(); // watchout for implicit cast
|
||||
return model->add_material(this->_material_id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user