mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
allow AnimationHandle to be set from AnimationDetails
This commit is contained in:
parent
50bf5db50f
commit
96705bfd74
3 changed files with 18 additions and 1 deletions
|
@ -97,6 +97,23 @@ AnimationDetails AnimationHandle::getAnimationDetails() const {
|
|||
return details;
|
||||
}
|
||||
|
||||
void AnimationHandle::setAnimationDetails(const AnimationDetails& details) {
|
||||
setRole(details.role);
|
||||
setURL(details.url);
|
||||
setFPS(details.fps);
|
||||
setPriority(details.priority);
|
||||
setLoop(details.loop);
|
||||
setHold(details.hold);
|
||||
setStartAutomatically(details.startAutomatically);
|
||||
setFirstFrame(details.firstFrame);
|
||||
setLastFrame(details.lastFrame);
|
||||
setRunning(details.running);
|
||||
setFrameIndex(details.frameIndex);
|
||||
|
||||
// NOTE: AnimationDetails doesn't support maskedJoints
|
||||
//setMaskedJoints(const QStringList& maskedJoints);
|
||||
}
|
||||
|
||||
|
||||
void AnimationHandle::simulate(float deltaTime) {
|
||||
_frameIndex += deltaTime * _fps;
|
||||
|
|
|
@ -70,6 +70,7 @@ public:
|
|||
float getFrameIndex() const { return _frameIndex; }
|
||||
|
||||
AnimationDetails getAnimationDetails() const;
|
||||
void setAnimationDetails(const AnimationDetails& details);
|
||||
|
||||
signals:
|
||||
|
||||
|
|
|
@ -1527,7 +1527,6 @@ void Model::endScene(RenderMode mode, RenderArgs* args) {
|
|||
int opaqueMeshPartsRendered = 0;
|
||||
|
||||
// now, for each model in the scene, render the mesh portions
|
||||
float alpha = 1.0f; // at this point we don't support per model alphas
|
||||
foreach(Model* model, _modelsInScene) {
|
||||
opaqueMeshPartsRendered += model->renderMeshes(batch, mode, false, DEFAULT_ALPHA_THRESHOLD, false, false, false, args);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue