mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:06:02 +02:00
Remove Avatar UseAnimPreAndPostRotations option.
This should always be true and can lead to hard to diagnose bugs if it is ever set to false.
This commit is contained in:
parent
2f5d2bef49
commit
51ea2632c0
6 changed files with 2 additions and 21 deletions
|
@ -574,8 +574,6 @@ Menu::Menu() {
|
||||||
avatar.get(), SLOT(setEnableMeshVisible(bool)));
|
avatar.get(), SLOT(setEnableMeshVisible(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::DisableEyelidAdjustment, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::DisableEyelidAdjustment, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::TurnWithHead, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::TurnWithHead, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::UseAnimPreAndPostRotations, 0, true,
|
|
||||||
avatar.get(), SLOT(setUseAnimPreAndPostRotations(bool)));
|
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::EnableInverseKinematics, 0, true,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::EnableInverseKinematics, 0, true,
|
||||||
avatar.get(), SLOT(setEnableInverseKinematics(bool)));
|
avatar.get(), SLOT(setEnableInverseKinematics(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderSensorToWorldMatrix, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderSensorToWorldMatrix, 0, false,
|
||||||
|
|
|
@ -194,7 +194,6 @@ namespace MenuOption {
|
||||||
const QString TurnWithHead = "Turn using Head";
|
const QString TurnWithHead = "Turn using Head";
|
||||||
const QString UseAudioForMouth = "Use Audio for Mouth";
|
const QString UseAudioForMouth = "Use Audio for Mouth";
|
||||||
const QString UseCamera = "Use Camera";
|
const QString UseCamera = "Use Camera";
|
||||||
const QString UseAnimPreAndPostRotations = "Use Anim Pre and Post Rotations";
|
|
||||||
const QString VelocityFilter = "Velocity Filter";
|
const QString VelocityFilter = "Velocity Filter";
|
||||||
const QString VisibleToEveryone = "Everyone";
|
const QString VisibleToEveryone = "Everyone";
|
||||||
const QString VisibleToFriends = "Friends";
|
const QString VisibleToFriends = "Friends";
|
||||||
|
|
|
@ -1061,11 +1061,6 @@ void MyAvatar::setEnableMeshVisible(bool isEnabled) {
|
||||||
_skeletonModel->setVisibleInScene(isEnabled, qApp->getMain3DScene());
|
_skeletonModel->setVisibleInScene(isEnabled, qApp->getMain3DScene());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyAvatar::setUseAnimPreAndPostRotations(bool isEnabled) {
|
|
||||||
AnimClip::usePreAndPostPoseFromAnim = isEnabled;
|
|
||||||
reset(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MyAvatar::setEnableInverseKinematics(bool isEnabled) {
|
void MyAvatar::setEnableInverseKinematics(bool isEnabled) {
|
||||||
_skeletonModel->getRig().setEnableInverseKinematics(isEnabled);
|
_skeletonModel->getRig().setEnableInverseKinematics(isEnabled);
|
||||||
}
|
}
|
||||||
|
|
|
@ -594,7 +594,6 @@ public slots:
|
||||||
|
|
||||||
bool getEnableMeshVisible() const { return _skeletonModel->isVisible(); }
|
bool getEnableMeshVisible() const { return _skeletonModel->isVisible(); }
|
||||||
void setEnableMeshVisible(bool isEnabled);
|
void setEnableMeshVisible(bool isEnabled);
|
||||||
void setUseAnimPreAndPostRotations(bool isEnabled);
|
|
||||||
void setEnableInverseKinematics(bool isEnabled);
|
void setEnableInverseKinematics(bool isEnabled);
|
||||||
|
|
||||||
QUrl getAnimGraphOverrideUrl() const; // thread-safe
|
QUrl getAnimGraphOverrideUrl() const; // thread-safe
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
#include "AnimationLogging.h"
|
#include "AnimationLogging.h"
|
||||||
#include "AnimUtil.h"
|
#include "AnimUtil.h"
|
||||||
|
|
||||||
bool AnimClip::usePreAndPostPoseFromAnim = true;
|
|
||||||
|
|
||||||
AnimClip::AnimClip(const QString& id, const QString& url, float startFrame, float endFrame, float timeScale, bool loopFlag, bool mirrorFlag) :
|
AnimClip::AnimClip(const QString& id, const QString& url, float startFrame, float endFrame, float timeScale, bool loopFlag, bool mirrorFlag) :
|
||||||
AnimNode(AnimNode::Type::Clip, id),
|
AnimNode(AnimNode::Type::Clip, id),
|
||||||
_startFrame(startFrame),
|
_startFrame(startFrame),
|
||||||
|
@ -138,14 +136,8 @@ void AnimClip::copyFromNetworkAnim() {
|
||||||
if (skeletonJoint >= 0 && skeletonJoint < skeletonJointCount) {
|
if (skeletonJoint >= 0 && skeletonJoint < skeletonJointCount) {
|
||||||
|
|
||||||
AnimPose preRot, postRot;
|
AnimPose preRot, postRot;
|
||||||
if (usePreAndPostPoseFromAnim) {
|
preRot = animSkeleton.getPreRotationPose(animJoint);
|
||||||
preRot = animSkeleton.getPreRotationPose(animJoint);
|
postRot = animSkeleton.getPostRotationPose(animJoint);
|
||||||
postRot = animSkeleton.getPostRotationPose(animJoint);
|
|
||||||
} else {
|
|
||||||
// In order to support Blender, which does not have preRotation FBX support, we use the models defaultPose as the reference frame for the animations.
|
|
||||||
preRot = AnimPose(glm::vec3(1.0f), _skeleton->getRelativeBindPose(skeletonJoint).rot(), glm::vec3());
|
|
||||||
postRot = AnimPose::identity;
|
|
||||||
}
|
|
||||||
|
|
||||||
// cancel out scale
|
// cancel out scale
|
||||||
preRot.scale() = glm::vec3(1.0f);
|
preRot.scale() = glm::vec3(1.0f);
|
||||||
|
|
|
@ -25,8 +25,6 @@ class AnimClip : public AnimNode {
|
||||||
public:
|
public:
|
||||||
friend class AnimTests;
|
friend class AnimTests;
|
||||||
|
|
||||||
static bool usePreAndPostPoseFromAnim;
|
|
||||||
|
|
||||||
AnimClip(const QString& id, const QString& url, float startFrame, float endFrame, float timeScale, bool loopFlag, bool mirrorFlag);
|
AnimClip(const QString& id, const QString& url, float startFrame, float endFrame, float timeScale, bool loopFlag, bool mirrorFlag);
|
||||||
virtual ~AnimClip() override;
|
virtual ~AnimClip() override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue