mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-05 23:08:05 +02:00
CR feedback; whitespace / remove unnecessary diffs
This commit is contained in:
parent
ebdb5b3c17
commit
f8fe06213d
6 changed files with 8 additions and 8 deletions
|
@ -72,7 +72,7 @@ scriptable::ScriptableModelPointer scriptable::ScriptableModel::cloneModel(const
|
||||||
|
|
||||||
const QVector<scriptable::ScriptableMeshPointer> scriptable::ScriptableModel::getConstMeshes() const {
|
const QVector<scriptable::ScriptableMeshPointer> scriptable::ScriptableModel::getConstMeshes() const {
|
||||||
QVector<scriptable::ScriptableMeshPointer> out;
|
QVector<scriptable::ScriptableMeshPointer> out;
|
||||||
for(const auto& mesh : meshes) {
|
for (const auto& mesh : meshes) {
|
||||||
const scriptable::ScriptableMesh* m = qobject_cast<const scriptable::ScriptableMesh*>(&mesh);
|
const scriptable::ScriptableMesh* m = qobject_cast<const scriptable::ScriptableMesh*>(&mesh);
|
||||||
if (!m) {
|
if (!m) {
|
||||||
m = scriptable::make_scriptowned<scriptable::ScriptableMesh>(mesh);
|
m = scriptable::make_scriptowned<scriptable::ScriptableMesh>(mesh);
|
||||||
|
@ -87,7 +87,7 @@ const QVector<scriptable::ScriptableMeshPointer> scriptable::ScriptableModel::ge
|
||||||
|
|
||||||
QVector<scriptable::ScriptableMeshPointer> scriptable::ScriptableModel::getMeshes() {
|
QVector<scriptable::ScriptableMeshPointer> scriptable::ScriptableModel::getMeshes() {
|
||||||
QVector<scriptable::ScriptableMeshPointer> out;
|
QVector<scriptable::ScriptableMeshPointer> out;
|
||||||
for(auto& mesh : meshes) {
|
for (auto& mesh : meshes) {
|
||||||
scriptable::ScriptableMesh* m = qobject_cast<scriptable::ScriptableMesh*>(&mesh);
|
scriptable::ScriptableMesh* m = qobject_cast<scriptable::ScriptableMesh*>(&mesh);
|
||||||
if (!m) {
|
if (!m) {
|
||||||
m = scriptable::make_scriptowned<scriptable::ScriptableMesh>(mesh);
|
m = scriptable::make_scriptowned<scriptable::ScriptableMesh>(mesh);
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
#include <ViewFrustum.h>
|
#include <ViewFrustum.h>
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
#include <model-networking/SimpleMeshProxy.h>
|
|
||||||
#include <TBBHelpers.h>
|
#include <TBBHelpers.h>
|
||||||
|
|
||||||
|
#include <model-networking/SimpleMeshProxy.h>
|
||||||
#include <graphics-scripting/Forward.h>
|
#include <graphics-scripting/Forward.h>
|
||||||
#include <graphics/BufferViewHelpers.h>
|
#include <graphics/BufferViewHelpers.h>
|
||||||
#include <DualQuaternion.h>
|
#include <DualQuaternion.h>
|
||||||
|
@ -885,7 +885,7 @@ void Model::renderDebugMeshBoxes(gpu::Batch& batch) {
|
||||||
|
|
||||||
DependencyManager::get<GeometryCache>()->bindSimpleProgram(batch, false, false, false, true, true);
|
DependencyManager::get<GeometryCache>()->bindSimpleProgram(batch, false, false, false, true, true);
|
||||||
|
|
||||||
for(const auto& triangleSet : _modelSpaceMeshTriangleSets) {
|
for (const auto& triangleSet : _modelSpaceMeshTriangleSets) {
|
||||||
auto box = triangleSet.getBounds();
|
auto box = triangleSet.getBounds();
|
||||||
|
|
||||||
if (_debugMeshBoxesID == GeometryCache::UNKNOWN_ID) {
|
if (_debugMeshBoxesID == GeometryCache::UNKNOWN_ID) {
|
||||||
|
|
|
@ -317,13 +317,12 @@ public:
|
||||||
int getResourceDownloadAttempts() { return _renderWatcher.getResourceDownloadAttempts(); }
|
int getResourceDownloadAttempts() { return _renderWatcher.getResourceDownloadAttempts(); }
|
||||||
int getResourceDownloadAttemptsRemaining() { return _renderWatcher.getResourceDownloadAttemptsRemaining(); }
|
int getResourceDownloadAttemptsRemaining() { return _renderWatcher.getResourceDownloadAttemptsRemaining(); }
|
||||||
|
|
||||||
|
Q_INVOKABLE MeshProxyList getMeshes() const;
|
||||||
virtual scriptable::ScriptableModelBase getScriptableModel() override;
|
virtual scriptable::ScriptableModelBase getScriptableModel() override;
|
||||||
virtual bool replaceScriptableModelMeshPart(scriptable::ScriptableModelBasePointer model, int meshIndex, int partIndex) override;
|
virtual bool replaceScriptableModelMeshPart(scriptable::ScriptableModelBasePointer model, int meshIndex, int partIndex) override;
|
||||||
|
|
||||||
void scaleToFit();
|
void scaleToFit();
|
||||||
|
|
||||||
Q_INVOKABLE MeshProxyList getMeshes() const;
|
|
||||||
|
|
||||||
void addMaterial(graphics::MaterialLayer material, const std::string& parentMaterialName);
|
void addMaterial(graphics::MaterialLayer material, const std::string& parentMaterialName);
|
||||||
void removeMaterial(graphics::MaterialPointer material, const std::string& parentMaterialName);
|
void removeMaterial(graphics::MaterialPointer material, const std::string& parentMaterialName);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// FIXME: temporary workaround for duplicating the FBXModel when dynamically replacing an underlying mesh part
|
||||||
#include <graphics/BufferViewHelpers.h>
|
#include <graphics/BufferViewHelpers.h>
|
||||||
#include <graphics-scripting/GraphicsScriptingUtil.h>
|
#include <graphics-scripting/GraphicsScriptingUtil.h>
|
||||||
class MyGeometryResource : public GeometryResource {
|
class MyGeometryResource : public GeometryResource {
|
||||||
|
|
|
@ -440,7 +440,7 @@ void AssetScriptingInterface::saveToCache(const QUrl& rawURL, const QByteArray&
|
||||||
JS_VERIFY(url.scheme() == "atp" || url.scheme() == "cache", "only 'atp' and 'cache' URL schemes supported");
|
JS_VERIFY(url.scheme() == "atp" || url.scheme() == "cache", "only 'atp' and 'cache' URL schemes supported");
|
||||||
JS_VERIFY(hash.isEmpty() || hash == hashDataHex(data), QString("invalid checksum hash for atp:HASH style URL (%1 != %2)").arg(hash, hashDataHex(data)));
|
JS_VERIFY(hash.isEmpty() || hash == hashDataHex(data), QString("invalid checksum hash for atp:HASH style URL (%1 != %2)").arg(hash, hashDataHex(data)));
|
||||||
|
|
||||||
//qCDebug(scriptengine) << "saveToCache" << url.toDisplayString() << data << hash << metadata;
|
// qCDebug(scriptengine) << "saveToCache" << url.toDisplayString() << data << hash << metadata;
|
||||||
|
|
||||||
jsPromiseReady(Parent::saveToCache(url, data, metadata), scope, callback);
|
jsPromiseReady(Parent::saveToCache(url, data, metadata), scope, callback);
|
||||||
}
|
}
|
||||||
|
|
|
@ -535,7 +535,6 @@ void ScriptEngines::onScriptEngineLoaded(const QString& rawScriptURL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int ScriptEngines::runScriptInitializers(ScriptEnginePointer scriptEngine) {
|
int ScriptEngines::runScriptInitializers(ScriptEnginePointer scriptEngine) {
|
||||||
// register our application services and set it off on its own thread
|
|
||||||
int ii=0;
|
int ii=0;
|
||||||
for (auto initializer : _scriptInitializers) {
|
for (auto initializer : _scriptInitializers) {
|
||||||
ii++;
|
ii++;
|
||||||
|
@ -554,6 +553,7 @@ void ScriptEngines::launchScriptEngine(ScriptEnginePointer scriptEngine) {
|
||||||
loadScript(scriptName, userLoaded, false, false, true);
|
loadScript(scriptName, userLoaded, false, false, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// register our application services and set it off on its own thread
|
||||||
runScriptInitializers(scriptEngine);
|
runScriptInitializers(scriptEngine);
|
||||||
|
|
||||||
// FIXME disabling 'shift key' debugging for now. If you start up the application with
|
// FIXME disabling 'shift key' debugging for now. If you start up the application with
|
||||||
|
|
Loading…
Reference in a new issue