mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:28:09 +02:00
animation on switch url
This commit is contained in:
parent
983badf80a
commit
a4605289a2
2 changed files with 3 additions and 3 deletions
|
@ -1336,6 +1336,7 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce
|
||||||
if (_parsedModelURL != model->getURL()) {
|
if (_parsedModelURL != model->getURL()) {
|
||||||
withWriteLock([&] {
|
withWriteLock([&] {
|
||||||
_texturesLoaded = false;
|
_texturesLoaded = false;
|
||||||
|
_jointMappingCompleted = false;
|
||||||
model->setURL(_parsedModelURL);
|
model->setURL(_parsedModelURL);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1445,8 +1446,7 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce
|
||||||
if (!jointsMapped()) {
|
if (!jointsMapped()) {
|
||||||
mapJoints(entity, model->getJointNames());
|
mapJoints(entity, model->getJointNames());
|
||||||
//else the joint have been mapped before but we have a new animation to load
|
//else the joint have been mapped before but we have a new animation to load
|
||||||
} else if (_animation && (_animation->getURL().toString() != entity->getAnimationURL())) {
|
} else if (_animation && (_animation->getURL().toString() != entity->getAnimationURL())) {
|
||||||
_animation = DependencyManager::get<AnimationCache>()->getAnimation(entity->getAnimationURL());
|
|
||||||
_jointMappingCompleted = false;
|
_jointMappingCompleted = false;
|
||||||
mapJoints(entity, model->getJointNames());
|
mapJoints(entity, model->getJointNames());
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ private:
|
||||||
const void* _collisionMeshKey { nullptr };
|
const void* _collisionMeshKey { nullptr };
|
||||||
|
|
||||||
// used on client side
|
// used on client side
|
||||||
bool _jointMappingCompleted{ false };
|
bool _jointMappingCompleted { false };
|
||||||
QVector<int> _jointMapping; // domain is index into model-joints, range is index into animation-joints
|
QVector<int> _jointMapping; // domain is index into model-joints, range is index into animation-joints
|
||||||
AnimationPointer _animation;
|
AnimationPointer _animation;
|
||||||
QUrl _parsedModelURL;
|
QUrl _parsedModelURL;
|
||||||
|
|
Loading…
Reference in a new issue