mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 18:12:38 +02:00
restoring the engine render views and cleaning up the task / config section of the pr
This commit is contained in:
parent
1461f81a9e
commit
6b1c7bf96e
9 changed files with 196 additions and 8 deletions
|
@ -283,7 +283,6 @@ void BloomEffect::configure(const Config& config) {
|
|||
blurName.back() = '0' + i;
|
||||
auto blurConfig = config.getConfig<render::BlurGaussian>(blurName);
|
||||
blurConfig->filterScale = 1.0f;
|
||||
//blurConfig->setProperty("filterScale", 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ void JobConfig::setPresetList(const QJsonObject& object) {
|
|||
void TaskConfig::connectChildConfig(QConfigPointer childConfig, const std::string& name) {
|
||||
childConfig->setParent(this);
|
||||
childConfig->setObjectName(name.c_str());
|
||||
// childConfig->propagateParentEnabled((_isParentEnabled ? _isEnabled : false));
|
||||
|
||||
// Connect loaded->refresh
|
||||
QObject::connect(childConfig.get(), SIGNAL(loaded()), this, SLOT(refresh()));
|
||||
|
@ -69,8 +68,6 @@ void TaskConfig::transferChildrenConfigs(QConfigPointer source) {
|
|||
QObject::connect(child, SIGNAL(dirtyEnabled()), this, SLOT(refresh()));
|
||||
}
|
||||
}
|
||||
|
||||
// propagateParentEnabledToSubs();
|
||||
}
|
||||
|
||||
void TaskConfig::refresh() {
|
||||
|
|
|
@ -125,7 +125,7 @@ public:
|
|||
|
||||
// Running Time measurement
|
||||
// The new stats signal is emitted once per run time of a job when stats (cpu runtime) are updated
|
||||
void setCPURunTime(const std::chrono::nanoseconds& runtime) { _msCPURunTime = std::chrono::duration<double, std::milli>(runtime).count(); /* emit newStats();*/ }
|
||||
void setCPURunTime(const std::chrono::nanoseconds& runtime) { _msCPURunTime = std::chrono::duration<double, std::milli>(runtime).count(); emit newStats(); }
|
||||
double getCPURunTime() const { return _msCPURunTime; }
|
||||
|
||||
// Describe the node graph data connections of the associated Job/Task
|
||||
|
|
|
@ -164,7 +164,7 @@ public:
|
|||
|
||||
void run(const ContextPointer& jobContext) override {
|
||||
jobContext->jobConfig = std::static_pointer_cast<Config>(Concept::_config);
|
||||
if (/*jobContext->jobConfig->alwaysEnabled || */jobContext->jobConfig->isEnabled()) {
|
||||
if (jobContext->jobConfig->isEnabled()) {
|
||||
jobRun(_data, jobContext, _input.get<I>(), _output.edit<O>());
|
||||
}
|
||||
jobContext->jobConfig.reset();
|
||||
|
|
|
@ -172,7 +172,7 @@ function job_tree_model_functor(jobTreeModel, maxLevel, newNodeFunctor) {
|
|||
|
||||
// Traverse the jobTreenode data structure created above
|
||||
function job_traverseTreeNode(root, functor, depth) {
|
||||
// if (root.subNode.length) {
|
||||
if (root.subNode.length) {
|
||||
depth++;
|
||||
for (var i = 0; i <root.subNode.length; i++) {
|
||||
var sub = root.subNode[i];
|
||||
|
@ -180,8 +180,9 @@ function job_traverseTreeNode(root, functor, depth) {
|
|||
job_traverseTreeNode(sub, functor, depth, 0)
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
function job_traverseTreeNodeRoot(root, functor) {
|
||||
if (functor(root, 0, 0)) {
|
||||
job_traverseTreeNode(root, functor, 0)
|
||||
|
|
71
scripts/developer/utilities/render/engineInspector.js
Normal file
71
scripts/developer/utilities/render/engineInspector.js
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*function openEngineTaskView() {
|
||||
// Set up the qml ui
|
||||
var qml = Script.resolvePath('engineInspector.qml');
|
||||
var window = new OverlayWindow({
|
||||
title: 'Render Engine',
|
||||
source: qml,
|
||||
width: 500,
|
||||
height: 100
|
||||
});
|
||||
window.setPosition(200, 50);
|
||||
window.closed.connect(function() { Script.stop(); });
|
||||
}
|
||||
openEngineTaskView();*/
|
||||
|
||||
(function() {
|
||||
var TABLET_BUTTON_NAME = "Inspector";
|
||||
var QMLAPP_URL = Script.resolvePath("./engineInspector.qml");
|
||||
var ICON_URL = Script.resolvePath("../../../system/assets/images/luci-i.svg");
|
||||
var ACTIVE_ICON_URL = Script.resolvePath("../../../system/assets/images/luci-a.svg");
|
||||
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: ICON_URL,
|
||||
activeIcon: ACTIVE_ICON_URL
|
||||
});
|
||||
|
||||
Script.scriptEnding.connect(function () {
|
||||
killWindow()
|
||||
button.clicked.disconnect(onClicked);
|
||||
tablet.removeButton(button);
|
||||
});
|
||||
|
||||
button.clicked.connect(onClicked);
|
||||
|
||||
var onScreen = false;
|
||||
var window;
|
||||
|
||||
function onClicked() {
|
||||
if (onScreen) {
|
||||
killWindow()
|
||||
} else {
|
||||
createWindow()
|
||||
}
|
||||
}
|
||||
|
||||
function createWindow() {
|
||||
var qml = Script.resolvePath(QMLAPP_URL);
|
||||
window = new OverlayWindow({
|
||||
title: 'Render Engine Inspector',
|
||||
source: qml,
|
||||
width: 250,
|
||||
height: 500
|
||||
});
|
||||
window.setPosition(200, 50);
|
||||
window.closed.connect(killWindow);
|
||||
onScreen = true
|
||||
button.editProperties({isActive: true});
|
||||
}
|
||||
|
||||
function killWindow() {
|
||||
if (window !== undefined) {
|
||||
window.closed.disconnect(killWindow);
|
||||
window.close()
|
||||
window = undefined
|
||||
}
|
||||
onScreen = false
|
||||
button.editProperties({isActive: false})
|
||||
}
|
||||
}());
|
||||
|
30
scripts/developer/utilities/render/engineInspector.qml
Normal file
30
scripts/developer/utilities/render/engineInspector.qml
Normal file
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// EngineInspector.qml
|
||||
//
|
||||
// Created by Sam Gateau on 06/07/2018
|
||||
// Copyright 2016 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import stylesUit 1.0
|
||||
import controlsUit 1.0 as HifiControls
|
||||
|
||||
import "../lib/jet/qml" as Jet
|
||||
|
||||
Item {
|
||||
HifiConstants { id: hifi;}
|
||||
id: root;
|
||||
anchors.fill: parent
|
||||
|
||||
property var rootConfig: Render.getConfig("")
|
||||
|
||||
Jet.TaskListView {
|
||||
rootConfig: root.rootConfig
|
||||
anchors.fill: root
|
||||
}
|
||||
}
|
59
scripts/developer/utilities/render/engineProfiler.js
Normal file
59
scripts/developer/utilities/render/engineProfiler.js
Normal file
|
@ -0,0 +1,59 @@
|
|||
|
||||
|
||||
(function() {
|
||||
var TABLET_BUTTON_NAME = "Profiler";
|
||||
var QMLAPP_URL = Script.resolvePath("./engineProfiler.qml");
|
||||
var ICON_URL = Script.resolvePath("../../../system/assets/images/luci-i.svg");
|
||||
var ACTIVE_ICON_URL = Script.resolvePath("../../../system/assets/images/luci-a.svg");
|
||||
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: ICON_URL,
|
||||
activeIcon: ACTIVE_ICON_URL
|
||||
});
|
||||
|
||||
Script.scriptEnding.connect(function () {
|
||||
killWindow()
|
||||
button.clicked.disconnect(onClicked);
|
||||
tablet.removeButton(button);
|
||||
});
|
||||
|
||||
button.clicked.connect(onClicked);
|
||||
|
||||
var onScreen = false;
|
||||
var window;
|
||||
|
||||
function onClicked() {
|
||||
if (onScreen) {
|
||||
killWindow()
|
||||
} else {
|
||||
createWindow()
|
||||
}
|
||||
}
|
||||
|
||||
function createWindow() {
|
||||
var qml = Script.resolvePath(QMLAPP_URL);
|
||||
window = Desktop.createWindow(Script.resolvePath(QMLAPP_URL), {
|
||||
title: 'Render Engine Profiler',
|
||||
flags: Desktop.ALWAYS_ON_TOP,
|
||||
presentationMode: Desktop.PresentationMode.NATIVE,
|
||||
size: {x: 500, y: 100}
|
||||
});
|
||||
window.setPosition(200, 50);
|
||||
window.closed.connect(killWindow);
|
||||
onScreen = true
|
||||
button.editProperties({isActive: true});
|
||||
}
|
||||
|
||||
function killWindow() {
|
||||
if (window !== undefined) {
|
||||
window.closed.disconnect(killWindow);
|
||||
window.close()
|
||||
window = undefined
|
||||
}
|
||||
onScreen = false
|
||||
button.editProperties({isActive: false})
|
||||
}
|
||||
}());
|
||||
|
31
scripts/developer/utilities/render/engineProfiler.qml
Normal file
31
scripts/developer/utilities/render/engineProfiler.qml
Normal file
|
@ -0,0 +1,31 @@
|
|||
//
|
||||
// EngineProfiler.qml
|
||||
//
|
||||
// Created by Sam Gateau on 06/07/2018
|
||||
// Copyright 2016 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import "qrc:///qml/styles-uit"
|
||||
import "qrc:///qml/controls-uit" as HifiControls
|
||||
|
||||
import "../lib/jet/qml" as Jet
|
||||
|
||||
Item {
|
||||
HifiConstants { id: hifi;}
|
||||
id: root;
|
||||
anchors.fill: parent
|
||||
|
||||
property var rootConfig: Render.getConfig("")
|
||||
|
||||
|
||||
Jet.TaskTimeFrameView {
|
||||
rootConfig: root.rootConfig
|
||||
anchors.fill: root
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue