mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 02:19:58 +02:00
Merge pull request #8552 from AndrewMeadows/invoke-updateModel
eliminate log warning about invokeMethod of EntityTreeRenderer::updateModel()
This commit is contained in:
commit
667137f951
2 changed files with 3 additions and 4 deletions
|
@ -556,14 +556,13 @@ ModelPointer EntityTreeRenderer::allocateModel(const QString& url, float loading
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
ModelPointer EntityTreeRenderer::updateModel(ModelPointer model, const QString& newUrl, const QString& collisionUrl) {
|
ModelPointer EntityTreeRenderer::updateModel(ModelPointer model, const QString& newUrl) {
|
||||||
// Only create and delete models on the thread that owns the EntityTreeRenderer
|
// Only create and delete models on the thread that owns the EntityTreeRenderer
|
||||||
if (QThread::currentThread() != thread()) {
|
if (QThread::currentThread() != thread()) {
|
||||||
QMetaObject::invokeMethod(this, "updateModel", Qt::BlockingQueuedConnection,
|
QMetaObject::invokeMethod(this, "updateModel", Qt::BlockingQueuedConnection,
|
||||||
Q_RETURN_ARG(ModelPointer, model),
|
Q_RETURN_ARG(ModelPointer, model),
|
||||||
Q_ARG(ModelPointer, model),
|
Q_ARG(ModelPointer, model),
|
||||||
Q_ARG(const QString&, newUrl),
|
Q_ARG(const QString&, newUrl));
|
||||||
Q_ARG(const QString&, collisionUrl));
|
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ public:
|
||||||
Q_INVOKABLE ModelPointer allocateModel(const QString& url, float loadingPriority = 0.0f);
|
Q_INVOKABLE ModelPointer allocateModel(const QString& url, float loadingPriority = 0.0f);
|
||||||
|
|
||||||
/// if a renderable entity item needs to update the URL of a model, we will handle that for the entity
|
/// if a renderable entity item needs to update the URL of a model, we will handle that for the entity
|
||||||
Q_INVOKABLE ModelPointer updateModel(ModelPointer original, const QString& newUrl, const QString& collisionUrl);
|
Q_INVOKABLE ModelPointer updateModel(ModelPointer original, const QString& newUrl);
|
||||||
|
|
||||||
/// if a renderable entity item is done with a model, it should return it to us
|
/// if a renderable entity item is done with a model, it should return it to us
|
||||||
void releaseModel(ModelPointer model);
|
void releaseModel(ModelPointer model);
|
||||||
|
|
Loading…
Reference in a new issue