mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
Address errors sent from running the ENgine Inspector.js
This commit is contained in:
parent
859016bf37
commit
5e57e53db2
5 changed files with 41 additions and 28 deletions
|
@ -29,7 +29,7 @@ Prop.PropGroup {
|
|||
|
||||
property var showProps: true
|
||||
property var showSubs: true
|
||||
property var jobEnabled: rootConfig.getConfig(jobPath).enabled
|
||||
property bool jobEnabled: rootConfig.getConfig(jobPath).enabled
|
||||
property var jobCpuTime: pullCpuTime()
|
||||
|
||||
function pullCpuTime() {
|
||||
|
@ -72,7 +72,7 @@ Prop.PropGroup {
|
|||
anchors.right:parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
filled: root.jobEnabled
|
||||
fillColor: (root.jobEnabled ? root.global.colorGreenHighlight : global.colorOrangeAccent)
|
||||
fillColor: (root.jobEnabled ? global.colorGreenHighlight : global.colorOrangeAccent)
|
||||
icon: 5
|
||||
|
||||
MouseArea{
|
||||
|
|
|
@ -136,30 +136,32 @@ PropFolderPanel {
|
|||
function populateFromObjectProps(object) {
|
||||
var propsModel = []
|
||||
|
||||
var props = Object.keys(object);
|
||||
for (var p in props) {
|
||||
var o = {};
|
||||
o["object"] = object
|
||||
o["property"] = props[p];
|
||||
// o["readOnly"] = true;
|
||||
|
||||
var thePropThing = object[props[p]];
|
||||
if ((thePropThing !== undefined) && (thePropThing !== null)) {
|
||||
var theType = typeof(thePropThing)
|
||||
switch(theType) {
|
||||
case 'object': {
|
||||
o["type"] = "object";
|
||||
propsModel.push(o)
|
||||
} break;
|
||||
default: {
|
||||
o["type"] = "string";
|
||||
propsModel.push(o)
|
||||
} break;
|
||||
}
|
||||
if (object !== undefined) {
|
||||
var props = Object.keys(object);
|
||||
for (var p in props) {
|
||||
var o = {};
|
||||
o["object"] = object
|
||||
o["property"] = props[p];
|
||||
// o["readOnly"] = true;
|
||||
|
||||
} else {
|
||||
o["type"] = "string";
|
||||
propsModel.push(o)
|
||||
var thePropThing = object[props[p]];
|
||||
if ((thePropThing !== undefined) && (thePropThing !== null)) {
|
||||
var theType = typeof(thePropThing)
|
||||
switch(theType) {
|
||||
case 'object': {
|
||||
o["type"] = "object";
|
||||
propsModel.push(o)
|
||||
} break;
|
||||
default: {
|
||||
o["type"] = "string";
|
||||
propsModel.push(o)
|
||||
} break;
|
||||
}
|
||||
|
||||
} else {
|
||||
o["type"] = "string";
|
||||
propsModel.push(o)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@ Item {
|
|||
readonly property color colorBorderHighight: hifi.colors.blueHighlight
|
||||
readonly property color colorBorderLighter: hifi.colors.faintGray
|
||||
|
||||
readonly property color colorOrangeAccent: "#FF6309"
|
||||
readonly property color colorRedAccent: "#C62147"
|
||||
readonly property color colorGreenHighlight: "#1ac567"
|
||||
readonly property color colorOrangeAccent: hifi.colors.orangeAccent
|
||||
readonly property color colorRedAccent: hifi.colors.redAccent
|
||||
readonly property color colorGreenHighlight: hifi.colors.greenHighlight
|
||||
|
||||
readonly property real fontSize: 12
|
||||
readonly property var fontFamily: "Raleway"
|
||||
|
|
|
@ -32,6 +32,7 @@ Rectangle {
|
|||
clip: true
|
||||
|
||||
Column {
|
||||
id: column
|
||||
width: parent.width
|
||||
Prop.PropFolderPanel {
|
||||
label: "Render Settings"
|
||||
|
@ -81,17 +82,26 @@ Rectangle {
|
|||
label: "Tools"
|
||||
panelFrameData: Component {
|
||||
Row {
|
||||
HifiControls.Button {
|
||||
text: "Engine"
|
||||
onClicked: {
|
||||
sendToScript({method: "openEngineInspectorView"});
|
||||
}
|
||||
width:column.width / 3
|
||||
}
|
||||
HifiControls.Button {
|
||||
text: "LOD"
|
||||
onClicked: {
|
||||
sendToScript({method: "openEngineLODView"});
|
||||
}
|
||||
width:column.width / 3
|
||||
}
|
||||
HifiControls.Button {
|
||||
text: "Material"
|
||||
onClicked: {
|
||||
sendToScript({method: "openMaterialInspectorView"});
|
||||
}
|
||||
width:column.width / 3
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ function openView() {
|
|||
}
|
||||
|
||||
pages.addPage('Luci', 'Luci', '../luci.qml', 300, 420, openLuciWindow, closeLuciWindow);
|
||||
pages.addPage('openEngineInspectorView', 'Render Engine Inspector', '../engineInspector.qml', 300, 400);
|
||||
pages.addPage('openEngineLODView', 'Render LOD', '../lod.qml', 300, 400);
|
||||
pages.addPage('openMaterialInspectorView', 'Material Inspector', '../materialInspector.qml', 300, 400, MaterialInspector.setWindow, MaterialInspector.setWindow);
|
||||
|
||||
|
|
Loading…
Reference in a new issue