mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 22:29:41 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura into ui_rework_4_0
This commit is contained in:
commit
384c359db1
@ -72,7 +72,7 @@ class GcodeStartEndFormatter(Formatter):
|
||||
# "-1" is global stack, and if the setting value exists in the global stack, use it as the fallback value.
|
||||
if key in kwargs["-1"]:
|
||||
value = kwargs["-1"]
|
||||
if key in kwargs[str(extruder_nr)]:
|
||||
if str(extruder_nr) in kwargs and key in kwargs[str(extruder_nr)]:
|
||||
value = kwargs[str(extruder_nr)][key]
|
||||
|
||||
if value == default_value_str:
|
||||
|
3
plugins/PostProcessingPlugin/scripts/ExampleScript.md
Normal file
3
plugins/PostProcessingPlugin/scripts/ExampleScript.md
Normal file
@ -0,0 +1,3 @@
|
||||
A good example script is SearchAndReplace.py.
|
||||
If you have any questions please ask them at:
|
||||
https://github.com/Ultimaker/Cura/issues
|
@ -1,43 +0,0 @@
|
||||
# Copyright (c) 2015 Jaime van Kessel, Ultimaker B.V.
|
||||
# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
|
||||
from ..Script import Script
|
||||
|
||||
class ExampleScript(Script):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
def getSettingDataString(self):
|
||||
return """{
|
||||
"name":"Example script",
|
||||
"key": "ExampleScript",
|
||||
"metadata": {},
|
||||
"version": 2,
|
||||
"settings":
|
||||
{
|
||||
"test":
|
||||
{
|
||||
"label": "Test",
|
||||
"description": "None",
|
||||
"unit": "mm",
|
||||
"type": "float",
|
||||
"default_value": 0.5,
|
||||
"minimum_value": "0",
|
||||
"minimum_value_warning": "0.1",
|
||||
"maximum_value_warning": "1"
|
||||
},
|
||||
"derp":
|
||||
{
|
||||
"label": "zomg",
|
||||
"description": "afgasgfgasfgasf",
|
||||
"unit": "mm",
|
||||
"type": "float",
|
||||
"default_value": 0.5,
|
||||
"minimum_value": "0",
|
||||
"minimum_value_warning": "0.1",
|
||||
"maximum_value_warning": "1"
|
||||
}
|
||||
}
|
||||
}"""
|
||||
|
||||
def execute(self, data):
|
||||
return data
|
@ -36,12 +36,19 @@ Item
|
||||
var pg_name = "printingGuidelines"
|
||||
return (pg_name in packageData.links) ? packageData.links[pg_name] : undefined
|
||||
}
|
||||
|
||||
property var materialWebsiteUrl:
|
||||
{
|
||||
var pg_name = "website"
|
||||
return (pg_name in packageData.links) ? packageData.links[pg_name] : undefined
|
||||
}
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
height: visible ? childrenRect.height : 0
|
||||
|
||||
visible: packageData.type == "material" &&
|
||||
(packageData.has_configs || technicalDataSheetUrl !== undefined ||
|
||||
safetyDataSheetUrl !== undefined || printingGuidelinesUrl !== undefined)
|
||||
safetyDataSheetUrl !== undefined || printingGuidelinesUrl !== undefined ||
|
||||
materialWebsiteUrl !== undefined)
|
||||
|
||||
Item
|
||||
{
|
||||
@ -180,7 +187,8 @@ Item
|
||||
anchors.top: combatibilityItem.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height / 2
|
||||
visible: base.technicalDataSheetUrl !== undefined ||
|
||||
base.safetyDataSheetUrl !== undefined || base.printingGuidelinesUrl !== undefined
|
||||
base.safetyDataSheetUrl !== undefined || base.printingGuidelinesUrl !== undefined ||
|
||||
base.materialWebsiteUrl !== undefined
|
||||
height: visible ? contentHeight : 0
|
||||
text:
|
||||
{
|
||||
@ -208,6 +216,16 @@ Item
|
||||
var pg_name = catalog.i18nc("@action:label", "Printing Guidelines")
|
||||
result += "<a href='%1'>%2</a>".arg(base.printingGuidelinesUrl).arg(pg_name)
|
||||
}
|
||||
if (base.materialWebsiteUrl !== undefined)
|
||||
{
|
||||
if (result.length > 0)
|
||||
{
|
||||
result += "<br/>"
|
||||
}
|
||||
var pg_name = catalog.i18nc("@action:label", "Website")
|
||||
result += "<a href='%1'>%2</a>".arg(base.materialWebsiteUrl).arg(pg_name)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
font: UM.Theme.getFont("very_small")
|
||||
|
@ -144,10 +144,6 @@ Item
|
||||
{
|
||||
return ""
|
||||
}
|
||||
if (details.author_email)
|
||||
{
|
||||
return "<a href=\"mailto:" + details.author_email+"?Subject=Cura: " + details.name + "\">" + details.author_name + "</a>"
|
||||
}
|
||||
else
|
||||
{
|
||||
return "<a href=\"" + details.website + "\">" + details.author_name + "</a>"
|
||||
|
@ -37,7 +37,7 @@ Item
|
||||
anchors.top: packageName.bottom
|
||||
width: parent.width
|
||||
text: model.description
|
||||
maximumLineCount: 6
|
||||
maximumLineCount: 25
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.WordWrap
|
||||
color: UM.Theme.getColor("text")
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "Cocoon Create ModelMaker & Wanhao Duplicator i3 Mini",
|
||||
"name": "Cocoon Create ModelMaker",
|
||||
"version": 2,
|
||||
"inherits": "fdmprinter",
|
||||
"metadata": {
|
||||
"visible": true,
|
||||
"author": "Samuel Pinches",
|
||||
"manufacturer": "Cocoon Create / Wanhao",
|
||||
"manufacturer": "Cocoon Create",
|
||||
"file_formats": "text/x-gcode",
|
||||
"preferred_quality_type": "fine",
|
||||
"machine_extruder_trains":
|
||||
@ -15,7 +15,7 @@
|
||||
},
|
||||
"overrides": {
|
||||
"machine_name": {
|
||||
"default_value": "Cocoon Create ModelMaker & Wanhao Duplicator i3 Mini"
|
||||
"default_value": "Cocoon Create ModelMaker"
|
||||
},
|
||||
"machine_start_gcode": {
|
||||
"default_value": "; -- START GCODE --\nG21 ;set units to millimetres\nG90 ;set to absolute positioning\nM106 S0 ;set fan speed to zero (turned off)\nG28 ;home all axis\nG92 E0 ;zero the extruded length\nG1 Z1 F1000 ;move up slightly\nG1 X60.0 Z0 E9.0 F1000.0;intro line\nG1 X100.0 E21.5 F1000.0 ;continue line\nG92 E0 ;zero the extruded length again\n; -- end of START GCODE --"
|
||||
|
@ -213,28 +213,6 @@ UM.Dialog
|
||||
|
||||
PropertyChanges { target: machineButton; opacity: 0; height: 0; }
|
||||
}
|
||||
|
||||
transitions:
|
||||
[
|
||||
Transition
|
||||
{
|
||||
to: "collapsed";
|
||||
SequentialAnimation
|
||||
{
|
||||
NumberAnimation { property: "opacity"; duration: 75; }
|
||||
NumberAnimation { property: "height"; duration: 75; }
|
||||
}
|
||||
},
|
||||
Transition
|
||||
{
|
||||
from: "collapsed";
|
||||
SequentialAnimation
|
||||
{
|
||||
NumberAnimation { property: "height"; duration: 75; }
|
||||
NumberAnimation { property: "opacity"; duration: 75; }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +151,6 @@ UM.PreferencesPage
|
||||
{
|
||||
id: languageLabel
|
||||
text: catalog.i18nc("@label","Language:")
|
||||
anchors.verticalCenter: languageComboBox.verticalCenter
|
||||
}
|
||||
|
||||
ComboBox
|
||||
@ -219,7 +218,6 @@ UM.PreferencesPage
|
||||
{
|
||||
id: currencyLabel
|
||||
text: catalog.i18nc("@label","Currency:")
|
||||
anchors.verticalCenter: currencyField.verticalCenter
|
||||
}
|
||||
|
||||
TextField
|
||||
@ -233,7 +231,6 @@ UM.PreferencesPage
|
||||
{
|
||||
id: themeLabel
|
||||
text: catalog.i18nc("@label","Theme:")
|
||||
anchors.verticalCenter: themeComboBox.verticalCenter
|
||||
}
|
||||
|
||||
ComboBox
|
||||
|
Loading…
x
Reference in New Issue
Block a user