mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Add extruder swatches to object selector
This commit is contained in:
parent
2eeabec317
commit
e13a0bca4a
3 changed files with 44 additions and 2 deletions
|
@ -87,6 +87,17 @@ Item
|
|||
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
property var extrudersModel: CuraApplication.getExtrudersModel()
|
||||
UM.SettingPropertyProvider
|
||||
{
|
||||
id: machineExtruderCount
|
||||
|
||||
containerStack: Cura.MachineManager.activeMachine
|
||||
key: "machine_extruder_count"
|
||||
watchedProperties: [ "value" ]
|
||||
storeIndex: 0
|
||||
}
|
||||
|
||||
ListView
|
||||
{
|
||||
id: listView
|
||||
|
@ -123,6 +134,16 @@ Item
|
|||
property bool outsideBuildArea: model.outside_build_area
|
||||
property int perObjectSettingsCount: model.per_object_settings_count
|
||||
property string meshType: model.mesh_type
|
||||
property int extruderNumber: model.extruder_number
|
||||
property string extruderColor:
|
||||
{
|
||||
if (model.extruder_number == -1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return contents.extrudersModel.getItem(model.extruder_number).color;
|
||||
}
|
||||
property bool showExtruderSwatches: machineExtruderCount.properties.value > 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue