mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed "setting an extruder does not change object's color"
This commit is contained in:
parent
94b1183843
commit
a4be8ef6ad
4 changed files with 30 additions and 17 deletions
|
@ -747,18 +747,9 @@ int GLVolumeCollection::load_object_volume(
|
|||
{ 0.5f, 0.5f, 1.0f, 1.f }
|
||||
};
|
||||
|
||||
const ModelVolume *model_volume = model_object->volumes[volume_idx];
|
||||
|
||||
int extruder_id = -1;
|
||||
if (model_volume->is_model_part())
|
||||
{
|
||||
const ConfigOption *opt = model_volume->config.option("extruder");
|
||||
if (opt == nullptr)
|
||||
opt = model_object->config.option("extruder");
|
||||
extruder_id = (opt == nullptr) ? 0 : opt->getInt();
|
||||
}
|
||||
|
||||
const ModelInstance *instance = model_object->instances[instance_idx];
|
||||
const ModelVolume *model_volume = model_object->volumes[volume_idx];
|
||||
const int extruder_id = model_volume->extruder_id();
|
||||
const ModelInstance *instance = model_object->instances[instance_idx];
|
||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||
const TriangleMesh& mesh = model_volume->mesh;
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue