aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2020-08-04 10:19:24 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2020-08-04 10:51:58 +0000
commit4d45e2defe0cf0e7ed71dc34af694a4147067d22 (patch)
tree755bb450d3420d6194f153e50dfe1dea609a3d85
parent9f2bb4abaf7f99f741bb422135f651d429bf89d3 (diff)
QmlDesigner: Fix 3D overlay object colors
Recent changes to Quick3D changed how NoLighting materials work. Emissive color no longer has effect in that case, so use diffuse color instead. Change-Id: Idde43f5bdf06a432a5dd06f9c52d6812fa790a73 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml4
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml2
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml4
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml2
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml8
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml2
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml2
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml4
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml2
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml4
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml2
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml2
-rw-r--r--share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml2
13 files changed, 20 insertions, 20 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml
index 0fd5ad1e98..0121938cad 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/AxisHelperArm.qml
@@ -45,7 +45,7 @@ Node {
source: "meshes/axishelper.mesh"
materials: DefaultMaterial {
id: posMat
- emissiveColor: posModel.hovering ? armRoot.hoverColor : armRoot.color
+ diffuseColor: posModel.hovering ? armRoot.hoverColor : armRoot.color
lighting: DefaultMaterial.NoLighting
}
pickable: true
@@ -62,7 +62,7 @@ Node {
scale: Qt.vector3d(0.025, 0.025, 0.025)
materials: DefaultMaterial {
id: negMat
- emissiveColor: negModel.hovering ? armRoot.hoverColor : armRoot.color
+ diffuseColor: negModel.hovering ? armRoot.hoverColor : armRoot.color
lighting: DefaultMaterial.NoLighting
}
pickable: true
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml
index 0ba02e362b..22c404ff67 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/CameraFrustum.qml
@@ -48,7 +48,7 @@ Model {
materials: [
DefaultMaterial {
id: defaultMaterial
- emissiveColor: cameraFrustum.selected ? "#FF0000" : "#555555"
+ diffuseColor: cameraFrustum.selected ? "#FF0000" : "#555555"
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml
index e88b9c4c51..29548bee1e 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/DirectionalDraggable.qml
@@ -31,7 +31,7 @@ Model {
id: rootModel
property View3D view3D
- property alias color: material.emissiveColor
+ property alias color: material.diffuseColor
property Node targetNode: null
property bool dragging: mouseAreaYZ.dragging || mouseAreaXZ.dragging
property bool active: false
@@ -52,7 +52,7 @@ Model {
DefaultMaterial {
id: material
- emissiveColor: "white"
+ diffuseColor: "white"
lighting: DefaultMaterial.NoLighting
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml
index 2bf81b837f..280ab68c82 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml
@@ -520,7 +520,7 @@ Item {
id: lineMat
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
- emissiveColor: pivotLine.color
+ diffuseColor: pivotLine.color
}
]
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml
index 70e6e82ee3..dbd7f38523 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/HelperGrid.qml
@@ -47,7 +47,7 @@ Node {
materials: [
DefaultMaterial {
id: mainGridMaterial
- emissiveColor: "#aaaaaa"
+ diffuseColor: "#aaaaaa"
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
}
@@ -65,7 +65,7 @@ Node {
materials: [
DefaultMaterial {
id: subGridMaterial
- emissiveColor: mainGridMaterial.emissiveColor
+ diffuseColor: mainGridMaterial.diffuseColor
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
}
@@ -82,7 +82,7 @@ Node {
materials: [
DefaultMaterial {
id: vCenterLineMaterial
- emissiveColor: "#00a1d2"
+ diffuseColor: "#00a1d2"
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
}
@@ -99,7 +99,7 @@ Node {
materials: [
DefaultMaterial {
id: hCenterLineMaterial
- emissiveColor: "#cb211a"
+ diffuseColor: "#cb211a"
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml
index ee1c5017ef..2e9791dc28 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/LightGizmo.qml
@@ -336,7 +336,7 @@ Node {
DefaultMaterial {
id: lightMaterial
- emissiveColor: lightGizmo.color
+ diffuseColor: lightGizmo.color
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml
index 79718d042f..f9af707057 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/Line3D.qml
@@ -33,7 +33,7 @@ Node {
property alias startPos: lineGeometry.startPos
property alias endPos: lineGeometry.endPos
property alias name: lineGeometry.name // Name must be unique for each line
- property alias color: lineMat.emissiveColor
+ property alias color: lineMat.diffuseColor
Model {
geometry: LineGeometry {
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml
index 41a44f2386..0d66033eaa 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/PlanarDraggable.qml
@@ -31,7 +31,7 @@ Model {
id: rootModel
property View3D view3D
- property alias color: gizmoMaterial.emissiveColor
+ property alias color: gizmoMaterial.diffuseColor
property alias priority: mouseArea.priority
property Node targetNode: null
property bool dragging: mouseArea.dragging
@@ -53,7 +53,7 @@ Model {
DefaultMaterial {
id: gizmoMaterial
- emissiveColor: "white"
+ diffuseColor: "white"
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml
index 8ed85f3296..6fccfbcdc7 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateGizmo.qml
@@ -175,7 +175,7 @@ Node {
source: "#Sphere"
materials: DefaultMaterial {
id: material
- emissiveColor: "black"
+ diffuseColor: "black"
opacity: mouseAreaFree.hovering ? 0.15 : 0
lighting: DefaultMaterial.NoLighting
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml
index fc803c679a..00494a5d91 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/RotateRing.qml
@@ -31,7 +31,7 @@ Model {
id: rotateRing
property View3D view3D
- property alias color: material.emissiveColor
+ property alias color: material.diffuseColor
property Node targetNode: null
property bool dragging: mouseAreaMain.dragging
property bool active: false
@@ -60,7 +60,7 @@ Model {
materials: DefaultMaterial {
id: material
- emissiveColor: "white"
+ diffuseColor: "white"
lighting: DefaultMaterial.NoLighting
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml
index ff64957699..076f8d53a6 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleGizmo.qml
@@ -170,7 +170,7 @@ Node {
scale: Qt.vector3d(0.024, 0.024, 0.024)
materials: DefaultMaterial {
id: material
- emissiveColor: highlightOnHover
+ diffuseColor: highlightOnHover
&& (centerMouseArea.hovering || centerMouseArea.dragging)
? Qt.lighter(Qt.rgba(0.5, 0.5, 0.5, 1))
: Qt.rgba(0.5, 0.5, 0.5, 1)
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml
index ead4f1458d..fcdf4a7415 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/ScaleRod.qml
@@ -44,7 +44,7 @@ DirectionalDraggable {
scale: Qt.vector3d(0.020, 0.020, 0.020)
materials: DefaultMaterial {
id: material
- emissiveColor: scaleRod.color
+ diffuseColor: scaleRod.color
lighting: DefaultMaterial.NoLighting
}
}
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml
index 739c7a6d34..201d1a6377 100644
--- a/share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml
+++ b/share/qtcreator/qml/qmlpuppet/mockfiles/SelectionBox.qml
@@ -56,7 +56,7 @@ Node {
materials: [
DefaultMaterial {
- emissiveColor: "#fff600"
+ diffuseColor: "#fff600"
lighting: DefaultMaterial.NoLighting
cullMode: Material.NoCulling
}