Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemco Burema <r.burema@ultimaker.com>2019-09-10 13:37:59 +0300
committerRemco Burema <r.burema@ultimaker.com>2019-09-10 13:37:59 +0300
commite5a690e6059ee7e174535415ed54f448dc0da24a (patch)
treebfe9c0985590ab9ef97e5c817aec5ac9e81ded62
parentc7bae1e8fc665ff04272dbd2ff2f3d29273bfb10 (diff)
Wrap up 'lay flat by face' feature for 4.3-BETA.
Icon thanks to Yi-An Lai. part of CURA-6754
-rw-r--r--plugins/SolidView/SolidView.py6
-rw-r--r--resources/shaders/overhang.shader2
-rw-r--r--resources/themes/cura-light/icons/rotate_face_layflat.svg12
-rwxr-xr-xresources/themes/cura-light/styles.qml4
4 files changed, 18 insertions, 6 deletions
diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py
index a8cff675d9..536006ffaa 100644
--- a/plugins/SolidView/SolidView.py
+++ b/plugins/SolidView/SolidView.py
@@ -140,9 +140,9 @@ class SolidView(View):
1.0
]
- # Color the currently selected face-id.
- face = Selection.getSelectedFace()
- uniforms["selected_face"] = (Selection.getMaxFaceSelectionId() + 1) if not face or node != face[0] else face[1]
+ # Color the currently selected face-id. (Disable for now.)
+ #face = Selection.getHoverFace()
+ uniforms["hover_face"] = -1 #if not face or node != face[0] else face[1]
except ValueError:
pass
diff --git a/resources/shaders/overhang.shader b/resources/shaders/overhang.shader
index cb34f25893..a7473177e5 100644
--- a/resources/shaders/overhang.shader
+++ b/resources/shaders/overhang.shader
@@ -153,7 +153,7 @@ u_normalMatrix = normal_matrix
u_viewPosition = view_position
u_lightPosition = light_0_position
u_diffuseColor = diffuse_color
-u_faceId = selected_face
+u_faceId = hover_face
[attributes]
a_vertex = vertex
diff --git a/resources/themes/cura-light/icons/rotate_face_layflat.svg b/resources/themes/cura-light/icons/rotate_face_layflat.svg
new file mode 100644
index 0000000000..261a624cf0
--- /dev/null
+++ b/resources/themes/cura-light/icons/rotate_face_layflat.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 57.1 (83088) - https://sketch.com -->
+ <title>select face lay flat</title>
+ <desc>Created with Sketch.</desc>
+ <g id="select-face-lay-flat" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="rotate_layflat" fill="#000000" fill-rule="nonzero">
+ <path d="M14.251,13.493 L12.557,17.823 L0,25.231 L18.333,27.733 L21.256,19.618 L28,15.37 L14.251,13.493 Z M20.275,19.274 L17.587,26.758 L2.571,24.758 L13.56,18.242 L14.93,14.57 L25.586,15.976 L20.275,19.274 Z M11.01,1.283 C15.878525,1.02618706 20.376659,3.87743916 22.222,8.39 L19.768,9.018 L23.95,13.295 L25.565,7.534 L23.204,8.138 C21.2324413,3.16323798 16.3058511,0.00172080637 10.962,0.282 C7.204,0.472 3.923,2.317 1.765,5.064 L2.557,5.676 C4.542,3.15 7.558,1.456 11.01,1.283 L11.01,1.283 Z" id="Shape"></path>
+ </g>
+ <polygon id="Path-6" stroke="#000000" fill="#000000" points="18 18 10 23 16 24"></polygon>
+ </g>
+</svg> \ No newline at end of file
diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml
index 2cf3b0ed58..f2361a8604 100755
--- a/resources/themes/cura-light/styles.qml
+++ b/resources/themes/cura-light/styles.qml
@@ -240,8 +240,8 @@ QtObject
}
Behavior on color { ColorAnimation { duration: 50; } }
- border.width: (control.hasOwnProperty("needBorder") && control.needBorder) ? Theme.getSize("default_lining").width : 0
- border.color: Theme.getColor("lining")
+ border.width: (control.hasOwnProperty("needBorder") && control.needBorder) ? (control.checked ? Theme.getSize("thick_lining").width : Theme.getSize("default_lining").width) : 0
+ border.color: control.checked ? Theme.getColor("icon") : Theme.getColor("lining")
}
}