Merge branch 'master' into feature_support_bottoms

This commit is contained in:
Tim Kuipers 2016-07-28 13:53:43 +02:00
commit 2ab9531f83
12 changed files with 75 additions and 36 deletions

View file

@ -3380,7 +3380,7 @@
"maximum_value_warning": "9999",
"default_value": 0,
"value": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0",
"enabled": "draft_shield_height_limitation == \"limited\"",
"enabled": "draft_shield_enabled and draft_shield_height_limitation == \"limited\"",
"settable_per_mesh": false,
"settable_per_extruder": false
},

View file

@ -67,6 +67,8 @@ UM.ManagementPage
enabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMaterialId
onClicked: Cura.MachineManager.setActiveMaterial(base.currentItem.id)
},
/*
// disabled because it has a lot of issues
Button
{
text: catalog.i18nc("@action:button", "Duplicate");
@ -89,7 +91,7 @@ UM.ManagementPage
Cura.MachineManager.setActiveMaterial(material_id)
}
},
}, */
Button
{
text: catalog.i18nc("@action:button", "Remove");

View file

@ -84,6 +84,27 @@ Rectangle {
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
Row {
id: additionalComponentsRow
anchors.top: parent.top
anchors.right: saveToButton.visible ? saveToButton.left : parent.right
anchors.rightMargin: UM.Theme.getSize("default_margin").width
spacing: UM.Theme.getSize("default_margin").width
}
Connections {
target: Printer
onAdditionalComponentsChanged:
{
if(areaId == "saveButton") {
for (var component in Printer.additionalComponents["saveButton"]) {
Printer.additionalComponents["saveButton"][component].parent = additionalComponentsRow
}
}
}
}
Button {
id: saveToButton
@ -102,8 +123,7 @@ Rectangle {
}
style: ButtonStyle {
background:
Rectangle
background: Rectangle
{
border.width: UM.Theme.getSize("default_lining").width
border.color: !control.enabled ? UM.Theme.getColor("action_button_disabled_border") :
@ -126,7 +146,7 @@ Rectangle {
text: control.text;
}
}
label: Item { }
label: Item { }
}
}

View file

@ -1,7 +1,7 @@
[shaders]
vertex =
uniform highp mat4 u_viewProjectionMatrix;
uniform highp mat4 u_modelMatrix;
uniform highp mat4 u_viewProjectionMatrix;
uniform highp mat4 u_normalMatrix;
attribute highp vec4 a_vertex;
@ -10,7 +10,6 @@ vertex =
varying highp vec3 v_vertex;
varying highp vec3 v_normal;
varying highp vec2 v_uvs;
void main()
{
@ -19,56 +18,47 @@ vertex =
v_vertex = world_space_vert.xyz;
v_normal = (u_normalMatrix * normalize(a_normal)).xyz;
v_uvs = a_uvs;
}
fragment =
uniform mediump vec4 u_ambientColor;
uniform mediump vec4 u_diffuseColor;
uniform highp vec3 u_lightPosition;
uniform highp vec3 u_viewPosition;
uniform mediump float u_opacity;
uniform sampler2D u_texture;
varying highp vec3 v_vertex;
varying highp vec3 v_normal;
varying highp vec2 v_uvs;
void main()
{
// Copied from platform.shader, removed texture
mediump vec4 final_color = vec4(0.0);
mediump vec4 finalColor = vec4(0.0);
/* Ambient Component */
final_color += u_ambientColor;
finalColor += u_ambientColor;
highp vec3 normal = normalize(v_normal);
highp vec3 light_dir = normalize(u_lightPosition - v_vertex);
highp vec3 lightDir = normalize(u_lightPosition - v_vertex);
/* Diffuse Component */
highp float n_dot_l = clamp(dot(normal, light_dir), 0.0, 1.0);
final_color += (n_dot_l * u_diffuseColor);
highp float NdotL = clamp(abs(dot(normal, lightDir)), 0.0, 1.0);
finalColor += (NdotL * u_diffuseColor);
final_color.a = u_opacity;
gl_FragColor = final_color;
gl_FragColor = finalColor;
gl_FragColor.a = u_opacity;
}
[defaults]
u_ambientColor = [0.3, 0.3, 0.3, 1.0]
u_diffuseColor = [1.0, 1.0, 1.0, 1.0]
u_ambientColor = [0.1, 0.1, 0.1, 1.0]
u_diffuseColor = [0.4, 0.4, 0.4, 1.0]
u_opacity = 0.5
u_texture = 0
[bindings]
u_viewProjectionMatrix = view_projection_matrix
u_modelMatrix = model_matrix
u_viewProjectionMatrix = view_projection_matrix
u_normalMatrix = normal_matrix
u_lightPosition = light_0_position
u_viewPosition = camera_position
[attributes]
a_vertex = vertex
a_normal = normal
a_uvs = uv0