mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 02:57:10 +02:00
Because the joint mappings in the .fst can be wrong when the .fst isn't updated for quick changes in the .fbx. Because models now really need the preRotation, which is only in the avatar .fbx.
39 lines
No EOL
1.2 KiB
C++
39 lines
No EOL
1.2 KiB
C++
//
|
|
// ScriptableAvatar.h
|
|
//
|
|
//
|
|
// Created by Clement on 7/22/14.
|
|
// Copyright 2014 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_ScriptableAvatar_h
|
|
#define hifi_ScriptableAvatar_h
|
|
|
|
#include <AnimationCache.h>
|
|
#include <AvatarData.h>
|
|
#include <ScriptEngine.h>
|
|
|
|
class ScriptableAvatar : public AvatarData, public Dependency{
|
|
Q_OBJECT
|
|
public:
|
|
|
|
/// Allows scripts to run animations.
|
|
Q_INVOKABLE void startAnimation(const QString& url, float fps = 30.0f, float priority = 1.0f, bool loop = false,
|
|
bool hold = false, float firstFrame = 0.0f, float lastFrame = FLT_MAX, const QStringList& maskedJoints = QStringList());
|
|
Q_INVOKABLE void stopAnimation();
|
|
Q_INVOKABLE AnimationDetails getAnimationDetails();
|
|
|
|
private slots:
|
|
void update(float deltatime);
|
|
|
|
private:
|
|
AnimationPointer _animation;
|
|
AnimationDetails _animationDetails;
|
|
QStringList _maskedJoints;
|
|
AnimationPointer _bind; // a sleazy way to get the skeleton, given the various library/cmake dependencies
|
|
};
|
|
|
|
#endif // hifi_ScriptableAvatar_h
|