mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura into ui_rework_4_0
This commit is contained in:
commit
384c359db1
9 changed files with 28 additions and 79 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue